Skip to content

fix: the chip drift guard was watching a dict nothing used - #803

Merged
quadseven merged 1 commit into
mainfrom
fix/chip-drift-guard-watched-a-decoy
Jul 31, 2026
Merged

fix: the chip drift guard was watching a dict nothing used#803
quadseven merged 1 commit into
mainfrom
fix/chip-drift-guard-watched-a-decoy

Conversation

@quadseven

Copy link
Copy Markdown
Owner

Size: XS

Why

_EFFORT_LABELS was defined and never read. Its test asserted its keys equalled
EFFORTS - a guard on a derived dict, which by construction cannot drift,
so the test could never fail.

Meanwhile _SEVERITY_CHIP and _EFFORT_CHIP - the dicts actually rendered into
every marking - are hand-written and had no guard at all. Adding a level to
review_types would fall through .get() to the bare identifier with nothing
to say so.

Which is precisely the failure the old comment claimed to prevent:

Derived from the shared vocabulary so a new effort level can never silently
drop its chip

The guard was watching a decoy.

What changed

  • Deleted the dead _EFFORT_LABELS
  • Added _chip_vocabulary_drift(), checking SEVERITIES and EFFORTS against
    the dicts that are actually rendered
  • Returned rather than asserted at import: a drifted table should degrade to an
    ugly chip in production, not refuse to import dispatch. The test is where it
    fails loudly
  • The test removes a level, asserts the guard goes red, then restores it. A
    guard nobody has watched fail is a guess

Acceptance criteria

  • The guard covers both dicts that are actually rendered
  • The guard is demonstrated failing, not just passing
  • A drifted chip table does not break module import
  • The dead dict and its tautological test are gone

Out of scope

  • The emoji in the chips themselves. They are non-ASCII, but they are a visible
    product choice in the inline markings, not something to change in passing.
  • Whether Effort should gain more levels. This only ensures that if it does,
    the omission is loud.

Verification

  • 1836 passed, 2 skipped

`_EFFORT_LABELS` was defined and never read. Its test asserted its keys
equalled EFFORTS - a guard on a derived dict, which by construction can
never drift, so the test could never fail.

Meanwhile `_SEVERITY_CHIP` and `_EFFORT_CHIP` - the dicts actually
rendered into every marking - are hand-written and had no guard at all.
Adding a level to review_types would have fallen through `.get()` to the
bare identifier with nothing to say so, which is exactly the failure the
old comment claimed to prevent.

Deleted the dead dict; moved the guard onto the live ones via
`_chip_vocabulary_drift()`. Returned rather than asserted at import, so
a drifted table degrades to an ugly chip in production instead of
refusing to import dispatch; the test is where it fails loudly.

The test also removes a level and asserts the guard goes red, then
restores it. A guard nobody has watched fail is a guess.

Claude-Session: https://claude.ai/code/session_01Weq76G5TQhR9ogo4zCK1Gd
@quadseven
quadseven merged commit 995e3e7 into main Jul 31, 2026
18 checks passed
@quadseven
quadseven deleted the fix/chip-drift-guard-watched-a-decoy branch July 31, 2026 02:15
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