Skip to content

Record #744's hand-copy guard lesson in mechanisms.md - #746

Merged
derek73 merged 2 commits into
masterfrom
docs/hand-copy-guard-lesson
Oct 19, 2026
Merged

derek73 merged 2 commits into
masterfrom
docs/hand-copy-guard-lesson

Conversation

@derek73

@derek73 derek73 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Records the lesson from #744's review in docs/design/mechanisms.md, as AGENTS.md's "write the check down where the next person will meet it" rule asks. It amends the existing Field notes bullet "Mutation-test a new guard before believing it" rather than adding a new one.

The lesson. A guard over a hand copy of a pipeline set (tools/vocab/build.py's check 2) went vacuous twice in one review:

  • Pinning copies to their sources sees only what was copied. Emoji had no copy and no check, so dr★ compiled and the test passed.
  • A sweep that accepts any refusal lets another check answer for this one. The space in dr x passed because the phrase-title check refused it.

The fix that held: drive the sweep from _tokenize._ignorable (the tokenizer's own predicate), match check 2's own messages, and record the negative control.

New in this PR: the sweep's limit. The design-docs review measured that hiding the CJK-interpunct check (rules/T3) still passes the sweep. The tokenizer divides at that interpunct by context in _tokenize_region, not in _ignorable, What holds that check is its MUTATIONS row (text-with-an-east-asian-interpunct, input 先·生); the EAST_ASIAN_RANGES and INTERPUNCT pins hold only the copies and stay green with the check gone. The note says so, and the test's comment now names the row instead of implying the sweep covers every class.

Checks

  • uv run pytest tests/v2 -k "doc or design or tokenizer_ignores": 1085 passed
  • ruff: clean
  • design-docs-reviewer: three findings, all fixed (an overgeneral control claim, the wrong history of the first test, and "any VocabError" overstated)
  • code and comment reviewers: one critical, fixed — the first version said only the pins held the interpunct check; the mutation row does. Also cites the review by PR number and narrows "would pass"

🤖 Generated with Claude Code

@derek73 derek73 added the docs Documentation fixes and updates label Oct 19, 2026
@derek73 derek73 self-assigned this Oct 19, 2026
A guard over a hand copy of a pipeline set went vacuous twice in one
review: pinning copies missed an uncopied class (emoji, `dr★`), and a
sweep accepting any refusal let an unrelated check answer (space, `dr x`).
Amends the mutation-test field note with the fix that held, and names the
interpunct as the class the predicate-driven sweep cannot reach, both in
the note and in the test's comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 force-pushed the docs/hand-copy-guard-lesson branch from 7db3255 to 83f5102 Compare October 19, 2026 18:49
@derek73 derek73 added this to the 2.6 milestone Oct 19, 2026
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (90f6d2c) to head (8379a2f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #746   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files          47       47           
  Lines        4642     4642           
=======================================
  Hits         4598     4598           
  Misses         44       44           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The pins hold the copied constants and stay green with the check gone;
the text-with-an-east-asian-interpunct MUTATIONS row is what fails.
Also cites the review by PR number and narrows 'would pass' to the case
where a later check happens to refuse the test text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 59d332d into master Oct 19, 2026
12 checks passed
@derek73
derek73 deleted the docs/hand-copy-guard-lesson branch October 19, 2026 19:38
derek73 added a commit that referenced this pull request Oct 19, 2026
…s.md, compact shipped measurements (#759) (#764)

* Archive decisions/differential-ledger to tombstones and the retirement entry (#759)

The ledgers #664 retired took 33,103 words across eleven arcs, every
one superseded by the snapshot. Each arc is cut to a tombstone under
decisions/README's rule 3 (date, issue, verdict, SUPERSEDED by
2026-10-13 #664); the retirement entry stands in full. The three
passages other entries cite stay as one line each: the 'Donald mc'
decline (decisions/suffix-acronym-collisions, decisions/v1-xfail-triage),
the initials view (decisions/R4, the 2.3.0 release log) and the
Policy-annotation Declined entry (decisions/3-0-reevaluations). The
full text is pointed to at fe85bb3.

mechanisms.md#RECORDED-ROSTERS said the entry keeps the ledger
rosters' measurements; it now points to git through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tidy mechanisms.md: one paragraph per label, contracts without case history (#759)

Every entry's template labels (Problem shape, Contract statement, How
it works, Lives in, Reach for it when) now open their own paragraph.
That is load-bearing and the preamble says so: test_doc_citations
reads a Contract statement to the end of its paragraph, so in the
one-paragraph layout every sentence of an entry was quotable.

ONE-PREDICATE-PER-QUESTION (1,856 words) and RENDER-HONORS-THE-PARSE
(2,771) are cut to their contract, a short How it works and pointers.
The two sentences code comments quote from outside the old contract
proper ("where the reader comes AFTER the decider, ..." in _group.py,
"a token the parse never saw ..." in _render.py) move into the
Contract statement paragraphs, so no comment in nameparser/ changes.
The instance census and the case history are in git at fe85bb3 and in
the decisions entries the rosters now name; the one piece no decisions
entry held, the facade's spliced-field divergence under a caller's
conjunction (#528, measured 2026-09-13 and re-run on this tree), moves
to decisions/R3 as a dated entry.

LEDGER-RULE-SEPARATION and CROSS-RULE-OUTCOME-PINS, both already
"Retired with the ledgers" stubs living in nothing, are removed; the
only references left are prose names in decisions/differential-ledger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Compact shipped measurements and superseded passages in the largest decisions files (#759)

A sweep under decisions/README's rule 3 over the 22 largest files after
differential-ledger, every change checked shipped in v2.5.0 or earlier
(the unshipped PRs are #737, #741-#746, #755, #756). Three triggers
only: a whole entry headed SUPERSEDED by, cut to a tombstone; a
superseded passage inside a live entry, cut to its decision and what
replaced it; a measurement paragraph of a shipped change (what moves,
cost, blast radius, gate and grid results), cut to one line naming
population, counts, baseline and PR. Verdicts, reasons, Accepted costs,
Declined/Excluded/Open blocks, measurements of declined or unshipped
changes, harvested framing lines, and anything quoted or pointed at
from elsewhere stay. RECOMPUTE recipes a release-log bullet rests on
stay; others fold into the one line with their PR.

The two #731 entries (decisions/M2, decisions/T4), reverted by PR #733
the same day, gain the SUPERSEDED by marker rule 1 asks for and become
tombstones.

About 13,400 words come out across the 22 files (M2 14,882 -> 12,190,
R4 13,819 -> 12,877, the rest listed in the PR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix the design-docs review's findings on the #759 trim

- decisions/T4: the #731 tombstone had cut a gap and a declined option
  that predate #731 (ad486f6) and still stand; both are restored
  verbatim under the tombstone, re-measured on this tree.
- decisions/differential-ledger: the tombstones keep the tooling and
  dormancy arcs' harvested framing lines (rule 3: "a tombstone
  included"); the `_check_tree` and DEFAULT_BASELINE Declined entries,
  about code and process that survive the ledgers, stand as written;
  the initials-view tombstone says the 2.3.0 release bullet's evidence
  is at fe85bb3.
- decisions/H5: the population line no longer calls `毛 泽东 Dr.` a
  rules example; the #623 line keeps the corpus-and-case-text null
  result and the 500-parse characterization; three bold heads keep
  their closing period.
- decisions/S2: the #614 line no longer classifies the stress grid's
  8,472 movers, which were not classified; it gives the 12-parse slice
  that was.
- decisions/S6: the frame totals decisions/S9 says "hold exactly" are
  back; the verification-round head keeps "AND ITS RECIPE".
- decisions/R3: the facade spliced-field divergence moved from
  mechanisms.md is a continuation of the 2026-09-13 #528 entry rather
  than a second entry of that date, so the existing pointers to "the
  2026-09-13 #528 bullet" resolve to one entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix the second review's findings; record the compaction traps in rule 3 (#759)

- decisions/differential-ledger: the initials-view tombstone gave the
  cluster sizes as 19 / 66 / 11 / 2, which is cluster (iii) split by
  vocabulary; the three clusters are 27 / 14 / 98.
- decisions/T4: the restored gap paragraph was written under #731 and
  names "the committed grid", which the revert deleted; the lead now
  says so, points at PR #732, and scopes the re-measurement (the 108
  and the readings hold on a rebuild; the 270 was not re-run).
- decisions/H5: the #623 frames line said frames move "only" where a
  part holds a particle; the names without one moved too, and pay less.
- decisions/README rule 3 gains the two traps the reviews found, so
  the next compaction meets them: a tombstone keeps what the entry
  recorded about the state before its change, and a one-line
  replacement keeps each count's own classification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Scope T4's declined-option claim; fold the tombstone trap into rule 3's definition (#759)

Third review round, on a4fed35:
- decisions/T4: the lead scoped only the 270 as un-re-run; the
  paragraph's "closes both (0 field and 0 report differences)" is the
  same #731-era measurement. An approximation of the option re-run
  2026-10-19 closes the fields but leaves 27 of 396 rebuilt pairs
  differing in their reports, so the lead now says the claim is
  #731's, unconfirmed since.
- decisions/README rule 3: the new trap sentence changed what a
  tombstone keeps without amending the definition two sentences
  earlier, which still read as a complete list. The definition now
  says it, and the trap sentence keeps only the one-line-replacement
  half.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation fixes and updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant