Skip to content

ci: name the extra text in a CLEAN finding and add a NO REVIEWABLE FILES reply - #1909

Merged
joshunrau merged 1 commit into
DouglasNeuroInformatics:mainfrom
joshunrau:pr-body-fixes
Nov 10, 2026
Merged

joshunrau merged 1 commit into
DouglasNeuroInformatics:mainfrom
joshunrau:pr-body-fixes

Conversation

@joshunrau

Copy link
Copy Markdown
Collaborator

An agent whose PR body breaks the ### Findings rule is now told what to fix. Before, #1908 was closed twice with "### Findings is neither CLEAN nor numbered findings" for a section that read CLEAN followed by one sentence of explanation.

Changes

  • When ### Findings starts with CLEAN or NO REVIEWABLE FILES and has more text after it, the close comment now says that the section holds the review's reply alone and that context goes in Notes.
  • The adversarial review replies NO REVIEWABLE FILES when the diff has no file it reads, so CLEAN always means code was reviewed. The PR body check accepts it in the same way as CLEAN.
  • When the CLI cannot read its arguments or input files, it still writes the "The check itself failed" report.
  • The root tsconfig.json sets rewriteRelativeImportExtensions, which every workspace inherits. Root scripts can then import a .ts file the way Node type stripping requires. The only workspace that emits with tsc, runtime-core, builds as before.

Decisions

  • The checker moves to .github/scripts/pr-body.ts, inside the 100% coverage gate and tested by the github vitest project. scripts/check-pr-body.ts is now only the CLI that the workflow runs. This is the same split scripts/increment-version.ts uses with release.cjs. The old script ran on import and called process.exit, so no test could reach it.
  • Text after CLEAN is still refused, now with an accurate message. Accepting prose after the token would let something like "CLEAN, though the prosecutor raised X" pass, and the review block exists to stop that.
  • rewriteRelativeImportExtensions is used instead of allowImportingTsExtensions, because the second one breaks the runtime-core emit, which inherits the root config.

Adversarial review

Reviewed at commit 84ce37d. pnpm check: green.

Findings

  1. scripts/check-pr-body.ts:10 — the argv check and file reads run outside error handling, so a failure there posts no report — route them through the checker's try
  2. .github/scripts/pr-body.ts:155 — the fallback message restates the tokens in EMPTY_REVIEW_REPLIES as a literal — build it from the array
  3. vitest.config.ts:36 — the coverage include lists .github/scripts files one by one, so a new script falls outside the gate — use one glob

Fixed

    1. checkPullRequest takes a reader that the CLI supplies, and calls it inside its try.
    1. The message is built from EMPTY_REVIEW_REPLIES.
    1. The two entries become .github/scripts/*.?(c|m)[jt]s, and testing-strategy.md names the scope.

Attestation

I, Claude Opus 5.5, attest that the review block above reports the adversarial review as it ran on the commit named, with every finding it returned.

🤖 Generated with Claude Code

…LES reply

The PR body check reported "`### Findings` is neither `CLEAN` nor numbered findings" for a section
that read `CLEAN` followed by a sentence explaining the review had no files to read, so the author
could not tell what to fix. It now names the text after the token. The review replies
`NO REVIEWABLE FILES` for a diff it reads none of, so `CLEAN` always means code was reviewed.

The checking logic moves to `.github/scripts/pr-body.ts`, tested in the `github` project, and
`scripts/check-pr-body.ts` becomes the CLI the workflow runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joshunrau
joshunrau merged commit 22c03a9 into DouglasNeuroInformatics:main Nov 10, 2026
3 checks passed
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