Repository navigation
fix(baseline): Keep an agent from weakening the gate and give the PR a valid title - #288
Conversation
…alid title and list changed check files, and stop promising a retry that can't work The gate fails when the branch's own commits change the gate script. The PR title is made to pass the PR title check. The PR body names the files the branch changes under .sandcastle/, scripts/ and .github/ci/. A new branch refused only for main's workflow change moves to Sandcastle:local, since the next round can't push it either. The Copilot-note rule for Claude's backup reviews is recorded as deliberate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… valid title and list changed check files Copies the Template's build.mts, checkpoint.mts, config.mts and their tests (mpaulosky/dotfiles#288). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… valid title and list changed check files Copies the Template's build.mts, checkpoint.mts, config.mts and their tests (mpaulosky/dotfiles#288). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Review
PR #288 changes three things in Sandcastle, in both the Template's Owned files and dotfiles' copies:
- Gate guard:
runGatenow refuses to run the gate when the branch's own commits change the gate script. - PR title and body: the PR title is turned into a
<type>(<scope>): <Summary>subject, and the PR body lists the branch's changes underCHECK_PATHS. - Workflow refusal: when a new branch's push is refused only for main's workflow change, the issue now moves to
Sandcastle:localinstead of staying in the queue.
I read both diff pieces in full, so every changed file was reviewed.
Verdict: the intent is sound, but the gate guard has two real defects:
- The guard can't be cleared. It checks commit history, not the file's current content. Once any commit has touched the script, the branch can't get past the guard, and the fix its message suggests doesn't work.
- The guard misses merge commits. Because of
--no-merges, a merge commit that changes the script gets through unchecked.
Further problems:
- The guard silently does nothing when
GATE_COMMANDstarts with a wrapper or interpreter. - In the PR body, a file name containing a backtick can break out of its code span and inject a closing keyword or an @mention.
CHECK_PATHSleaves out the files that dotfiles' own gate runs (test.shandpackage.json).- One
prTitleedge case can produce a title the PR title check is likely to reject.
Each finding names the Template's file; dotfiles' copy under .sandcastle/lib/ has the same code on the same line and needs the same fix.
… the PR body and make the guarded paths per-repo settings Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Review
This PR changes four things in Sandcastle's build. Each change is made in the Template's Owned files and copied to dotfiles' .sandcastle/:
- Gate guard.
runGatenow refuses to run when the branch's copy ofGATE_SCRIPTdiffers frombaseand, at checkpoint 2, from themergedMainit merged in. The check is by content, throughchangedFiles. - PR title.
prTitleturns the issue title into a conventional-commit title, socheck-pr-title.shaccepts it. - PR body note. The PR body lists the files the branch changed under the new
CHECK_PATHS. - Refused push. A new branch whose push GitHub refuses only for main's workflow change now moves to
Sandcastle:localinstead of staying in the queue.
The docs and the Seed repo-config.mts gain GATE_SCRIPT and CHECK_PATHS. The resolved thread's history-vs-content problem is fixed: the guard compares content, and a real-repo test covers restoring the script.
Verdict: the change is sound in its main path, but there are gaps worth fixing or knowingly accepting before merge:
- Branch on an older main. The guard wrongly refuses an earlier round's branch built on an older main whenever main has since changed the gate script. The code comment says this case is left out.
- Unchecked
mergedMain. At checkpoint 2 the guard usesmergedMainbefore it is checked against GitHub's main. - Uncaught throw. A throw from the PR body note's git call loses a reviewed, gated publish.
- Workflows not listed.
CHECK_PATHSleaves out.github/workflows/, which is exactly whatSandcastle:localbuilds change. - Replace refs. The guard's git calls honour replace refs in the shared
.git, which agents can write. - Follow-up pass. It still gates without the guard. I'm inferring this from comments, because
lib/follow-up-pass.mtswasn't in the context.
I read all three diff pieces, all eight context pieces and CLAUDE.md; there is no AGENTS.md.
…ollow-up pass's gate Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude's reviews of TicketManager#242 and IssueTracker#279 found five things in the Template's Owned Sandcastle files and workflow rules:
GATE_COMMANDruns from the agent-written worktree, so the gate-fixer could edit it to make the exit code 0.runGatenow fails, without running the gate, when a commit of the branch's own (main's merged-in history left out) changes the gate script, and says how to restore it.Sandcastle:local, as the created-at-base case does.prTitle()keeps a conforming title, else addsfeat:(fix:for a bug) and fixes the capital and final period..sandcastle/,scripts/and.github/ci/(CHECK_PATHS), for the reviewer.pr-automerge.test.mjs).references/automerge.mdnow records its cost: a head GitHub drops Copilot's request for waits for a person to merge.scripts/gate.shpasses.🤖 Generated with Claude Code