Conversation
k_infra stepped back seven rows per window, so nine daily snapshots over eight days reported "two consecutive weeks" and fired the stop rule; with a sparse series the same arithmetic runs the other way and overstates a window. Both readings contradict DIRECTION.yaml, which says two consecutive cadence weeks. A week is now seven elapsed days. Boundaries walk back one week at a time from the newest snapshot, each measured from the boundary before it, so a missing day pushes the chain further back rather than collapsing a window. A pair that cannot be resolved that way is not computable, with the reason stated, and a rule that cannot be evaluated does not fire — the series has real gaps, and an unknown must not be read as a refutation. On the live series the old arithmetic spanned 2026-08-28 to 2026-09-18, its two "weeks" being 14 days and 7 days because the rows are sparse. It now reports two seven-day windows over 2026-09-03 to 2026-09-18. Evidence moved in both; not fired either way. tests/test_direction_k_infra.py pins the boundaries the defect crossed: 7, 8 and 13 days cannot fire, 14 days can, evidence movement in either window blocks it, a gap shifts the chain instead of shortening a window, and the year, ISO 52-to-1, ISO 53-to-1 and DST crossings are non-events because the rule counts dates. Registered in the manifest so it runs where the other checks run.
This branch has not been deployed
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.
k_infrastepped back seven rows per window. Nine daily snapshots over eight days therefore reported "two consecutive weeks" and fired the stop rule; on a sparse series the same arithmetic runs the other way and overstates a window.research/DIRECTION.yamlsays two consecutive cadence weeks.Reproduced against the live function before changing it: nine synthetic daily rows returned
span 2026-09-01 to 2026-09-09, windows 2, fired True— eight calendar days presented as two weeks.What changed
A week is seven elapsed days. Boundaries walk back one week at a time from the newest snapshot, each measured from the boundary before it, so a missing day pushes the chain further back instead of collapsing a window. A pair that cannot be resolved that way is not computable, with the reason stated, and a rule that cannot be evaluated does not fire. The series has real gaps; an unknown must not be read as a refutation.
Semantics chosen by the owner this session, over the stricter alternative (exact 7-day boundary snapshots), because the cadence cron has never run on this host: exact boundaries would make K-INFRA "not computable" today — the 2026-09-11 row is missing — and a kill condition that is silently disabled by a missed day is worse than one that waits for the data.
Live series
Evidence moved in both windows; not fired either way.
metrics/repo_state.jsonlis untouched.Verification
tests/test_direction_k_infra.py: 18 tests — 7, 8 and 13 days cannot fire; 14 days can; evidence movement in either window blocks it; a gap shifts the chain rather than shortening a window; unordered, duplicate, invalid and missing-counter rows are not computable; year, ISO 52→1, ISO 53→1 and DST crossings are non-events because the rule counts dates.CHECKStuple, so it runs where the other checks run.python3 scripts/verification_manifest.pyexits 0.docs/graph/repo-graph.jsonand.mmdregenerated, not hand-edited.scripts/direction.pycarries nosha256pin inclaims.yaml, so no re-pin is required.