Repository navigation
Make invariant lockedness a standing lint instead of a seven-day waiting period - #11981
Merged
Merged
Conversation
The registry's promotion rule — seven days unchanged before `proposed` can become `locked` — has never once operated. No invariant has ever been promoted; every locked one was born locked, two of them six days after the rule was written. The only status transition in the registry's history was a demotion. Obligations that live at T+n with no event at T+n do not get honoured, especially where the work is done by episodic agents whose session ended at T. Replace the waiting period with continuous verification. check_product_invariants now audits the registry on every run: every path a locked doc names under Guard tests must exist, any check_*.py it names must be wired into the checks manifest, and the index must match the directory both ways. Locked becomes a machine-checked claim rather than an earned status, and it is checked every day rather than once. That audit immediately found the rot it was written for, all of it on main: - INV-AUTH-1 and INV-CHAT-1 each name a guard test that moved into VoiceTurnDomainTests/ and was never updated in the doc - INV-BETA-1 names a smoke script at the wrong path, and is absent from the index table entirely while being locked and enforced - INV-DATA-1's two retired-path globs carry trailing notes, so the parser silently dropped them and they enforce nothing - INV-MEM-5 has a prose line under Path globs that is likewise ignored Paths corrected, index row added, glob parsing now accepts a trailing note, and a bullet under Path globs that does not parse as a glob is an error rather than a comment. Two further changes: Whole-tree globs (`backend/**`, `desktop/macos/Desktop/Sources/**`, ...) may no longer require citation. Taxing every PR in a tree is how a citation becomes a token people paste without reading; such invariants must let the guard carry the floor and opt out of naming, which is what INV-UI-1 already does. The failure output now prints each matched invariant's Statement and MUST NOTs. The citation was never an attention mechanism — the checker prints a paste-ready block, so satisfying it costs one paste. What it can do is route the rule into the context of whoever is editing those files, which is the property worth having when the editor is an agent that has never read the doc. Co-Authored-By: Claude Opus 5 <[email protected]>
Ratification. All seven proposed invariants become locked, which is now a claim the audit verifies continuously rather than a status someone earns by waiting: - INV-TASK-1, INV-CHAT-2, INV-NAV-1, INV-CUTOVER-1 lock as-is; their guards all exist and their globs are narrow (4, 5, 21 and 21 tracked files). - INV-MEM-4 locks with a correction. It named test_ws_i_write_convergence.py, 1,398 lines, which 5724a10 deleted while converging memory and task authority; the doc was never updated. The reference is removed so the remaining sixteen guards can be verified, and the gap is recorded in the doc rather than quietly dropped — whether that coverage was absorbed elsewhere is the memory owner's call. - INV-DATA-1 locks with its two retired-path globs narrowed to what the doc says they are for. `backend/charts/**` covered 630 files to express "no GKE desktop-backend chart may return"; the chart is absent, so `backend/charts/desktop-backend/**` states exactly that and fires only on resurrection. `.github/workflows/**` becomes the deploy workflows. 713 taxed files becomes about 35. A citation that fires on every chart edit trains people to paste the token unread. - INV-MEM-5 locks with naming opted out. Its globs cover both desktop application trees, so citation would fire on every desktop PR. Locking still buys continuous verification of its guards; the guards carry the floor, as INV-UI-1 already does. Reporting. The check now says why an invariant applies, not just that it does. Each changed file is attributed to every glob that caught it — when two globs match, naming only the first hides half the reason — and `--print` annotates each glob with how many tracked files it covers, so an over-broad glob is visible before it becomes ritual. The failure briefing prints the full MUST NOT list rather than the first six. Breadth is reported, not enforced: it changes as the tree grows, and a threshold that fails a PR because an unrelated directory got bigger would be another gate keyed to something other than the change under review. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
cursor Bot
pushed a commit
that referenced
this pull request
Aug 21, 2026
Resolve the invariant-registry index conflict from #11981: keep main's locked rows and INV-BETA-1, and lock INV-TASK-2 now that lockedness is a standing lint rather than a seven-day soak. Co-authored-by: David Zhang <[email protected]>
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.
The registry's promotion rule — seven days unchanged before
proposedcan becomelocked— has never once operated.proposed→locked.the soak rule was written.
proposed; the oldest is three and a half weeks past itsown soak. Four carry self-imposed promotion dates that nobody honoured.
An obligation that lives at T+n needs an event at T+n. There isn't one, and the
work here is done largely by agents whose session ended at T. So the rule cannot
work, and adding an alarm to it would only produce date-bumping.
What replaces it
Lockedness becomes a claim the checker verifies continuously rather than a status
someone earns once. On every run,
check_product_invariants.pynow audits theregistry itself:
.github/scripts/check_*.pyit names must be wired into the checks manifestAn invariant may now be born locked. Demotion stays the cheap escape when a
statement changes — edit the doc, set
proposed, same PR. That is precedented andcost one line the one time it was needed.
The audit found the rot it was written for — all of it already on main
INV-AUTH-1andINV-CHAT-1each name a guard test that moved intoVoiceTurnDomainTests/; the docs still point at the old pathsINV-BETA-1names a smoke script at the wrong path, and is missing from theindex table entirely while being locked and enforced
INV-DATA-1's two retired-path globs carry trailing notes, so the parsersilently dropped them — they enforce nothing today
INV-MEM-5has a prose line under Path globs that is likewise ignoredPaths corrected, index row added. Glob parsing now accepts a trailing note, and a
bullet under Path globs that does not parse as a glob is an error rather than
being silently discarded.
Two further changes
Whole-tree globs may not require citation. A glob rooted at
backend/**ordesktop/macos/Desktop/Sources/**taxes every PR in that tree, which is preciselyhow a citation degrades into a token people paste unread. Such invariants must let
their guard carry the floor and opt out of naming — the pattern
INV-UI-1alreadyuses. Enforced by the audit.
Failures now print the rule, not just the ID. The citation was never an
attention mechanism: the checker prints a paste-ready block, so compliance costs
one paste. What it can do is route the invariant's Statement and MUST NOTs into
the context of whoever is editing those files. When that editor is an agent that
has never opened the doc, that is the whole value.
Ratification
All seven stuck invariants become
locked— meaningful now that lockedness is averified claim rather than an unearned status. Per invariant:
INV-MEM-4 named a guard that no longer exists.
test_ws_i_write_convergence.py— 1,398 lines — was deleted by
5724a10084while converging memory and taskauthority, and the invariant that depended on it was never updated. The reference
is removed so the remaining sixteen guards can be verified continuously, and the
gap is recorded in the doc rather than quietly dropped. Whether that coverage was
absorbed elsewhere is the memory owner's call, and worth confirming.
INV-DATA-1's retired globs were far broader than their purpose.
backend/charts/**covered 630 files to express "no GKE desktop-backend chart mayreturn"; that chart is absent, so
backend/charts/desktop-backend/**says exactlythat and fires only on resurrection.
.github/workflows/**becomes the deployworkflows. This is a judgement call on someone else's invariant and worth a look
from its owner — but a citation that fires on every chart edit is how a citation
stops being read.
INV-MEM-5 is locked but does not require naming. Its globs cover both desktop
application trees. Locking buys continuous verification of its guards; the guards
carry the floor.
Finer-grained reporting
The check now says why an invariant applies, not just that it does:
match, naming only the first hides half the reason
--printannotates each glob with how many tracked files it covers, so anover-broad glob is visible before it becomes ritual
Breadth is reported, not enforced. It changes as the tree grows, and a threshold
that failed a PR because an unrelated directory got bigger would be another gate
keyed to something other than the change under review.
What this PR deliberately does not do
Review-bycheck. It has no good branch: fail globally and anunrelated PR is blocked by someone else's stale doc, so the date gets bumped;
fail only on PRs touching the stale doc and it never fires.
proposedisredefined as a stable resting state — a design note — not a queue.
Verification
python3 .github/scripts/test_check_product_invariants.py— 37 tests, includingthe audit failing on each rot shape above and passing on this repository.
Product invariants affected
none
Failure class (fixes)
Failure-Class: none