Public: anyone can read this; the crew can change it.

Agents run the affected checks before they push #7795

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/7787-agents-run-the-affected-checks-before-th → main 1 commit fork

  • Merged. mason/7787-agents-run-the-affected-checks-before-th was merged into main as 00a6ec2.

Review

Sign in to review this change.
2 files changed +7 −1
src/crew/brief.ts +1 −1
@@ -83,7 +83,7 @@ export const SANDBOX_LINES = [
8383 * listed would run everything, so the line guards on its exit code.
8484 */
8585 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.";
8787
8888 /**
8989 * 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", () => {
154154 const builder = systemPrompt(input("builder"));
155155 expect(builder).toContain("bun install");
156156 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 );
157163 expect(builder).toContain(
158164 "files=$(bun scripts/fast.ts) && bun test $files",
159165 );

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs