diff --git a/autoplan/DRIVER.md b/autoplan/DRIVER.md index 71b65e270..ac4b2065b 100644 --- a/autoplan/DRIVER.md +++ b/autoplan/DRIVER.md @@ -151,6 +151,6 @@ Behavior-change notices. Every user-visible behavior change outside the plan's o Spend caps. Each lane runs under the `--spend-cap` the coordinator names; a lane that reaches it stops `incomplete` (`STOP: reason=budget_exhausted`) and reports spent, reserved and unknown charges. Paid evals are never retried to change a verdict; a rerun needs a named repair. Host-subagent spend is reported as `unknown`, never zero. -Before done. A lane pushes a WIP commit to its branch after each step and gates a pushed SHA. It runs `gstack-pregate run --allow-repo-commands` on its branch and reports done only after it passes. Where `.gstack/pregate.json` has a `sealed` key, it runs `gstack-pregate sealed` before any push or PR creation; a refusal stops the push. +Before done. A lane pushes a WIP commit to its branch after each step and gates a pushed SHA. It is done only when `gstack-pregate run --allow-repo-commands` passes; `requires-remote` needs `--stage tests --remote --spend-cap `. Where `.gstack/pregate.json` has a `sealed` key, it runs `gstack-pregate sealed` before any push or PR creation; a refusal stops the push. Handoff format. A lane reports in this order, identifiers first: PR URL (or `no PR` with branch and SHA), `GSTACK_RESULT` line, the `gstack: ok|fail ` line, the `PREGATE:` line, gate summary (lanes passed/failed/skipped), behavior changes (or `none`), spend (spent/reserved/unknown), then what it could not verify. Full thread ids (`jam_…`), never short codes, in every cross-thread message. Prose after the identifiers may be truncated; nothing before them may be. diff --git a/lib/coordinator-contract.ts b/lib/coordinator-contract.ts index a507928b0..8d221eec6 100644 --- a/lib/coordinator-contract.ts +++ b/lib/coordinator-contract.ts @@ -19,6 +19,6 @@ Behavior-change notices. Every user-visible behavior change outside the plan's o Spend caps. Each lane runs under the \`--spend-cap\` the coordinator names; a lane that reaches it stops \`incomplete\` (\`STOP: reason=budget_exhausted\`) and reports spent, reserved and unknown charges. Paid evals are never retried to change a verdict; a rerun needs a named repair. Host-subagent spend is reported as \`unknown\`, never zero. -Before done. A lane pushes a WIP commit to its branch after each step and gates a pushed SHA. It runs \`gstack-pregate run --allow-repo-commands\` on its branch and reports done only after it passes. Where \`.gstack/pregate.json\` has a \`sealed\` key, it runs \`gstack-pregate sealed\` before any push or PR creation; a refusal stops the push. +Before done. A lane pushes a WIP commit to its branch after each step and gates a pushed SHA. It is done only when \`gstack-pregate run --allow-repo-commands\` passes; \`requires-remote\` needs \`--stage tests --remote --spend-cap \`. Where \`.gstack/pregate.json\` has a \`sealed\` key, it runs \`gstack-pregate sealed\` before any push or PR creation; a refusal stops the push. Handoff format. A lane reports in this order, identifiers first: PR URL (or \`no PR\` with branch and SHA), \`GSTACK_RESULT\` line, the \`gstack: ok|fail \` line, the \`PREGATE:\` line, gate summary (lanes passed/failed/skipped), behavior changes (or \`none\`), spend (spent/reserved/unknown), then what it could not verify. Full thread ids (\`jam_…\`), never short codes, in every cross-thread message. Prose after the identifiers may be truncated; nothing before them may be.`; diff --git a/spec/sections/gate-and-file.md b/spec/sections/gate-and-file.md index ab771c099..ca353719e 100644 --- a/spec/sections/gate-and-file.md +++ b/spec/sections/gate-and-file.md @@ -445,7 +445,7 @@ Behavior-change notices. Every user-visible behavior change outside the plan's o Spend caps. Each lane runs under the `--spend-cap` the coordinator names; a lane that reaches it stops `incomplete` (`STOP: reason=budget_exhausted`) and reports spent, reserved and unknown charges. Paid evals are never retried to change a verdict; a rerun needs a named repair. Host-subagent spend is reported as `unknown`, never zero. -Before done. A lane pushes a WIP commit to its branch after each step and gates a pushed SHA. It runs `gstack-pregate run --allow-repo-commands` on its branch and reports done only after it passes. Where `.gstack/pregate.json` has a `sealed` key, it runs `gstack-pregate sealed` before any push or PR creation; a refusal stops the push. +Before done. A lane pushes a WIP commit to its branch after each step and gates a pushed SHA. It is done only when `gstack-pregate run --allow-repo-commands` passes; `requires-remote` needs `--stage tests --remote --spend-cap `. Where `.gstack/pregate.json` has a `sealed` key, it runs `gstack-pregate sealed` before any push or PR creation; a refusal stops the push. Handoff format. A lane reports in this order, identifiers first: PR URL (or `no PR` with branch and SHA), `GSTACK_RESULT` line, the `gstack: ok|fail ` line, the `PREGATE:` line, gate summary (lanes passed/failed/skipped), behavior changes (or `none`), spend (spent/reserved/unknown), then what it could not verify. Full thread ids (`jam_…`), never short codes, in every cross-thread message. Prose after the identifiers may be truncated; nothing before them may be. diff --git a/test/lane-coordination.test.ts b/test/lane-coordination.test.ts index 89816a51a..4dad434c1 100644 --- a/test/lane-coordination.test.ts +++ b/test/lane-coordination.test.ts @@ -132,6 +132,7 @@ describe('coordinator contract', () => { test('field wave CD: a lane runs pregate (and the sealed guard where configured) before done; the handoff carries the gstack trailer and the PREGATE: line after GSTACK_RESULT', () => { expect(COORDINATOR_CONTRACT).toContain('`gstack-pregate run --allow-repo-commands`'); expect(COORDINATOR_CONTRACT).toContain('`gstack-pregate sealed` before any push or PR creation'); + expect(COORDINATOR_CONTRACT).toContain('passes; `requires-remote` needs `--stage tests --remote --spend-cap `.'); const handoff = COORDINATOR_CONTRACT.slice(COORDINATOR_CONTRACT.indexOf('Handoff format.')); const order = ['`GSTACK_RESULT` line', '`gstack: ok|fail ` line', '`PREGATE:` line', 'gate summary'].map(t => handoff.indexOf(t)); expect(order.every(i => i > 0)).toBe(true);