This repository was archived by the owner on Nov 9, 2026. It is now read-only.
Repository navigation
fix(baseline): Make the Sandcastle gate command configurable and harden path and body handling - #284
Merged
Merged
Conversation
… in planned paths and give an empty issue body a sentence Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The documented custom gate conflicts with hard-coded test expectations and fixtures, preventing it from passing its own Sandcastle checks.
2 open issues
What changed in this PR
This PR updates the reusable Sandcastle baseline to support repository-specific gate commands, normalize parent-directory path segments, and handle empty issue descriptions. The Owned changes are mirrored in dotfiles.
Changes:
- Adds
GATE_COMMANDand uses it for gate execution and status messages. - Normalizes
..path segments and supplies a fallback for blank issue bodies, with regression tests. - Documents custom-gate setup for repositories with Docker-backed tests.
| File | Description |
|---|---|
Support For New Projects/.claude/skills/repo-ci-baseline/template/seed/.sandcastle/lib/repo-config.mts |
Adds the default gate command setting. |
Support For New Projects/.claude/skills/repo-ci-baseline/template/owned/.sandcastle/lib/prompts.test.mts |
Tests blank issue descriptions. |
Support For New Projects/.claude/skills/repo-ci-baseline/template/owned/.sandcastle/lib/prompts.mts |
Supplies a nonempty description fallback. |
Support For New Projects/.claude/skills/repo-ci-baseline/template/owned/.sandcastle/lib/plan.test.mts |
Tests parent-segment normalization and root escapes. |
Support For New Projects/.claude/skills/repo-ci-baseline/template/owned/.sandcastle/lib/plan.mts |
Canonicalizes paths for overlap checks. |
Support For New Projects/.claude/skills/repo-ci-baseline/template/owned/.sandcastle/lib/follow-up-pass.mts |
Reports the configured gate command. |
Support For New Projects/.claude/skills/repo-ci-baseline/template/owned/.sandcastle/lib/checkpoint.mts |
Executes and reports the configured gate. |
Support For New Projects/.claude/skills/repo-ci-baseline/references/sandcastle.md |
Documents gate configuration and migration. |
.sandcastle/lib/repo-config.mts |
Sets dotfiles’ gate command. |
.sandcastle/lib/prompts.test.mts |
Mirrors blank-description tests. |
.sandcastle/lib/prompts.mts |
Mirrors the description fallback. |
.sandcastle/lib/plan.test.mts |
Mirrors path-normalization tests. |
.sandcastle/lib/plan.mts |
Mirrors path canonicalization. |
.sandcastle/lib/follow-up-pass.mts |
Mirrors configurable gate messages. |
.sandcastle/lib/checkpoint.mts |
Mirrors configurable gate execution. |
Review effort: Balanced
| export async function runGate(sandbox: Pick<Sandbox, "exec">): Promise<GateRun> { | ||
| const before = await headOf(sandbox); | ||
| const { stdout, exitCode } = await sandbox.exec("scripts/gate.sh 2>&1"); | ||
| const { stdout, exitCode } = await sandbox.exec(`${GATE_COMMAND} 2>&1`); |
Comment on lines
+85
to
+86
| 7. The sandbox has no Docker daemon. A repo whose test projects start containers sets `GATE_COMMAND` in `lib/repo-config.mts` to a script that leaves | ||
| those out and keeps the lints (its `.sandcastle/check.sh`), and points the gate-fixer and follow-up roles' instructions at it. |
mpaulosky
added a commit
that referenced
this pull request
Oct 25, 2026
…command (#285) Follow-up to #284. `GATE_COMMAND` made the gate command repo-configurable, but the Owned tests still named `scripts/gate.sh`, so a repo that sets it (the four Sandcastle migrations set `.sandcastle/check.sh`) failed 16 of them. - `build.test.mts`, `checkpoint.test.mts` and `follow-up-pass.test.mts`: the fake sandbox reports the configured command as the Template's default, so the expected command lists stay as they are. - `git-sandbox-fake.mts`: writes its gate script at `GATE_COMMAND`'s path. - `follow-up-pass.test.mts`: the red-gate message test checks the configured command. `scripts/gate.sh` passes here. With `GATE_COMMAND` set to `.sandcastle/check.sh`, `pnpm run check:sandcastle` passes in Articles, IssueManager, IssueTracker and TicketManager. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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(Seedlib/repo-config.mts, defaultscripts/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.mtsandfollow-up-pass.mtsuse it, messages included.plan.mts:resolveFilesfolds..into the segment before it, sosrc/Web/../Web/Program.csandsrc/Web/Program.csare 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.mdnamesGATE_COMMANDand adds the migration step for repos with Docker-backed tests.scripts/gate.shpasses, with new tests for each fix.