Skip to content

fix(docs): the rail count drifted to five different answers in one commit - #687

Merged
eaitbrahim merged 1 commit into
mainfrom
fix-rail-count-drift
Sep 2, 2026
Merged

fix(docs): the rail count drifted to five different answers in one commit#687
eaitbrahim merged 1 commit into
mainfrom
fix-rail-count-drift

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

guards.check implements twenty rails — 1–14 and 16–21, rail 15 retired. At v0.13.2 the repository stated that number four different ways at once:

where said
guards.py:267 "all twenty rails"
README.md:227 "the 18 rails" ❌ two behind
executor.py:4 "eighteen … rails"
executor.py:93 "eighteen rails"
executor.py:1558 "eighteen rails"

My own sweep caused it

#667 added rail 21 and updated the count by grepping for "nineteen". That found guards.py, glossary.md, the runbook, launch.md and go-live-runbook.md — and never touched the four places saying "eighteen" or "18", which had already been stale since rail 19. Fixing the spelling I happened to search for left the ones I didn't, and nothing failed.

Test first, and it earned it immediately

Writing tests/execution/test_rail_count.py before the fix found five claims where my manual grep had found three — including executor.py's module docstring, which I'd missed entirely.

The count is derived from the numbered rails in guards.check, and every English and numeric spelling is searched repository-wide. Rail 22 fails the suite instead of leaving documents wrong for three releases.

Dated records are excluded, deliberately

docs/research/2026-08-20-quant-lab-note-cross-verification.md says "eighteen rails" and "four rule families" — both were true when a third party's note was verified in August 2026. Updating it would silently rewrite a verification nobody re-ran. docs/experiments, docs/presentations and docs/superpowers are out for the same reason: they state what was true when written.

The contiguity assertion is about the set

Not "sorted, unique, starts at 1". A mutation renumbering rail 21 → 22 passed all three of those — the count held, the order held, 15 was still absent — while a silent gap opened at the top. A gap is the shape this drifts in, so the assertion compares against 1..max minus the retired 15.

Verification

Tests: tests/execution/test_rail_count.py — 2 tests.
4 mutants, 4 killed: README going stale, a docstring going stale, a renumbering that opens a gap, and reuse of the retired rail 15.

Full suite 5249 passed / 3 skipped; ruff and mypy clean.

…mmit (#667 follow-up)

`guards.check` implements TWENTY rails -- 1-14 and 16-21, rail 15 retired. At
v0.13.2 the repository stated that number four different ways at once:

  guards.py:267            "all twenty rails"      correct
  README.md:227            "the 18 rails"          two behind
  executor.py:4            "eighteen ... rails"    two behind
  executor.py:93           "eighteen rails"        two behind
  executor.py:1558         "eighteen rails"        two behind

MY OWN SWEEP CAUSED IT. #667 added rail 21 and updated the count by grepping for
"nineteen" -- which found `guards.py`, `glossary.md`, the runbook, `launch.md` and
`go-live-runbook.md`, and never touched the four places that said "eighteen" or
"18" because those had already been stale since rail 19. Fixing the spelling I
happened to search for left the ones I did not, and nothing failed.

TEST FIRST, and it earned its place immediately: it found FIVE claims where a
manual grep had found three, including `executor.py`'s module docstring. The count
is DERIVED from the numbered rails in `guards.check` and every English and numeric
spelling is searched repository-wide, so rail 22 fails the suite instead of
leaving documents wrong for three releases.

DATED RECORDS ARE EXCLUDED, and this is a rule rather than a convenience.
`docs/research/2026-08-20-quant-lab-note-cross-verification.md` says "eighteen
rails" and "four rule families", and BOTH WERE TRUE when a third party's note was
verified in August 2026. Updating it would silently rewrite a verification nobody
re-ran. `docs/experiments`, `docs/presentations` and `docs/superpowers` are out
for the same reason: they are statements about what was true when written.

The contiguity assertion is about the SET, not about "sorted, unique, starts at
1". A mutation renumbering rail 21 to 22 passed all three of those -- the count
held, the order held, 15 was still absent -- while a silent gap opened at the top.
A gap is the shape this drifts in.

4 mutants, 4 killed: README going stale, a docstring going stale, a renumbering
that opens a gap, and reuse of the retired 15.

Tests: `tests/execution/test_rail_count.py` (2 tests).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NzuKAe2RVrPt9acVAWjRyL
@eaitbrahim eaitbrahim self-assigned this Sep 2, 2026
@eaitbrahim
eaitbrahim merged commit 63dbed7 into main Sep 2, 2026
4 checks passed
@eaitbrahim
eaitbrahim deleted the fix-rail-count-drift branch September 2, 2026 09:11
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