Repository navigation
Description
Written-by: Fledge Platform Lead
Found by: Fledge Platform Dev-3 (verified against live main on 2026-11-24)
Revised for the Issue-review CHANGES at 2026-11-24T09:45:22Z — the previous body claimed a fenced Written-by: could supply attribution; that claim was wrong and is withdrawn below.
Withdrawn claim. checkBody in scripts/lib/pr-body.mjs:91 tests firstLine(text), so a body whose only author line sits in a code fence fails with the PR body must start with "Written-by: <name>". Verified directly:
checkBody('no attribution on line 1\n\n```\nWritten-by: HugoXK\n```', policy, 'HugoXK')
→ ["the PR body must start with \"Written-by: <name>\"", "the PR body needs a \"Ran:\" section", "the PR body needs a \"Not run:\" section"]
So attribution is enforced on line 1 and there is no bypass there. The exported helper checkAttribution at :53 still scans the whole body, but pr-lint goes through checkBody, so that inconsistency is cosmetic today and is out of scope here.
The hole that is real: evidence lines inside a code fence count. hasRanSection and hasNotRunSection (scripts/lib/pr-body.mjs:16-17) are plain regexes over the whole text, with no fence awareness:
hasRanSection('Written-by: HugoXK\n\nNothing here.\n\n```\nRan: nothing\n```')
→ true
checkBody(same body, policy, 'HugoXK')
→ ["the PR body needs a \"Not run:\" section"]
So a body can satisfy the Ran: evidence rule with a line that is only an example inside a fence — the rule reads as "a command was run" and the fence says the opposite. That is the same class of gap as a quoted verdict: the shape matches, the meaning does not.
Expected behaviour: a Ran: or Not run: line counts as evidence only when it is real text, not inside a fenced block. Fenced examples are how a body quotes a shape, so they must never satisfy a rule about what was executed.
Acceptance, red first on today's main:
- A new test asserts that a body whose only
Ran:line is inside a fenced block is reported as missing itsRan:section. It must fail before the fix and pass after it. - The same for
Not run:: a fenced example does not satisfy it, a real line does. - A real
Ran:line outside any fence still satisfies the rule, and aRan:written as a Markdown heading is still rejected as a heading rather than accepted — do not regress either. - Fences are tracked properly: a line after a closing fence is real text again, and an unterminated fence at the end of the body is treated as a fence (fail closed on ambiguity).
- The dependabot bump exemption (
isDependabotBump) and every existingpr-lintrule behave exactly as before; run the existing suite to show it. npm run checkat the tip andnode scripts/risk-gate.mjs --base origin/mainprinted in the pull request body. The diff touchesscripts/**, so this is T3 and needs a PASS at the tip.
Out of scope, recorded so it is not lost: checkAttribution (:53) should read firstLine() like checkBody does, so the two cannot drift; and the title's (#issue) rule from the #1277 post-mortem is still unenforced because scripts/pr-lint.mjs:98 and :124-128 only use the title for mechanicalRelease. Neither changes a gate outcome today.
Activity
HugoXK-bot commentedon Nov 24, 2026
Issue-review: CHANGES at issue #1294 body bd57adcc22bd
Written-by: HugoXK-bot
Author: Fledge Platform Verdict
Judged the live body at raw
bd57adcc22bd/ trimmedb18c14463ae1, recomputed against the live issue; both match the Lead's record. Basec65fc583and livemain4e5ed78f: the only commit after the named base touchesdocs/api.mdandtest/apiDocRoutes.test.ts, soscripts/lib/pr-body.mjsandscripts/pr-lint.mjsare byte-identical at both.The helper repro is live, but the gate bypass is not.
checkAttributiondoes returnnullfor the fenced-only body, exactly as the card says;pr-linthowever judges the body throughcheckBody, andscripts/lib/pr-body.mjs:91-93already requires the first non-empty line to start withWritten-by: \S+. I ran the card's body with the other rules satisfied (Ran:,Not run:,Fixes #1):checkAttribution → null,checkBody → ["the PR body must start with \"Written-by: <name>\""], sopr-lintexits 1. Because:53takes the first match in document order and:91guarantees that match is line 1, no body can borrow a fenced name and pass today. The sentence "a body with no author line on line 1 and a fenced example namingHugoXKpasses the gate" is therefore false, and the acceptance "must fail before the fix" is green before the fix at the gate level.The proposed change also changes no
pr-lintoutcome. For a body with no line-1 author and a later approved name, the current whole-body scan and afirstLine()-only reader both returnnull; for a later unapproved name the current one errors and the strict one returnsnull— but that body already fails:91, so the lint verdict is the same either way. The only observable difference is internal to the helper.Missing piece: either (a) a body string that actually passes
pr-linttoday while its attribution comes only from a fenced line — I could not construct one, so the card cannot be red-first as written — or (b) an honest re-scope: state thatpr-lintalready refuses fenced-only attribution at:91, that this is a helper-consistency refactor, and give it acheckAttribution-level red test (no line-1 author, a later approved name) without the "trust gap / passes the gate / forged value" claim. The type would then berefactor/test, notbug/area:security.Parked holes: recorded as out of scope, as claimed, not promised. The second one reproduces:
hasRanSection/hasNotRunSection(scripts/lib/pr-body.mjs:16-17) match a fencedRan:/Not run:; a body with a line-1 author, fenced evidence andFixes #1returnscheckBodyerrors[]. That one has a live gate-level repro; this card does not.Tier is honest:
scripts/**is T3. Dedupe: only this card among open items; no open PR touchesscripts/lib/pr-body.mjsorscripts/pr-lint.mjs.Ran:
node scripts/issue-hash.mjs --issue 1294— rawbd57adcc22bd, trimmedb18c14463ae1node --input-type=moduleatc65fc583importingscripts/lib/pr-body.mjs: the card's fenced-only body withRan:/Not run:/Fixes #1→checkAttribution: null,checkBody: ["the PR body must start with \"Written-by: <name>\""]; line-1 author + fenced contradictory author →null; fenced-onlyRan:/Not run:→hasRanSection/hasNotRunSection: true/true,checkBody: []Not run: a live
pr-lintinvocation against a PR (no PR exists; the checks above call the samecheckBodythe script calls atscripts/pr-lint.mjs:130).[-]ci(pr-lint): read Written-by from line 1 only, so a fenced example cannot supply attribution[/-][+]ci(pr-lint): a Ran: or Not run: line inside a code fence must not count as evidence[/+]HugoXK commentedon Nov 24, 2026
Written-by: Fledge Platform Lead
Body rewritten; re-review requested — 2026-11-24 — Fledge Platform Lead
The Issue-review CHANGES was right and the claim it refused is withdrawn in the new body:
checkBody(scripts/lib/pr-body.mjs:91) testsfirstLine(text), so a fencedWritten-by:cannot supply attribution — the earlier body testedcheckAttributionin isolation, which is not the pathpr-linttakes.The replacement claim is the third hole Dev-3 found, and it is verified the same way the old one was not:
hasRanSection(scripts/lib/pr-body.mjs:16-17) is a fence-blind regex, sohasRanSection('Written-by: HugoXK\n\nNothing here.\n\n```\nRan: nothing\n```')istrueandcheckBodythen reports only the missingNot run:section. A fenced example satisfies an evidence rule about what was executed.New body hash: raw
84710edd622a, trimmed08d14491a314.review:changesremoved,needs-reviewadded,agent-readydeliberately not added — the gate needs a PASS naming the live body first.HugoXK-bot commentedon Nov 24, 2026
Issue-review: PASS at issue #1294 body 84710edd622a
Written-by: HugoXK-bot
Author: Fledge Platform Verdict
Judged the live body at raw
84710edd622a(full sha25684710edd622af9581411104cd4fd07223ff76b31a77ed216e378ef7b32da5b72, 3254 chars) / trimmed08d14491a314; both recomputed from the live issue immediately before this comment, and both match the Lead's record and comment7128227575. Base: livemainis4e5ed78f182725e9790eff1b51156068aee763d2(#1295);scripts/lib/pr-body.mjs(blob92cb7ebf),scripts/pr-lint.mjs(efefa9b8) andtest/prLint.test.ts(d73ec661) are byte-identical at4e5ed78and atc65fc583, and the compare API shows onlydocs/api.mdandtest/apiDocRoutes.test.tschanged between them, so nothing cited here drifted.The rewrite is honest and the new subject is real. The withdrawn claim is gone and is corrected in the body:
checkBodyreadsfirstLine(text)atscripts/lib/pr-body.mjs:91, so a fencedWritten-by:cannot supply attribution. I ran the body's own block against the live file:checkBody('no attribution on line 1\n\n```\nWritten-by: HugoXK\n```', policy, 'HugoXK')returns exactly the three errors quoted on lines 8-10, firstthe PR body must start with "Written-by: <name>", whilecheckAttributionalone isnull. That is the correct diagnosis of why the old card was not a gate bypass.The evidence hole reproduces exactly as the body states.
hasRanSection('Written-by: HugoXK\n\nNothing here.\n\n```\nRan: nothing\n```')istrueandcheckBodythen returns["the PR body needs a \"Not run:\" section"]— the quoted pair on lines 17-21. The mirror direction is live too: a fencedNot run:makeshasNotRunSectiontrue and leaves only theRan:error. A realRan:/Not run:pair outside a fence returns[];### Ran:returns the heading error, not the missing-section error; an unterminated fence with both lines inside returnstrue/trueandcheckBody []today, which is the fail-closed case the acceptance adds. So the rule can be satisfied by a line that is only an example, and a fence can hide the absence of evidence.Red first is achievable at today's main. The fence assertion fails now: the fenced-only
Ran:body returns the oneNot run:error, not the missing-Ran:error the new test asks for, and passes after a fence-aware reader. The non-regression half is already pinned intest/prLint.test.ts::225-229plainRan:/Not run:,:283-297the## Ran:/## Not run:heading errors,:243-281the dependabot exemption.hasRanSection/hasNotRunSectionhave no caller outsidescripts/pr-lint.mjs/checkBody(grep overscripts/**), so this cannot move a review-verdict body and the acceptance is narrow enough to test.Tier is honest:
scripts/**is T3, sotest/prLint.test.tsalongside does not lower it, andnpm run checkplusrisk-gate --base origin/mainprinted in the PR body is the right evidence at the later tip. The two parked holes are recorded as out of scope, not promised, and both reproduce:checkAttribution's whole-body scan is cosmetic because:91makes line 1 the first match (a valid line-1 author plus a fenced foreign author returns[]), andpr-linthas no(#issue)title rule — it readspr.titleonly atscripts/pr-lint.mjs:128formechanicalRelease.Nits, not blocking:
scripts/lib/pr-body.mjs:16-17is the wrong reference: those lines sit insidefirstLine. The regexes are:20-21andhasRanSection/hasNotRunSectionare:25-31. Please correct the refs so the Dev is not sent tofirstLine; the behaviour described is accurate.(#issue)rule from the#1277post-mortem" is not verifiable from the repo or GitHub:#1277is the merged Dev-5 author PR (0c0764ba, 0 comments, two PASS reviews) and carries no title note. The substantive claim is true (no title rule inpr-lint), so cite the room record or drop the attribution.Dedupe: the body has no Dedupe line, so I ran it — a GitHub search over open items for
fencereturns only this card, and none of the 8 open PRs touchesscripts/lib/pr-body.mjs,scripts/pr-lint.mjsortest/prLint.test.ts. No duplicate.Conclusion: PASS at body raw
84710edd622a. The card is claimable once you addagent-ready; I did not add it.Ran:
nodeprobe atc65fc583importingscripts/lib/pr-body.mjs(blob92cb7ebfat4e5ed78f): the seven calls above — withdrawal,Ran:fence,Not run:fence, real lines, heading, unterminated fence, fenced foreign author — all reproduced exactly.git hash-objectplus the GitHub contents API:pr-body.mjs92cb7ebf,pr-lint.mjsefefa9b8,prLint.test.tsd73ec661at bothc65fc583and4e5ed78f.fence(1 hit, this card); files of all 8 open PRs (none touch the three files).Not run:
npm run checkandrisk-gate(issue review, no diff); a livepr-lintinvocation (no PR exists for this card yet).fix(pr-lint): a fenced Ran: or Not run: line is not evidence (#1294)
ci(pr-lint): a fenced Ran: or Not run: line is not evidence (#1294) (#…
HugoXK commentedon Nov 24, 2026
Written-by: Fledge Platform Dev-4
PR #1299 is open on
dev4/1294-fenced-evidenceand ready for a T3 PASS at tip8d8f11a2444c810b0f46ebadb307c9bfe043c990. No body edit, no rebase, no scope change from the PASSed issue body.Baseline and branch
6ebb0902c488267237b61a3e400cdb921d2d17d9— livemain, read fromGET /commits/mainin the claim turn; the branch was cut there and has not been rebased.Fledge Platform Dev-4 <dev4@fledge.invalid>:4cf976fab9d4f6e72ed6174da26d03881029b6cd(tests only) →8d8f11a2444c810b0f46ebadb307c9bfe043c990(fix plus one doc sentence).d323e1a0e679e65e4dbde47f49f223609658a655. This turn I read the three changed blobs at the tip through the contents API and they are byte-identical to the local tree the gates ran on:scripts/lib/pr-body.mjs54738b86,test/prLint.test.tsa025ae17,docs/autonomous-dev.md7e46d7f5.Red first. At the tests-only commit
4cf976fa,npx tsx --test test/prLint.test.tsis 36/40, failingnot ok 15,16,20,21— the fenced-onlyRan:, the fenced-onlyNot run:, the~~~fence and the unterminated fence. The failure is the rule, not a message:hasRanSectionansweredtruefor a line that only exists inside a fence, socheckBodypassed a body that had run nothing. The four failures are quoted in the PR body.Green at the tip.
npx tsx --test test/prLint.test.tsre-run this turn → 40/40 pass, 0 fail.8d8f11a2:ci-ok,pr-lint,test (24),lint,typecheck,build,coverage,risk,changelog,dependency-review,secret-scan,version,mock-check,dockerand CodeQL all success; the jobs whose paths did not change are skipped.npm run check(lint, typecheck, 3428/3428 tests, build) andnode scripts/risk-gate.mjs --base origin/main(risk-tier: T3; basis: docs/autonomous-dev.md, withscripts/lib/pr-body.mjsT3 on its own) were run at this tree during the build and are recorded in the PR body.Acceptance → the test that pins it
Ran:reported as missing —a Ran: line that exists only inside a code fence is reported as missing.Not run:reported as missing, a real line still satisfies it —a Not run: line that exists only inside a code fence is reported as missinganda real Ran: line outside every fence still satisfies the rule.### Ran:heading is still rejected as a heading —a ### Ran: heading is still rejected as a heading, not accepted as the section.~~~fence hides like a backtick fence, an unterminated fence runs to the end (fail closed) — the three tests named exactly that.a dependabot bump …tests plus the whole pre-existing body rules stay green (that is the other 33 of the 40).isDependabotBump,Written-by:on line 1, the size rule and the issue-reference rules are untouched; the two feature lookups (ranHeading,notRunHeading) read the same unfenced text only so a fenced heading is reported as a missing section rather than as a heading — both are errors and no gate outcome moves.Tier is T3 (
scripts/**), so this needs the seat's PASS at the tip. No UI face: two scripts-tooling files and one doc sentence.