Repository navigation
fix(index/coordinator): address code review findings on index integrity and logging - #17
Closed
Pascal-ZeGerman wants to merge 6 commits into
Closed
Pascal-ZeGerman wants to merge 6 commits into
Pascal-ZeGerman wants to merge 6 commits into
Conversation
…ty and logging - _async_ensure_index now also checks _index_has_graph_file() so a missing or decayed graph file with intact segments files triggers a re-download instead of silently disabling Level-4 routing. - Arm the GPS stale watchdog in async_start() so the "GPS Signal Lost" notification can fire even if GPS never reports after a restart. - 311 suspension poll failure logs now reflect whether the fallback actually fails open or fails closed (retains an active suspension). - _sync_verify_index no longer scans the entire rtree dataset on every setup/reload; it now touches only the first result to prove the file is readable. - Import dt_util at module level in binary_sensor.py instead of locally inside is_on(), consistent with coordinator.py/sensor.py. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- codeql, hacs, hassfest: revert to ubuntu-latest (Docker/ARM64 not supported) - vendor-guard: downgrade Python 3.14 → 3.13 (3.14 has no ARM64 build for Debian 13) - pytest, release, vendor-guard: remain on self-hosted (ARM64 compatible) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
actions/setup-python has no prebuilt binaries for ARM64 + Debian 13. pytest.yml: drop setup-python, create venv from system python3. vendor-guard.yml: revert to ubuntu-latest (simpler than venv approach). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each job creates a fresh venv but now restores ~/.cache/pip so wheels are not re-compiled from source on every run. Cache key is keyed on pyproject.toml hash; falls back to any prior pip cache on miss. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Clear the pipeline-error health flag on the two remaining clean-resolution failure paths (outside coverage, no matching segment), surface a failed pipeline run as sensor unavailability instead of serving stale retained data as current, and make update_checker fail open (and use the correct build_info.json path) instead of silently reporting "up to date" on fetch errors or a missing rowsUpdatedAt field. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_async_ensure_indexnow also checks_index_has_graph_file()so a missing or decayed graph file with intact segments files triggers a re-download instead of silently disabling Level-4 street-graph routing.async_start()so the "GPS Signal Lost" notification can fire even if GPS never reports after a restart._sync_verify_indexno longer scans the entire rtree dataset on every setup/reload; it now touches only the first result to prove the file is readable.dt_utilat module level inbinary_sensor.pyinstead of locally insideis_on(), consistent withcoordinator.py/sensor.py.Found via a workflow-backed code review of the open PR (5 findings, all confirmed).
Test plan
.venv/bin/pytesttargeted subset (index/gps_stale/watchdog/suspension_poll/binary_sensor) — 39 passedtest_sign_retrieval.pyunrelated to this change (blocked sockets, present before this branch)