Skip to content

Make invariant lockedness a standing lint instead of a seven-day waiting period - #11981

Merged
Git-on-my-level merged 2 commits into
mainfrom
chore/invariant-registry-standing-lint
Aug 21, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
chore/invariant-registry-standing-lint

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

The registry's promotion rule — seven days unchanged before proposed can become
locked — has never once operated.

  • No invariant has ever been promoted proposed → locked.
  • Every currently-locked invariant was born locked, two of them six days after
    the soak rule was written.
  • The only status transition in the registry's history is a demotion.
  • Seven invariants sit proposed; the oldest is three and a half weeks past its
    own 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.py now audits the
registry itself:

  • every path a locked doc names under Guard tests must exist
  • any .github/scripts/check_*.py it names must be wired into the checks manifest
  • the index and the directory must agree, both directions

An 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 and
cost 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-1 and INV-CHAT-1 each name a guard test that moved into
    VoiceTurnDomainTests/; the docs still point at the old paths
  • INV-BETA-1 names a smoke script at the wrong path, and is missing 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 — they enforce nothing today
  • 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
being silently discarded.

Two further changes

Whole-tree globs may not require citation. A glob rooted at backend/** or
desktop/macos/Desktop/Sources/** taxes every PR in that tree, which is precisely
how 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-1 already
uses. 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 a
verified claim rather than an unearned status. Per invariant:

Invariant Files taxed Disposition
INV-TASK-1 4 Lock as-is
INV-CHAT-2 5 Lock as-is
INV-NAV-1 21 Lock as-is
INV-CUTOVER-1 21 Lock as-is
INV-MEM-4 119 Lock; one guard corrected (below)
INV-DATA-1 713 → ~35 Lock; two retired globs narrowed to their stated intent
INV-MEM-5 2,335 Lock with naming opted out; guards carry the floor

INV-MEM-4 named a guard that no longer exists. test_ws_i_write_convergence.py
— 1,398 lines — was deleted by 5724a10084 while converging memory and task
authority, 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 may
return"; that chart is absent, so backend/charts/desktop-backend/** says exactly
that and fires only on resurrection. .github/workflows/** becomes the deploy
workflows. 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:

  • each changed file is attributed to every glob that caught it — when two globs
    match, naming only the first hides half the reason
  • --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 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

  • No expiry or Review-by check. It has no good branch: fail globally and an
    unrelated 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. proposed is
    redefined as a stable resting state — a design note — not a queue.

Verification

python3 .github/scripts/test_check_product_invariants.py — 37 tests, including
the audit failing on each rot shape above and passing on this repository.

Product invariants affected

none

Failure class (fixes)

Failure-Class: none

Git-on-my-level and others added 2 commits August 20, 2026 23:03
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]>
@Git-on-my-level
Git-on-my-level merged commit 41afef9 into main Aug 21, 2026
29 checks passed
@Git-on-my-level
Git-on-my-level deleted the chore/invariant-registry-standing-lint branch August 21, 2026 03:16
@mintlify

mintlify Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🔴 Failed – Aug 21, 2026, 3:19 AM

💡 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant