Commit 682c98d
docs(agents): write down the shape a --self-test must have to be capable of failing (#18227)
Fixes #15410
Clause-②: no
Reason: this is PROSE in `AGENTS.md` plus one ratchet ceiling raised by
a maintainer-ruled amount. No gate rule, threshold, ledger, exemption
list or population is widened — nothing that used to be refused is now
admitted.
⛔ **GOVERNED SURFACE.** `AGENTS.md` is the rules layer. Review is
requested from both authorized approvers (`GOVERNED_APPROVERS` =
os-zhuang, hotlong). The dispatching seat will not arm auto-merge, will
not enqueue and will not merge this. It lands by human approval or not
at all.
## The ruling this revision executes, quoted
Maintainer ruling on **decision batch #135 item 4**, verbatim and
untranslated:
> 135 同意
The form it was presented in, verbatim and untranslated:
> B,目标 ≤ 24 行,并按实测行数抬上限
Recorded on #15410 as comment 5682595374. That ruling also (a) answers
`os-zhuang`'s CHANGES_REQUESTED question 「这个关键文件没有长度限制吗?」 — yes, and
this is the raise; (b) refuses option D, the cross-file move; and (c)
rules that ⛔ no other ceiling moves.
## What changed since the CHANGES_REQUESTED round
The previous round landed the section at **41 lines** and left
`check:pm-skill-ratchet` **RED** on purpose, because raising a ceiling
is a human-floor item. The ruling adopts letter **B**. This revision
therefore:
1. **Compresses the section to its judgeable clauses** — the
assertion-floor rule, the verdict-handshake rule, and one pointer line.
41 → **24 lines including the heading**.
2. **Moves the two worked non-handshake shapes** into
`docs/audits/2026-09-self-test-shape-census.md`. ⛔ They were not deleted
— see the reading below.
3. **Raises `['AGENTS.md', 1075]` to `1099`** in
`scripts/pm/check-skill-line-ratchet.mjs` — exactly the measured count,
not one line more. ⛔ `['AGENTS.md', 768]` in the widest-row table is
untouched, and ⛔ no other entry in that map moved.
⛔ No existing rule line was deleted to pay for anything, and ⛔ no
re-wrap was used as currency.
## The measurement, and the two numbers that must agree
| reading | value |
|:--|--:|
| compressed section, heading through its closing separator | **24
lines** |
| `AGENTS.md` on `origin/main` | 1075 lines |
| `AGENTS.md` on this branch | **1099 lines** |
| ceiling before / after | 1075 / **1099** |
| the raise | **+24** |
The raise equals the measured section count exactly. Independently
checkable: `git diff origin/main...HEAD --numstat` reads `24 0
AGENTS.md`.
**The ratchet, before and after, quoted from its own verdict lines.**
Before (the state `os-zhuang` reviewed):
```
✗ check-skill-line-ratchet: AGENTS.md is 1116 lines; the ratchet ceiling is 1075. ...
Raising a ceiling requires a maintainer ruling quoted in the PR.
```
After compression, before the ceiling edit — the same gate's **second**
axis fired, which is why the pointer is two physical lines and not one:
```
✗ check-skill-line-ratchet: AGENTS.md has 1 line(s) over the 120-byte budget: L1048 (170B).
```
Now:
```
✓ check-skill-line-ratchet: AGENTS.md is 1099 lines (ceiling 1099; headroom 0).
✓ check-skill-line-ratchet: AGENTS.md: widest table row is 768 bytes (pin 768; headroom 0).
✓ check-skill-line-ratchet self-test: 157 cases pass.
```
Headroom is 0 again by construction: the next author needing a line is
back to compressing.
## The two ACCIDENT examples are readable in the audit document
They landed under `### The ACCIDENT` in
`docs/audits/2026-09-self-test-shape-census.md`, in a new subsection at
**line 130**, as a side-by-side code block naming what each dispatch
does under an early `return`:
- `process.exit(selfTest());` — the DEFEATED shape, at line 138.
- `process.exit(selfTest() === 0 ? 0 : 1);` — the ACCIDENT shape, at
line 140.
Readings, with a fire control so a zero would be visible:
| grep | count |
|:--|--:|
| `### The ACCIDENT` (positive control) | 1 |
| `process.exit(selfTest());` in the new block | 1 (plus 2 pre-existing
rows in the 4-DEFEATED block) |
| `selfTest() === 0` | 1 |
| `selfTest() !== 0` (fire control — must be absent) | **0** |
## What the compressed section still says
- **Floor** — pin battery NAMES with a per-battery minimum. Fail when a
declared battery under-registers, when a registered case names no
declared battery, or when the roster itself falls below its pinned
battery count. ⛔ A printed count is evidence, not proof; one pinned
TOTAL rots the moment a sibling battery grows.
- **Handshake** — the verdict sets a module-level flag and the dispatch
refuses when it is unset, and SAYS the self-test never reached its
verdict. ⛔ An exit code alone is not a handshake.
- **Copy a landed one, ⛔ never import one** —
`scripts/check-agent-model-declared.mjs` carries all three parts; every
self-test must keep running standalone.
- **One pointer line** at
`docs/audits/2026-09-self-test-shape-census.md` and the
`scripts/measure-self-test-floor.mjs` docblock.
What left the file: the incident narrative, the 2026-09-05 census
totals, and the two worked shapes.
1 parent 2a4a796 commit 682c98d
3 files changed
Lines changed: 63 additions & 1 deletion
File tree
- docs/audits
- scripts/pm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1029 | 1053 | | |
1030 | 1054 | | |
1031 | 1055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
132 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1361 | 1361 | | |
1362 | 1362 | | |
1363 | 1363 | | |
1364 | | - | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
1365 | 1384 | | |
1366 | 1385 | | |
1367 | 1386 | | |
| |||
0 commit comments