AGENTS.md section 11 requires ASCII-only code paths and no check enforces it; main carries 750 non-ASCII lines #1578

Closed
opened 2026-10-13 00:03:33 +02:00 by quartermaster · 2 comments
Owner

AGENTS.md section 11 requires three code paths to be ASCII-only and nothing checks it, so main carries 750 non-ASCII lines across 30 files.

The rule covers scripts/*.sh, tests/*.bats and .forgejo/workflows/*.yml. Measured on main at e830e94 by two readers independently: 30 files, 750 lines, tests/workflows.bats alone with 239. No check under cmd/, internal/, scripts/, tests/ or .forgejo/ reads the property -- and that main is green while carrying the drift is itself the proof.

Worked instance: #1577 added three em-dashes to scripts/pr-gates.sh and tests/pr-gates.bats, and all 18 CI contexts passed. A human reading AGENTS.md caught it. The consequence is measured, not theoretical -- on bats 1.11.0 the em-dash in a test name made that arm vanish, Executed 28 instead of expected 29, exit 1.

The remedy is the operator's call, because the options differ in cost rather than correctness:

  • Sweep and gate -- repair the 750 lines, then gate it. Honest to the rule as written, large mechanical diff across 30 files.
  • Narrow the rule -- gate only what demonstrably breaks (test names, log() lines bats asserts on), relax the rest to a convention. Smaller, and admits the rule has been aspirational.

Acceptance criteria:

  • The operator has chosen sweep-and-gate or narrow-the-rule. - DONE @ #1579 (f87c0d37b7, reviewed as f87c0d37b7)
  • A check fails on a new violation in the paths the rule still claims, pinned by a mutation that introduces one. - DONE @ #1579 (f87c0d37b7, reviewed as f87c0d37b7)
  • Section 11 states the scope the check actually enforces. - DONE @ #1579 (f87c0d37b7, reviewed as f87c0d37b7)

Found by Surveyor in review 7476 of #1577, measured by both of us. Filed by the finder: Bosun's pane is stale, so the designated filer was unreachable.

AGENTS.md section 11 requires three code paths to be ASCII-only and nothing checks it, so main carries 750 non-ASCII lines across 30 files. The rule covers `scripts/*.sh`, `tests/*.bats` and `.forgejo/workflows/*.yml`. Measured on `main` at `e830e94` by two readers independently: 30 files, 750 lines, `tests/workflows.bats` alone with 239. No check under `cmd/`, `internal/`, `scripts/`, `tests/` or `.forgejo/` reads the property -- and that main is green while carrying the drift is itself the proof. Worked instance: #1577 added three em-dashes to `scripts/pr-gates.sh` and `tests/pr-gates.bats`, and all 18 CI contexts passed. A human reading AGENTS.md caught it. The consequence is measured, not theoretical -- on bats 1.11.0 the em-dash in a test name made that arm vanish, `Executed 28 instead of expected 29`, exit 1. The remedy is the operator's call, because the options differ in cost rather than correctness: - **Sweep and gate** -- repair the 750 lines, then gate it. Honest to the rule as written, large mechanical diff across 30 files. - **Narrow the rule** -- gate only what demonstrably breaks (test names, `log()` lines bats asserts on), relax the rest to a convention. Smaller, and admits the rule has been aspirational. Acceptance criteria: - [x] The operator has chosen sweep-and-gate or narrow-the-rule. - DONE @ #1579 (f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4, reviewed as f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4) - [x] A check fails on a new violation in the paths the rule still claims, pinned by a mutation that introduces one. - DONE @ #1579 (f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4, reviewed as f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4) - [x] Section 11 states the scope the check actually enforces. - DONE @ #1579 (f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4, reviewed as f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4) Found by Surveyor in review 7476 of #1577, measured by both of us. Filed by the finder: Bosun's pane is stale, so the designated filer was unreachable.
Author
Owner

Operator decision, 2026-10-13: sweep and gate whole files.

I put three options to Alex with the measurement that distinguishes them, rather than asking cold:

                        total   comments(inert)   LIVE(can break)   unclassified
scripts/*.sh               74          53               18               3
tests/*.bats              281         211                9              61
.forgejo/workflows/*.yml  395         303               79              13
                          ---         ---              ---              --
                          750         567              106              77

Also measured, and it narrowed one of §11's own stated reasons: workflow-parse-check.sh grades all 26 workflows with the pinned Forgejo validator and is green on main with 18 of them carrying non-ASCII — so the validator does not reject them today.

The options were sweep-and-gate (repair all 750, gate whole files), narrow-the-rule (gate only hazardous positions, ~106 lines, leave 567 comment lines as prose), and gate-new-violations-only (grandfather the existing drift). Alex chose the first, with the cost stated up front: a large mechanical diff across 30 files, mostly comment prose.

One thing I got wrong in presenting it: I described sweep-and-gate as having "zero judgement calls at the border." It has six, and one of them fails silently — the contracts-doc grammar delimiter. That is why the gate carries a declared exemption table rather than a clean sweep, and it is recorded in AGENTS.md §11 under When the character is LOAD BEARING.

AC1 is satisfied. The criteria tick after the merge per AGENTS.md §15 step 6.

Operator decision, 2026-10-13: **sweep and gate whole files.** I put three options to Alex with the measurement that distinguishes them, rather than asking cold: ``` total comments(inert) LIVE(can break) unclassified scripts/*.sh 74 53 18 3 tests/*.bats 281 211 9 61 .forgejo/workflows/*.yml 395 303 79 13 --- --- --- -- 750 567 106 77 ``` Also measured, and it narrowed one of §11's own stated reasons: `workflow-parse-check.sh` grades all 26 workflows with the pinned Forgejo validator and is green on `main` with 18 of them carrying non-ASCII — so the validator does not reject them today. The options were sweep-and-gate (repair all 750, gate whole files), narrow-the-rule (gate only hazardous positions, ~106 lines, leave 567 comment lines as prose), and gate-new-violations-only (grandfather the existing drift). Alex chose the first, with the cost stated up front: a large mechanical diff across 30 files, mostly comment prose. One thing I got wrong in presenting it: I described sweep-and-gate as having "zero judgement calls at the border." It has six, and one of them fails silently — the contracts-doc grammar delimiter. That is why the gate carries a declared exemption table rather than a clean sweep, and it is recorded in AGENTS.md §11 under *When the character is LOAD BEARING*. AC1 is satisfied. The criteria tick after the merge per AGENTS.md §15 step 6.
Author
Owner

Landed and closed by hand.

landed SHA   f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4
PR           #1579, merged rebase, head branch deleted
approval     review 7487, surveyor, APPROVED, official=true, stale=false,
             bound to f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4
checks       18 of 18 success at that SHA

forgejo/main is byte-identical to the approved head, so the landed commit IS the reviewed one. Verified in the landed tree rather than in the branch: scripts/ascii-only-check.sh is present and tests.yml carries one c14 step.

What shipped: 815 substitutions across 27 files, 34 fused section/para repairs, the gate as c14, 10 arms in tests/ascii-only-check.bats, and AGENTS.md §11 rewritten — the extended table, a third measured "Why" (bats drops an em-dash-named arm), the load-bearing rule, and the needle hazard.

Three exemptions, six lines, each named by CONSTRUCT rather than line number — which mattered: the delimiter moved from line 45 to 47 mid-review when a comment block landed above it, and the first version of the table was already wrong in output a human reads.

Two findings worth more than the diff, both from review:

  • A needle can point at a surface §11 does not cover. rt is Go; the sweep hyphenated a workflow's needle for PASS — %s and broke a control that CI structurally cannot see, because that workflow has no pull_request trigger. Two static instruments missed it; only building rt and running the control found it.
  • A carve-out can hide the thing it protects. Exempting three whole files left 8 em-dash test names, and bats 1.11.0 drops those arms — including the one the exemption existed for. Six lines now, and no test name is ever exempt.

Three non-blocking residuals from review 7483 and 7485 were taken rather than deferred, including the one that pins the c14 step by executing its own run: block. Set L tracks what remains before the v0.68.0 cut.

Landed and closed by hand. ``` landed SHA f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4 PR #1579, merged rebase, head branch deleted approval review 7487, surveyor, APPROVED, official=true, stale=false, bound to f87c0d37b7e661ba1fa78fa187d5a2f96e045ff4 checks 18 of 18 success at that SHA ``` `forgejo/main` is byte-identical to the approved head, so the landed commit IS the reviewed one. Verified in the landed tree rather than in the branch: `scripts/ascii-only-check.sh` is present and `tests.yml` carries one `c14` step. What shipped: 815 substitutions across 27 files, 34 fused `section`/`para` repairs, the gate as `c14`, 10 arms in `tests/ascii-only-check.bats`, and AGENTS.md §11 rewritten — the extended table, a third measured "Why" (bats drops an em-dash-named arm), the load-bearing rule, and the needle hazard. Three exemptions, six lines, each named by CONSTRUCT rather than line number — which mattered: the delimiter moved from line 45 to 47 mid-review when a comment block landed above it, and the first version of the table was already wrong in output a human reads. Two findings worth more than the diff, both from review: - **A needle can point at a surface §11 does not cover.** `rt` is Go; the sweep hyphenated a workflow's needle for `PASS — %s` and broke a control that CI structurally cannot see, because that workflow has no `pull_request` trigger. Two static instruments missed it; only building `rt` and running the control found it. - **A carve-out can hide the thing it protects.** Exempting three whole files left 8 em-dash test names, and bats 1.11.0 drops those arms — including the one the exemption existed for. Six lines now, and no test name is ever exempt. Three non-blocking residuals from review 7483 and 7485 were taken rather than deferred, including the one that pins the `c14` step by executing its own `run:` block. Set L tracks what remains before the v0.68.0 cut.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
frankenbit/release-toolkit#1578
No description provided.