Repository navigation
chore(sandcastle): Migrate to the Baseline Template's full pipeline - #279
Conversation
Apply the repo-ci-baseline Template: its Owned files (the whole .sandcastle pipeline and the other Owned drift) and Seed role files. Take the Template's Dockerfile and plan and review prompts, drop the old implement prompt and the old pipeline's check, publish and verdict modules, add tsx and rename test:sandcastle to check:sandcastle. Closes #278 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Test Results Summary483 tests 483 ✅ 23s ⏱️ Results for commit 7dbd8a7. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #279 +/- ##
=======================================
Coverage 85.63% 85.63%
=======================================
Files 75 75
Lines 1566 1566
Branches 186 186
=======================================
Hits 1341 1341
Misses 190 190
Partials 35 35 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The new checkpoints require Docker-backed tests inside a Docker-free sandbox, preventing otherwise valid work from being published.
2 open issues
What changed in this PR
Migrates IssueTracker’s Sandcastle automation from a single implementer to the Baseline Template’s multi-role pipeline, addressing issue #278.
Changes:
- Adds role orchestration, planning safeguards, checkpoints, follow-up instructions, and run limits.
- Updates sandbox tooling and Git protections, and switches Sandcastle commands to
tsxandcheck:sandcastle. - Aligns template-owned workflows, configuration, and review-process documentation.
| File | Description |
|---|---|
scripts/tests/check-git-hooks.test.sh |
Tests hook warnings and environment handling. |
scripts/check-git-hooks.sh |
Adds a session-start warning for disabled hooks. |
pnpm-workspace.yaml |
Configures dependency build and lockfile behavior. |
package.json |
Adds dependencies and switches Sandcastle scripts to tsx. |
global.json |
Aligns the SDK pin with the template. |
docs/PROCESS.md |
Clarifies when review threads should be resolved. |
.sandcastle/roles/tester.md |
Defines the test-first role. |
.sandcastle/roles/shared-rules.md |
Adds shared repository and verification instructions. |
.sandcastle/roles/scribe.md |
Defines documentation responsibilities. |
.sandcastle/roles/gate-fixer.md |
Defines checkpoint repair boundaries. |
.sandcastle/roles/follow-up.md |
Defines PR follow-up and verdict handling. |
.sandcastle/roles/backend.md |
Defines implementation responsibilities. |
.sandcastle/roles/architect.md |
Defines design-note and ADR responsibilities. |
.sandcastle/review-prompt.md |
Adds acceptance-test review and PR-body generation. |
.sandcastle/plan-prompt.md |
Adds optional-role and planned-file selection. |
.sandcastle/lib/work.test.mts |
Tests detection of actionable work. |
.sandcastle/lib/work.mts |
Detects work before starting expensive operations. |
.sandcastle/lib/verdict.test.mts |
Removes obsolete reviewer-verdict tests. |
.sandcastle/lib/verdict.mts |
Removes the old approval-verdict parser. |
.sandcastle/lib/umbrella.test.mts |
Tests umbrella completion and queue scope. |
.sandcastle/lib/umbrella.mts |
Closes umbrellas whose children completed. |
.sandcastle/lib/skills.test.mts |
Tests skill and protected Git mounts. |
.sandcastle/lib/skills.mts |
Adds read-only mounts through sandbox creation. |
.sandcastle/lib/shell.test.mts |
Tests protected host Git invocation. |
.sandcastle/lib/shell.mts |
Centralizes host Git execution and error reporting. |
.sandcastle/lib/sandbox-env.test.mts |
Updates secret-detection tests. |
.sandcastle/lib/sandbox-env.mts |
Classifies secret matches for publication checks. |
.sandcastle/lib/round.test.mts |
Tests round summaries and outcomes. |
.sandcastle/lib/round.mts |
Reports publication results and run stops. |
.sandcastle/lib/repo-config.mts |
Defines repository-specific roles and budgets. |
.sandcastle/lib/publish.test.mts |
Removes legacy publication-formatting tests. |
.sandcastle/lib/publish.mts |
Removes legacy title and body formatting. |
.sandcastle/lib/prompts.mts |
Builds arguments for the expanded role pipeline. |
.sandcastle/lib/plan.test.mts |
Tests role selection and path normalization. |
.sandcastle/lib/plan.mts |
Runs planning and validates selected work. |
.sandcastle/lib/limits.mts |
Tracks time budgets and usage-limit stops. |
.sandcastle/lib/host-safety.mts |
Protects host Git configuration and worktree links. |
.sandcastle/lib/git-sandbox-fake.mts |
Adds a Git-backed sandbox test helper. |
.sandcastle/lib/gate.mts |
Filters issues by readiness and blockers. |
.sandcastle/lib/errors.mts |
Defines shared stop and tampering errors. |
.sandcastle/lib/config.test.mts |
Tests role configuration, scope, and budgets. |
.sandcastle/lib/checkpoint.mts |
Adds verification checkpoints and repair retries. |
.sandcastle/lib/check.test.mts |
Removes legacy sandbox-check tests. |
.sandcastle/lib/check.mts |
Removes the previous verification module. |
.sandcastle/lib/building.mts |
Manages building labels and stale-run cleanup. |
.sandcastle/lib/agents.test.mts |
Tests role options, limits, and shared rules. |
.sandcastle/lib/agents.mts |
Centralizes role execution and usage recording. |
.sandcastle/intake-prompt.md |
Defines readiness assessment and issue splitting. |
.sandcastle/implement-prompt.md |
Removes the single-implementer prompt. |
.sandcastle/Dockerfile |
Updates the sandbox image and verification tools. |
.sandcastle/critique-prompt.md |
Defines overlap and dependency review. |
.sandcastle/check.sh |
Uses the renamed Sandcastle check script. |
.sandcastle/.gitignore |
Excludes role handoffs and follow-up verdicts. |
.sandcastle/.env.example |
Documents queue scope and time-budget settings. |
.github/workflows/pr-automerge.yml |
Restricts Claude backup reviews to quota-declined commits. |
.github/workflows/lint-actions.yml |
Aligns the zizmor action pin with the template. |
.github/workflows/codeql-analysis.yml |
Aligns CodeQL action pins with the template. |
.github/workflows/claude-review.yml |
Aligns review recognition with backup-review rules. |
.github/scripts/tests/pr-automerge.test.mjs |
Tests quota-note matching and label removal. |
.github/ci/sandcastle-tests.sh |
Invokes check:sandcastle in CI and the gate. |
Review effort: Balanced
…en path and body handling (#284) Template fixes from Copilot's review of the four migration PRs (mpaulosky/Articles#358, mpaulosky/IssueManager#324, mpaulosky/IssueTracker#279, mpaulosky/TicketManager#242). The findings are on Owned files, so the fix goes in the Template and is re-applied, not patched in one repo. - **`GATE_COMMAND`** (Seed `lib/repo-config.mts`, default `scripts/gate.sh`): the command the host runs as the gate at each checkpoint and in a follow-up pass. The sandbox has no Docker daemon, so a repo whose tests start containers points it at a script that skips those and keeps the lints. `checkpoint.mts` and `follow-up-pass.mts` use it, messages included. - **`plan.mts`:** `resolveFiles` folds `..` into the segment before it, so `src/Web/../Web/Program.cs` and `src/Web/Program.cs` are one path for the overlap check. A path that climbs above the root gives the no-files fallback. - **`prompts.mts`:** an issue with an empty body gets `(no description)`, since Sandcastle refuses an empty prompt value and the requirements may be in trusted comments. - `references/sandcastle.md` names `GATE_COMMAND` and adds the migration step for repos with Docker-backed tests. `scripts/gate.sh` passes, with new tests for each fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ithout Docker Re-apply the Template (gate command, parent segments in planned paths, empty issue bodies), set GATE_COMMAND to .sandcastle/check.sh because the sandbox has no Docker daemon, keep the older claude-opus-4-8 pin and point the role prompts at the check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n before Sandcastle runs agents Copies the Baseline Template's host-safety.mts and test (mpaulosky/dotfiles#286). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Review
This PR moves IssueTracker's Sandcastle onto the Baseline Template's full pipeline. It adds roles, an architect and scribe, a plan critique, gate checkpoints with a gate-fixer, follow-up passes on open PRs, a sandcastle:building claim, and secret and workflow-push handling. It rebuilds the sandbox image. It also changes Claude Review and PR Auto-Merge so that a Claude review counts only for a commit that Copilot answered with its quota note, and PR Auto-Merge now takes review:claude off once Copilot has really reviewed the head. A check-git-hooks SessionStart script is added too.
Verdict: the code I read is careful and mostly consistent, but a few things should be fixed or knowingly accepted before this merges on its own:
- Merge gate can stall. A Claude review now counts only next to Copilot's quota note. When Copilot posts nothing on a head, neither review counts and the cap never accrues, so the PR waits for a person.
- Downgrades. The Template copy rolls back the recent Dependabot bumps of codeql-action, zizmor-action and the .NET SDK pin.
- PR title. Sandcastle PRs now open with the raw issue title instead of
prTitle(issue). - Lost warning. The PR body no longer warns when a branch edits the gate's own files.
The earlier threads (worktreeConfig, .. paths, the Docker-free gate) aren't raised again.
Not reviewed: these diff pieces weren't asked for, so I didn't read them.
- 009: follow-up.mts, gate.mts
- 010: git-sandbox-fake.mts
- 011–012: github.mts
- 013: handback.mts, host-safety.mts
- 014: intake.mts
- 015: limits.mts, overlap.mts, plan.mts, prompts.mts
- 016: queue.mts, repo-config.mts, report.mts
- 017: round.mts, sandbox-env.mts, scan.mts, shell.mts, skills.mts, umbrella.mts
- 018: work.mts, main.mts, global.json, package.json
- 019: pnpm-lock.yaml, pnpm-workspace.yaml, .github/scripts/tests/pr-automerge.test.mjs, agents.test.mts
- 020–041: every .sandcastle/lib/*.test.mts, plus scripts/tests/check-git-hooks.test.sh
- 041–042: the prompt and role docs, and docs/PROCESS.md
- 042–043: the deleted implement-prompt.md, check.mts, publish.mts and verdict.mts, with their tests
So I couldn't confirm that package.json defines the check:sandcastle script that check.sh and sandcastle-tests.sh now call. I also couldn't confirm how openPullRequest handles the PR title.
Findings outside the diff (no thread to resolve, so they hold the merge until the next push gets a fresh review):
global.json:3: The SDK pin goes back to 10.0.401, reverting #277's bump to 10.0.402 (the commit just before this PR's).
rollForward: latestMinor still allows 10.0.402, so builds keep working. But the minimum SDK quietly drops, and Dependabot will raise the same bump again.
CLAUDE.md says global.json belongs to the Template, so either bump it there before applying, or keep main's 10.0.402 here and note why.
diff:0: Claude Review didn't read all of diff pieces 009.diff, 010.diff, 011.diff, 012.diff, 013.diff, 014.diff, 015.diff, 016.diff, 017.diff, 018.diff, 019.diff, 020.diff, 021.diff, 022.diff, 023.diff, 024.diff, 025.diff, 026.diff, 027.diff, 028.diff, 029.diff, 030.diff, 031.diff, 032.diff, 033.diff, 034.diff, 035.diff, 036.diff, 037.diff, 038.diff, 039.diff, 040.diff, 041.diff, 042.diff, 043.diff: they're past what one review reads, or a Read of them failed or came back in part. The log of the review job's "Check Claude's answer for secrets" step lists their files. Review those files yourself, then merge by hand.diff:0: Claude Review didn't read 1 changed file(s): files Copilot code review excludes (such as dist, bin, vendor or generated files, build configs or lockfiles), files the diff shows only as binary, submodule bumps, symlinks or Git LFS pointers. The log of the review job's "Check Claude's answer for secrets" step lists them. Review them yourself, then merge by hand.
… includes Restores github/codeql-action v4.39.0 and zizmor-action v0.7.1, and copies the Template's host-safety.mts and test (mpaulosky/dotfiles#286). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ide .git and the checkout Copies the Template's host-safety.mts and test (mpaulosky/dotfiles#286). 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>
Automated release blog posts for #279, opened by the release workflow. It holds every Release whose post isn't on main yet, rebuilt from main on each run. The [skip-release] title marker keeps its merge from starting another release. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

Closes #278.
Moves this repo's
.sandcastle/from the older single-implementer pipeline onto the full one the repo-ci-baseline Template now owns (mpaulosky/dotfiles#280, mpaulosky/dotfiles#282).apply.sh: the Template's Owned files (the whole.sandcastle/pipeline and the other Owned drift: four workflows,docs/PROCESS.md,global.json) and the Seed role files,pnpm-workspace.yamlincluded.Dockerfile,plan-prompt.md,review-prompt.md. Removed the oldimplement-prompt.mdand the old pipeline'scheck,publishandverdictmodules.needs-docker.shstays, becausecheck.shuses it.nodeis nowtsx, withtsxand@standard-schema/specadded, andtest:sandcastleis nowcheck:sandcastleeverywhere it is called.Cannot mount file to '.git/config'.pnpm run check:sandcastlepasses and the pre-push gate passed.Not done: this repo's own
CODING_STANDARDS.mdandcheck.share kept as they were.