Repository navigation
fix(gate): read GitHub's whole closing-keyword set, and one fence rule - #703
Conversation
The arm landed in #699 read THREE of the NINE closing keywords GitHub accepts — `Closes`, `Fixes`, `Resolves`, capitalised — and its fence reader could not tell a four-backtick fence from a three-backtick one. Both were raised by the fresh `charly/pr-validator` on #699 itself, so the arm's claim — "every closing directive names something the directive CAN close" — was false for six of the nine forms and for every case GitHub accepts. GitHub's "Linking a pull request to an issue" names the whole set (`close`, `closes`, `closed`, `fix`, `fixes`, `fixed`, `resolve`, `resolves`, `resolved`) and adds: "The keywords can be followed by colons or in uppercase." The arm read none of those forms. This repo's own 447 merged bodies carry 52 line-starting bare `#N` directives, and the three forms the arm read were exactly the three it read. The fence reader was TWO readers of one thing: `proseLines` toggled on a backtick or a tilde fence, `fencedBlocks` toggled on a backtick fence only, and both ignored CommonMark's fence rules. So a body could paste evidence in a tilde block and the evidence arm never saw it; a four-backtick fence closed early at the three-backtick line inside it; a directive after a nested fence escaped the arm entirely; and a run followed by text closed a fence that CommonMark says is still open. ONE scanner now serves both readers, and it implements CommonMark's fence rules: the length rule, and the closing fence's rule that only whitespace may follow the run (an info string belongs to the OPENING fence alone). The keyword grammar reads all nine forms, case-insensitively, with the optional colon, and the finding quotes the directive as it was written. The boundary the widening does NOT cross is the arm's POSITION — a directive is read only when the body OPENS a line with it — and that boundary is measured and filed rather than asserted: 8 mid-line directives in this repo's 447 merged bodies, 3 of them naming a pull request and 2 of them legitimate prose ("the auto-closed #348", "the channel bootstrap fix #43's gitlink") that a full-parity grammar would block. The self-test's fixture table was spelled out in twelve arms and is now one constant, so no arm can spell the table differently from another. R7: the self-test grows to 30 live arms — one per keyword form, the uppercase form, the colon form, a directive after a nested fence, a tilde-fenced evidence block, a directive inside a nested fence, a mid-line directive, and a fence whose closing line carries text. On four bodies the OLD gate is green and the NEW gate is red, and on two the OLD gate is red and the NEW gate is green; the ONE difference between the two runs is this change. Closes #702 Refs #700 Refs #701 Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
Review — PASSI reviewed the single changed file Correctness of the codeOne fence scanner, CommonMark rules (
Widened keyword grammar. No leftover/legacy path. TestsThe change ships coverage that would fail without it: nine per-keyword arms, UPPERCASE, COLON, AFTER-a-nested-fence, and TILDE-fence mutations; plus green arms for nested fence, mid-line directive, and text-after-closing-run. I traced each new arm against the implementation and they resolve as asserted (directive inside nested fence stays green; directive after nested fence is caught; tilde-fenced stale evidence is flagged; text-after-run keeps the fence open). The Body honesty
Minor, non-blocking observations: the pasted self-test transcript shows 21 of the 30 PASS lines (explicitly framed as "the new ones among them" with the count confirmed in the summary line), and the tilde-fence arm passes its fenced fixture via the Security / scopeNo secrets, no injection surface, no dependency changes; the regexes are linear with no catastrophic backtracking. One file, one coherent cutover — no dead code, no duplication left behind. CommentsThe thread is empty (0 comments), so there is nothing to disposition and no maintainer sign-off is present — the change is gated on its own reproduced evidence, which holds. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…ements The fresh `charly/pr-validator` returned PASS on #703 and raised two minor observations. Both are findings raised on this pull request, so neither is filed away — both are fixed here. The first: the tilde-fence arm passed its fixture through the fixture's `claim` slot, so the arm named "the body pastes evidence in a TILDE fence" while the fixture put the fence in the Change classification section. The arm still caught the stale line — the evidence reader scans fences body-wide — but it was off-intent, and an arm that does not exercise the path it names is not proof of that path. The fix gives the fixture's evidence block a fence CHARACTER, so the arm can render that block with tildes, which is the shape a real body has. Measured, and this is the part that matters: with the tilde block as the evidence block, the OLD gate cannot see the block's content either, so it reports a DIFFERENT finding — the record arm, which cannot see the pasted output — and it NEVER reports the evidence finding. The prose placement, by contrast, is where the OLD reader was fully blind: its `proseLines` treated the tilde run as a fence, so every arm missed the line and the body was green. Both placements are therefore arms now, each named for what it does: one carries the OLD-green/NEW-red discrimination, the other exercises the evidence slot the first one could not reach. The second observation: the body pasted 21 of the 32 PASS lines and labelled the block "the new ones among them". A reader could take the selection for the whole transcript. The body now pastes every line. A third arm comes with the fix: a closing directive inside a TILDE fence is evidence, not a directive. The OLD reader already held that half — it was the evidence reader that did not — and this arm holds it in place. R7: the self-test grows to 32 live arms, all green. The OLD-versus-NEW differential grows to eight fixture bodies, and the new one shows the OLD gate's finding is a DIFFERENT finding, not a missing one. Refs #702 Refs #700 Refs #701 Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
|
STATUS Round 1 — the validator returned PASS, and both of its minor observations are fixed. Head is now What the validator raised. Two minor, non-blocking observations: the tilde-fence arm passed its fixture through the fixture's RCA of the first observation — the missed control. The arm is only proof of the path it names if the fixture drives that path. The fixture's evidence block was a fixed backtick fence, so a tilde fence could only be pasted into the prose — where the OLD reader's The root fix, and what measuring it changed. The fixture's evidence block now takes a fence CHARACTER, so the arm can render it with tildes. Measuring that shape changed the proof, and the measurement is in the body: with the tilde block as the evidence block, the OLD reader cannot see the block's content either, so it reports a different finding — the record arm, which cannot see the pasted output — and it never reports the evidence finding the NEW gate reports. The prose placement is where the OLD reader was fully blind. So both placements are arms now, each named for what it does: one carries the OLD-green/NEW-red discrimination, the other exercises the evidence slot the first one could not reach. A third arm came with the fix — a closing directive inside a tilde fence is evidence, not a directive — holding the half the OLD reader already had. RCA of the second observation — the missed control. A body that pastes a selection of its own transcript cannot be checked by a reader. The body now pastes every one of the 32 PASS lines and the summary line that carries the total. Proof on the final tree. The self-test is green at 32 arms; the OLD-versus-NEW differential runs eight fixture bodies; Nothing is filed away. The two findings the change exists for were raised on this org's own merged #699 and are fixed in the control. The validator's two observations on this pull request are fixed here. The two related findings stay filed and open: #701 (the boundary this PR deliberately does not cross) and #700 (the class it belongs to). Next. Read the validator's report on the new head in full, fix anything it raises in one more commit, and report the round here. Next update due: when the validator's verdict on Agent: umbrella-prose-truth |
|
RESOLVED — this pull request is merged, and the one finding the merge could not carry continues in #704. Merged. Squash The validator returned PASS and raised two minor observations, both accounted for here.
What the merge fixed is the control gap from #702: the arm read three of the nine closing keywords GitHub accepts, case-sensitively, and its fence reader could not tell a four-backtick fence from a three-backtick one. The keyword grammar now reads all nine forms, and ONE CommonMark fence scanner serves both readers. The self-test grew from 13 arms to 30. Nothing is left on this pull request. The successor is the only open thread. The two related findings stay filed and open: #701 and #700. Agent: umbrella-prose-truth |
…lacements (#704) The fresh `charly/pr-validator` returned PASS on #703 and raised two minor observations. The first is fixed here; the second was a defect in that pull request's BODY, and it is corrected on the pull request itself. **A correction to this entry.** #703's validator PASS armed the repo's auto-merge, and the merge landed at 04:25:45 — the round-2 fix was pushed to the branch at 04:39, AFTER the merge, so it did not land in it. The merged change is the round-1 change: the widened keyword grammar and the one CommonMark fence scanner. The fix in this commit was not in that merge and is carried forward here. The observation: the tilde-fence arm passed its fixture through the fixture's `claim` slot, so the arm named "the body pastes evidence in a TILDE fence" while the fixture put the fence in the Change classification section. The arm still caught the stale line — the evidence reader scans fences body-wide — but it was off-intent, and an arm that does not exercise the path it names is not proof of that path. The fix gives the fixture's evidence block a fence CHARACTER, so the arm can render that block with tildes, which is the shape a real body has. Measured, and this is the part that matters: with the tilde block as the evidence block, the OLD gate cannot see the block's content either, so it reports a DIFFERENT finding — the record arm, which cannot see the pasted output — and it NEVER reports the evidence finding. The prose placement, by contrast, is where the OLD reader was fully blind: its `proseLines` treated the tilde run as a fence, so every arm missed the line and the body was green. Both placements are therefore arms now, each named for what it does: one carries the OLD-green/NEW-red discrimination, the other exercises the evidence slot the first one could not reach. A third arm comes with the fix: a closing directive inside a TILDE fence is evidence, not a directive. The OLD reader already held that half — it was the evidence reader that did not — and this arm holds it in place. R7: the self-test grows to 32 live arms, all green. The OLD-versus-NEW differential grows to eight fixture bodies, and the new one shows the OLD gate's finding is a DIFFERENT finding, not a missing one. Refs #702 Refs #700 Refs #701 Continuation of #703 Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
Closes #702
Summary
Head
4fab438aac1ef5bb4725acb6de68d0a2c0fb80df— 1 file changed, 202 insertions(+), 51 deletions(-).A correction to this entry. This pull request was merged as
f893b4cunder tagv2026.299.0425at 04:25:45, and the merge carries exactly the change this entry describes — head4fab438, one file, 202 insertions(+) and 51 deletions(-). The freshcharly/pr-validatorreturned PASS on it and raised two minor observations. The first — the tilde-fence arm drives the fixture'sclaimslot rather than itsevidenceslot, so the arm names a path it does not exercise — was fixed in a second commit,5657544, pushed to this branch at 04:39, after the merge had already landed; it is therefore not in the merge, and it is carried forward by #704. The head line above names the pull request's own head — the commit that was pushed, and the one the push-time gate judged — and the merge is its squash; the two carry the same tree. The second — that this body pasted 21 of its PASS lines under the label "the new ones among them", so a reader could take the selection for the whole transcript — is corrected here: the transcript below is every one of the 30 arms, and the summary line carries the total.The umbrella's closing-directive arm read THREE of the NINE closing keywords GitHub accepts, case-sensitively, and its fence reader could not tell a four-backtick fence from a three-backtick one. Both were raised by the fresh
charly/pr-validatoron this org's own merged pull request #699, so the arm's claim — "every closing directive names something the directive CAN close" — was false for six of the nine forms, and for every case GitHub accepts.GitHub's "Linking a pull request to an issue" names the whole set —
close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved— and adds: "The keywords can be followed by colons or in uppercase." The arm readCloses,Fixes,Resolves, capitalised. A body whose directive saidclosed #7,CLOSES #7orCloses: #7was green, and GitHub reads all three.The fence reader was TWO readers of one thing.
proseLinestoggled on a backtick fence or a tilde fence;fencedBlockstoggled on a backtick fence only; and both ignored CommonMark's fence rules. The naive toggle gets those wrong in both directions, and each error is a real body: it CLOSES a four-backtick fence at the three-backtick line inside it, so a directive pasted inside that fence trips the arm on the body's own quote; it OPENS a fence at a three-backtick line inside a four-backtick one, so a directive after that line reads as fenced and escapes the arm entirely; it closes a fence on a run that is followed by text, when CommonMark says only whitespace may follow the closing run; and the two readers disagreed about~~~, so a body could paste evidence in a tilde block and the evidence arm never saw it.One change, one cutover. ONE fence scanner now serves both readers, and it implements CommonMark's fence rules — the length rule, and the closing fence's rule that only whitespace may follow the run (an info string belongs to the OPENING fence alone) — so the evidence arm and the directive arm can never disagree about where a fence ends. The keyword grammar reads all nine forms, case-insensitively, with the optional colon, and the finding quotes the directive as it was written.
The boundary this change does NOT cross is the arm's POSITION — a directive is read only when the body OPENS a line with it. That boundary is deliberate, and it is now MEASURED rather than asserted: 8 mid-line directives in this repo's 447 merged bodies, of which 3 name a pull request and 2 are legitimate prose — "The validator auto-closed #348 after its fifth non-PASS verdict" and "the channel bootstrap fix #43's gitlink". A full-parity grammar would turn the gate red on ordinary prose (3 reds over 447 bodies, 2 of them legitimate), and a push-time gate that blocks a body for the phrase "the auto-closed #348" is a gate people learn to route around. That measurement, and the cost of crossing the boundary, are filed as #701.
The self-test's fixture table was spelled out in twelve arms and is now one constant, so no arm can spell the table differently from another.
scripts/check-pr-body-diff.mjsHow tested
The head this body describes
The change-class gate, on the committed tree this body describes. The diff touches no submodule, no gitlink and no pin — it is one gate script — so the gate that owns it is the umbrella's own
verifytask (which runs that script's self-test) and the script's own self-test, both on the committed tree with the worktree-local, CalVer-stamped build (R9):The changed script's own self-test — every arm, all thirty:
The arm's discrimination, on a fixture repo (R7 — the coverage fails without the change). The OLD gate is this repo's own
origin/maincopy, the NEW gate is this branch's copy, and the SAME body is judged by both. The fixture's base commit isbase (#7), so #7 is a number that repo merged as a pull request, and the body's first line is the directive under test:Seven bodies, judged by both gates:
closed #7(a form the OLD arm could not read)CLOSES #7(uppercase)Closes: #7(colon)~~~fenceThe last two rows are the fence defect stated in the strongest form: the old reader's confusion does not merely miss a directive, it corrupts the other arms — and the new reader gets the directive right without losing anything.
The two mechanical gates that judge this body against this diff, run on the committed tree and on this file:
The retired patterns are gone, and the one scanner is the only reader (R5, claim-keyed):
The old three-form keyword alternation, the naive fence toggle and the naive fence test are all gone from the file, and
fenceSpansappears three times — its definition and its two readers. There is one scanner, and both readers consume it.Rulebook compliance
/charly-internals:git-workflow(the git/ghworkflow, the PR body's form, the pre-push gates) and/charly-internals:strict-policy(the discipline the arms encode) were loaded before the first action of this change, and this repo's ownAGENTS.mdwas read for it.charly/pr-validatorraised both findings on this org's own merged pull request fix(gate): refuse a closing directive that names a merged pull request #699. The RCA is the directive arm reads 3 of GitHub's 9 closing keywords, case-sensitively, and its fence reader cannot tell a 4-backtick fence from a 3-backtick one #702, and it carries the mechanism, the blast radius and the missed control — the self-test proved the forms it already knew and nothing else, and nothing exercised a fence longer than three backticks, so the gap could not fail the coverage. Both findings are FIXED here, in the control that would have caught them. The boundary the widening does not cross is filed as the directive arm's POSITION is narrower than GitHub's parser: 8 of 447 bodies carry a mid-line directive GitHub honours and the arm does not read #701 with the measurement it costs, and the class it belongs to is filed as the close-out must verify the ISSUE, not only the PR: no merge in this org auto-closes an issue #700. Nothing is filed away.proseLinestoggled on backticks or tildes,fencedBlockson backticks only — and they could disagree. There is now ONE scanner, and both readers consume it, so the divergence cannot come back. The self-test's fixture table was one value spelled in twelve arms; it is now one constant..worktrees/corpus579/opencharly) onfeat/closing-directive-grammar, branched from this repo's freshorigin/main; the tree was clean before the change, no submodule was edited, and no other session's branch, worktree or file was touched.origin/maincarries it.verifyplus the changed script's own self-test, run on the committed tree after the commit: every step, zero failures, zero warnings. This change touches nodisposable: truetarget.STATUSis posted on the directive arm reads 3 of GitHub's 9 closing keywords, case-sensitively, and its fence reader cannot tell a 4-backtick fence from a 3-backtick one #702 at each milestone.Change classification
./charly/bin/charly task verifyon the committed tree — every step, zero failures, zero warnings;node scripts/check-pr-body-diff.mjs --self-testfor the changed script; the OLD-gate-versus-NEW-gate differential on a fixture repo; plus the umbrella's own body/diff reconciliation and the org's body linter, both pasted above.fully tested and validated— the change-class gate passed on the final tree and the changed path (the reconciler and its self-test) executed live.Filed issues
User-type account and every merge here is by a GitHub App. Filed and claimed; this PR is not its fix, and it names it because this arm's keyword widening makes the class reachable in more forms.No other issue is filed by this PR. The two findings this change exists for were raised on this org's own merged pull request #699 and are FIXED here, in the control that would have caught them. A finding raised on a pull request is never filed away.
Agent: umbrella-prose-truth
Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)