Preserve unresolved diagnostic causes in fresh heartbeat snapshots - #475
Merged
Merged
Conversation
…rting Constraint: Fresh live snapshots represent current blockers even after an error has persisted longer than the evidence window. Rejected: Refresh blocker timestamps on every heartbeat | Would overwrite when the failure was actually observed. Confidence: high Scope-risk: narrow Directive: Preserve signal-absence and stale-snapshot precedence; never infer why contact stopped. Tested: Targeted 41 tests with RED-to-GREEN regression; typecheck; captured physical-device evidence reevaluation; diff check Not-tested: Production runtime pending exact-commit CI and release deployment
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.
A physical-device authentication failure remained in fresh heartbeat snapshots, but after three minutes the server discarded its stage and reason as stale. The classifier now retains unresolved blockers carried in a fresh live snapshot, while stale contact, stale snapshots, and invalid/future/reversed blocker timestamps still produce unknown states. Removing the blocker from the next fresh snapshot clears the diagnosis.
Closes #473. Change control: EVNSolution/clever-change-control#307 (parent #145). Follow-up to #474, found during final Android 1.3.4(40) acceptance before production deployment. App companion #294 in EVNSolution/clever-routes-app; #291 remains excluded.
Validation: 41 focused diagnostic tests passed after demonstrating four new failures before the fix; typecheck and diff check passed. Re-evaluating the captured physical heartbeat changes UNKNOWN_INSUFFICIENT_EVIDENCE to AUTH_OR_ROUTE_BLOCKED with its original reason and failure time. Exact-head Node22 CI passed: https://github.com/EVNSolution/clever-route-server/actions/runs/36978669938. Independent review CLEAR; exact-candidate localhost runtime regenerates Prisma and receives physical-device HEALTHY/current GPS/queue0.
Concurrent Work Gate: allowed-with-non-overlap with open #463/#460/#427/#402. One narrow PR covers diagnostic projection, its regressions and the owning API document. No database schema/migration, runtime configuration, production delivery data, notification or app source changes.
Context completion: the owning API contract documents live-snapshot blocker semantics; service ownership, deploy profile and secret categories are unchanged, so no additional global context update is needed. Production deployment remains held until this correction passes review and exact main-push CI.