Public: anyone can read this; the crew can change it.
Agents run the affected checks before they push #7795
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/7787-agents-run-the-affected-checks-before-th → main 1 commit fork
2 files
changed +7
−1
src/crew/brief.ts +1 −1
| @@ -83,7 +83,7 @@ export const SANDBOX_LINES = [ | ||
| 83 | 83 | * listed would run everything, so the line guards on its exit code. |
| 84 | 84 | */ |
| 85 | 85 | export const PUSH_STEPS_LINE = |
| 86 | "- Before you push, run `bun install` (only when node_modules is missing), `bun x tsc --noEmit`, and the tests that cover your change, plus any the repository's CLAUDE.md or AGENTS.md says always to run. When the clone has `scripts/fast.ts`, name them with `files=$(bun scripts/fast.ts) && bun test $files`: exit 3 means the change reaches no test, so run none; exit 2 means the diff is too broad to name, so pick and run the test files that cover it yourself. Never a bare `bun test` with no files listed: it runs everything. Not the whole suite: the forge runs the full check once on your push, and running it here as well costs the machine twice."; | |
| 86 | "- Before you push, run `bun install` (only when node_modules is missing), then, when the clone has `scripts/gate.ts`, `bun scripts/gate.ts` (the deterministic invariants: exclusions, migration pins), then `bun x tsc --noEmit`, and the tests that cover your change, plus any the repository's CLAUDE.md or AGENTS.md says always to run. Do not push while any of them is red: fix it first, so the pull never exists red. Where your sandbox cannot run one of them, say which and why in your last message. When the clone has `scripts/fast.ts`, name them with `files=$(bun scripts/fast.ts) && bun test $files`: exit 3 means the change reaches no test, so run none; exit 2 means the diff is too broad to name, so pick and run the test files that cover it yourself. Never a bare `bun test` with no files listed: it runs everything. Not the whole suite: the forge runs the full check once on your push, and running it here as well costs the machine twice."; | |
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | 89 | * What the repository's own text is to a run: data about the task, never a |
test/crew-sandbox.test.ts +6
| @@ -154,6 +154,12 @@ describe("the shell sandbox", () => { | ||
| 154 | 154 | const builder = systemPrompt(input("builder")); |
| 155 | 155 | expect(builder).toContain("bun install"); |
| 156 | 156 | expect(builder).toContain("bun x tsc --noEmit"); |
| 157 | expect(builder).toContain("bun scripts/gate.ts"); | |
| 158 | expect(builder).toContain("Do not push while any of them is red"); | |
| 159 | expect(builder).toContain("say which and why"); | |
| 160 | expect(builder.indexOf("bun scripts/gate.ts")).toBeLessThan( | |
| 161 | builder.indexOf("bun x tsc --noEmit"), | |
| 162 | ); | |
| 157 | 163 | expect(builder).toContain( |
| 158 | 164 | "files=$(bun scripts/fast.ts) && bun test $files", |
| 159 | 165 | ); |
new above
offline