@feigi/fleet-ctl 0.0.0 → 3.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/{fleet-implementer.agent.md → fleet-implementer-slow-high.agent.md} +23 -2
- package/agents/fleet-implementer-slow-medium.agent.md +231 -0
- package/agents/fleet-implementer-smol-high.agent.md +231 -0
- package/agents/{fleet-implementer-alt.agent.md → fleet-implementer-task-high.agent.md} +23 -2
- package/agents/fleet-implementer-task-max.agent.md +231 -0
- package/agents/fleet-review-comments.agent.md +4 -2
- package/agents/fleet-review-correctness.agent.md +2 -1
- package/agents/fleet-review-runner.agent.md +14 -10
- package/agents/fleet-review-silent-failure.agent.md +4 -3
- package/agents/fleet-review-simplify.agent.md +2 -1
- package/agents/fleet-review-snapshot.agent.md +2 -1
- package/agents/fleet-review-test-run.agent.md +29 -0
- package/agents/fleet-review-tests.agent.md +10 -5
- package/agents/fleet-review-types.agent.md +4 -2
- package/agents/fleet-review-verifier.agent.md +4 -3
- package/commands/review-and-fix.md +7 -6
- package/commands/run-merge-bot.md +14 -4
- package/package.json +4 -2
- package/scripts/agent-test.test.mjs +36 -32
- package/scripts/ambient-git-vars-mjs-prose.test.mjs +23 -13
- package/scripts/apply-ruleset.test.mjs +4 -3
- package/scripts/arg-header-probes-prose.test.mjs +1 -0
- package/scripts/arg.test.mjs +18 -18
- package/scripts/board-cli.test.mjs +18 -21
- package/scripts/board-identity.test.mjs +9 -9
- package/scripts/board-liveness-banner.test.mjs +6 -6
- package/scripts/board-prev-shape.test.mjs +12 -13
- package/scripts/board-tryparse-null.test.mjs +7 -7
- package/scripts/board.mjs +4 -7
- package/scripts/board.test.mjs +57 -61
- package/scripts/candidates.test.mjs +228 -17
- package/scripts/ci-completes-premise-prose.test.mjs +1 -1
- package/scripts/ci-state-prose.test.mjs +2 -2
- package/scripts/ci-state.mjs +389 -187
- package/scripts/ci-state.test.mjs +458 -165
- package/scripts/claim-lifecycle.test.mjs +2 -1
- package/scripts/claim-ticket.test.mjs +35 -34
- package/scripts/closing-keyword-prose.test.mjs +1 -1
- package/scripts/cockpit-tick-nonblocking.test.mjs +8 -8
- package/scripts/compute-board.mjs +13 -3
- package/scripts/compute-board.test.mjs +64 -1
- package/scripts/compute-spend.mjs +46 -8
- package/scripts/compute-spend.test.mjs +64 -10
- package/scripts/cross-repo-citation-prose.test.mjs +18 -19
- package/scripts/delete-merged-branch.sh +218 -0
- package/scripts/delete-merged-branch.test.mjs +576 -0
- package/scripts/derive-testcmd.sh +18 -7
- package/scripts/derive-testcmd.test.mjs +9 -8
- package/scripts/diff-stats.mjs +2 -2
- package/scripts/diff-stats.test.mjs +7 -11
- package/scripts/dispatch-block-golden-prose.test.mjs +111 -6
- package/scripts/dispatch-block-pins-prose.test.mjs +5 -5
- package/scripts/dispositions-check.mjs +507 -0
- package/scripts/dispositions-check.test.mjs +843 -0
- package/scripts/dispositions-gate-prose.test.mjs +114 -0
- package/scripts/drop-merged-label.test.mjs +3 -4
- package/scripts/exec-stub.mjs +93 -0
- package/scripts/exec-stub.test.mjs +69 -0
- package/scripts/filing-bar-seat-prose.test.mjs +1 -1
- package/scripts/finisher-test-verdict-prose.test.mjs +102 -0
- package/scripts/fix-applier-correction-rules-prose.test.mjs +11 -10
- package/scripts/fleet-bootstrap +5 -20
- package/scripts/fleet-bootstrap.test.mjs +75 -0
- package/scripts/fleet-heartbeat.mjs +2 -2
- package/scripts/fleet-provenance +15 -24
- package/scripts/fleet-provenance.test.mjs +86 -12
- package/scripts/fleet-run.test.mjs +5 -5
- package/scripts/fleet-state.mjs +33 -11
- package/scripts/fleet-state.test.mjs +90 -3
- package/scripts/fleet-tick.mjs +346 -70
- package/scripts/fleet-tick.test.mjs +566 -16
- package/scripts/force-with-lease-reason-prose.test.mjs +1 -1
- package/scripts/frontmatter-check.mjs +3 -2
- package/scripts/frontmatter-check.test.mjs +6 -6
- package/scripts/immutable-body-claim-prose.test.mjs +53 -262
- package/scripts/implementer-model-tier.test.mjs +98 -506
- package/scripts/inflight.test.mjs +18 -127
- package/scripts/is-cli.mjs +26 -0
- package/scripts/is-cli.test.mjs +99 -0
- package/scripts/json.test.mjs +3 -3
- package/scripts/ledger-dispatch.test.mjs +368 -7
- package/scripts/ledger-grammar.mjs +85 -1
- package/scripts/ledger-grammar.test.mjs +86 -1
- package/scripts/ledger-read-require-file.test.mjs +7 -7
- package/scripts/ledger-rotate.test.mjs +142 -0
- package/scripts/ledger.mjs +181 -17
- package/scripts/ledger.test.mjs +12 -130
- package/scripts/main-checkout.mjs +312 -0
- package/scripts/main-checkout.test.mjs +332 -0
- package/scripts/member-outcomes-header.test.mjs +3 -3
- package/scripts/member-outcomes.mjs +4 -5
- package/scripts/member-outcomes.test.mjs +92 -18
- package/scripts/member-prompt-prose.test.mjs +17 -13
- package/scripts/member-record.mjs +8 -3
- package/scripts/member-record.test.mjs +5 -5
- package/scripts/member-write-guard.mjs +5 -5
- package/scripts/member-write-guard.test.mjs +6 -3
- package/scripts/no-undo-audit.sh +24 -21
- package/scripts/no-undo-audit.test.mjs +9 -13
- package/scripts/pointer-target-prose.test.mjs +1 -1
- package/scripts/pr-overlap.test.mjs +6 -9
- package/scripts/prompt-renderer.mjs +10 -9
- package/scripts/prose-pin.mjs +10 -11
- package/scripts/prove-merge.test.mjs +3 -3
- package/scripts/quiet-payload-prose.test.mjs +1 -1
- package/scripts/reap.test.mjs +3 -4
- package/scripts/release-label-split-prose.test.mjs +17 -2
- package/scripts/release-ticket.test.mjs +35 -44
- package/scripts/review-core-cwd-isolation.test.mjs +7 -6
- package/scripts/review-core-reads.test.mjs +1 -1
- package/scripts/review-core-scratch-refusal.test.mjs +64 -0
- package/scripts/review-core-shared-test-run.test.mjs +238 -0
- package/scripts/review-core-snapshot-path.test.mjs +59 -12
- package/scripts/review-core-specialist-scratch.test.mjs +12 -10
- package/scripts/review-core-testcmd.test.mjs +76 -45
- package/scripts/review-core-unrun.test.mjs +154 -168
- package/scripts/review-core.mjs +250 -56
- package/scripts/review-eval.mjs +11 -4
- package/scripts/review-host-fixture.mjs +12 -3
- package/scripts/review-in-run-retry.test.mjs +27 -3
- package/scripts/review-runner-spawns.test.mjs +5 -3
- package/scripts/review-runner.test.mjs +14 -3
- package/scripts/review-tier-audit.test.mjs +1 -1
- package/scripts/run-merge-bot-prose.test.mjs +29 -6
- package/scripts/scratch-partition-invariant-prose.test.mjs +1 -1
- package/scripts/section-between-guard-prose.test.mjs +4 -3
- package/scripts/select-dimensions.test.mjs +1 -1
- package/scripts/shell-traps-prose.test.mjs +6 -9
- package/scripts/shortlist.mjs +4 -1
- package/scripts/shortlist.test.mjs +30 -16
- package/scripts/snapshot-repo.test.mjs +177 -4
- package/scripts/stash-prohibition-prose.test.mjs +1 -1
- package/scripts/temp-dir.mjs +47 -0
- package/scripts/tier-check.mjs +95 -28
- package/scripts/tier-check.test.mjs +131 -29
- package/scripts/tier-outcomes-header.test.mjs +11 -54
- package/scripts/tier-outcomes.mjs +34 -12
- package/scripts/tier-outcomes.test.mjs +157 -4
- package/scripts/tier-roles.mjs +118 -29
- package/scripts/tier-roles.test.mjs +226 -61
- package/scripts/tracker-block-copy-prose.test.mjs +3 -3
- package/scripts/verify-sha.test.mjs +4 -5
- package/scripts/watcher-degraded-block.test.mjs +5 -8
- package/scripts/within-run-pair-prose.test.mjs +43 -75
- package/scripts/worktree-audit.test.mjs +2 -1
- package/skills/next-ticket/SKILL.md +2 -2
- package/skills/run-team/SKILL.md +433 -303
- package/skills/run-team/references/ci-and-staleness.md +7 -6
- package/skills/run-team/references/correction-tickets.md +3 -3
- package/skills/run-team/references/isolation.md +1 -1
- package/skills/sizing-a-ticket/SKILL.md +8 -8
- package/scripts/tier-guard-gate-prose.test.mjs +0 -216
package/scripts/diff-stats.mjs
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// this file is executed directly.
|
|
18
18
|
|
|
19
19
|
import { execFileSync } from "node:child_process";
|
|
20
|
-
import {
|
|
20
|
+
import { isCLI } from "./is-cli.mjs";
|
|
21
21
|
import { makeDie, defineFlags } from "./arg.mjs";
|
|
22
22
|
|
|
23
23
|
const NAME = "diff-stats";
|
|
@@ -228,4 +228,4 @@ function main() {
|
|
|
228
228
|
console.log(JSON.stringify({ pr, ...stats }));
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
if (import.meta.url
|
|
231
|
+
if (isCLI(import.meta.url)) main();
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
import { test } from "node:test";
|
|
8
8
|
import assert from "node:assert/strict";
|
|
9
|
-
import { readFileSync, mkdtempSync, writeFileSync,
|
|
9
|
+
import { readFileSync, mkdtempSync, writeFileSync, rmSync } from "node:fs";
|
|
10
10
|
import { tmpdir } from "node:os";
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
import { spawnSync } from "node:child_process";
|
|
13
13
|
import { classify, computeStats } from "./diff-stats.mjs";
|
|
14
|
+
import { writeExecStub } from "./exec-stub.mjs";
|
|
14
15
|
|
|
15
16
|
// `main()` runs only when this file is executed directly, so the CLI wiring is
|
|
16
17
|
// unreachable from a unit test. Pinned as source text instead — see the
|
|
@@ -195,8 +196,7 @@ test("CLI: --pr given an empty value dies naming the flag", () => {
|
|
|
195
196
|
test("CLI: gh returning no files array dies (exit 2) rather than reporting a fabricated empty PR", () => {
|
|
196
197
|
const bin = mkdtempSync(join(tmpdir(), "diff-stats-bin-"));
|
|
197
198
|
const gh = join(bin, "gh");
|
|
198
|
-
|
|
199
|
-
chmodSync(gh, 0o755);
|
|
199
|
+
writeExecStub(gh, '#!/bin/sh\necho \'{"changedFiles":1}\'\n');
|
|
200
200
|
const r = spawnSync(process.execPath, [SCRIPT, "--pr", "5"], {
|
|
201
201
|
encoding: "utf8",
|
|
202
202
|
env: { ...process.env, PATH: `${bin}:${process.env.PATH}` },
|
|
@@ -218,8 +218,7 @@ test("CLI: gh returning no files array dies (exit 2) rather than reporting a fab
|
|
|
218
218
|
test("CLI: gh returning a null body dies (exit 2) naming the missing body, not a TypeError", () => {
|
|
219
219
|
const bin = mkdtempSync(join(tmpdir(), "diff-stats-bin-"));
|
|
220
220
|
const gh = join(bin, "gh");
|
|
221
|
-
|
|
222
|
-
chmodSync(gh, 0o755);
|
|
221
|
+
writeExecStub(gh, "#!/bin/sh\necho null\n");
|
|
223
222
|
const r = spawnSync(process.execPath, [SCRIPT, "--pr", "5"], {
|
|
224
223
|
encoding: "utf8",
|
|
225
224
|
env: { ...process.env, PATH: `${bin}:${process.env.PATH}` },
|
|
@@ -234,8 +233,7 @@ test("CLI: gh returning a null body dies (exit 2) naming the missing body, not a
|
|
|
234
233
|
test("CLI: a well-formed --pr value is accepted and the CLI succeeds", () => {
|
|
235
234
|
const bin = mkdtempSync(join(tmpdir(), "diff-stats-bin-"));
|
|
236
235
|
const gh = join(bin, "gh");
|
|
237
|
-
|
|
238
|
-
chmodSync(gh, 0o755);
|
|
236
|
+
writeExecStub(gh, '#!/bin/sh\necho \'{"files":[{"path":"a.ts","additions":1,"deletions":0}],"changedFiles":1}\'\n');
|
|
239
237
|
const r = spawnSync(process.execPath, [SCRIPT, "--pr", "5"], {
|
|
240
238
|
encoding: "utf8",
|
|
241
239
|
env: { ...process.env, PATH: `${bin}:${process.env.PATH}` },
|
|
@@ -284,8 +282,7 @@ const runWithGhStdout = (body) => {
|
|
|
284
282
|
writeFileSync(payload, body);
|
|
285
283
|
// `cat` of a file, not `echo` of an inlined string: the payloads below are
|
|
286
284
|
// real captured bytes, quotes and all, and must reach stdout unmangled.
|
|
287
|
-
|
|
288
|
-
chmodSync(join(bin, "gh"), 0o755);
|
|
285
|
+
writeExecStub(join(bin, "gh"), `#!/bin/sh\ncat "${payload}"\n`);
|
|
289
286
|
const r = spawnSync(process.execPath, [SCRIPT, "--pr", "5"], {
|
|
290
287
|
encoding: "utf8",
|
|
291
288
|
env: { ...process.env, PATH: `${bin}:${process.env.PATH}` },
|
|
@@ -395,8 +392,7 @@ test("CLI: a multi-line non-JSON payload is still clipped and marked, not just i
|
|
|
395
392
|
// clip would start discarding it — the inversion this ticket exists to avoid.
|
|
396
393
|
test("CLI: the quoted payload is gh's stdout alone — stderr never enters it", () => {
|
|
397
394
|
const bin = mkdtempSync(join(tmpdir(), "diff-stats-bin-"));
|
|
398
|
-
|
|
399
|
-
chmodSync(join(bin, "gh"), 0o755);
|
|
395
|
+
writeExecStub(join(bin, "gh"), '#!/bin/sh\necho "STDERR-ONLY-LINE" >&2\necho "<html>not json</html>"\n');
|
|
400
396
|
const r = spawnSync(process.execPath, [SCRIPT, "--pr", "5"], {
|
|
401
397
|
encoding: "utf8",
|
|
402
398
|
env: { ...process.env, PATH: `${bin}:${process.env.PATH}` },
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
//
|
|
61
61
|
// WHERE THE IMPLEMENTER BLOCKS LIVE (#1804). They were a run of `>` quote
|
|
62
62
|
// blocks in SKILL.md's phase 2 until spec 2026-09-24 § 2 Decision 2 moved them
|
|
63
|
-
// into the body
|
|
64
|
-
//
|
|
63
|
+
// into the implementer agent body, `agents/fleet-implementer-<cell>.agent.md`
|
|
64
|
+
// (byte-identical in every cell, pinned by implementer-model-tier.test.mjs), which each harness
|
|
65
65
|
// injects as the member's system prompt; #1804 deleted the SKILL.md copy. The
|
|
66
66
|
// body carries no `>` gutter, so a block there is delimited the only way the
|
|
67
67
|
// body itself can say: it opens on its own opener's paragraph and runs to the
|
|
@@ -79,7 +79,7 @@ const REPO = join(import.meta.dirname, "..");
|
|
|
79
79
|
const RUN_TEAM = readFileSync(join(REPO, "skills", "run-team", "SKILL.md"), "utf8");
|
|
80
80
|
|
|
81
81
|
// The body alone — everything after the frontmatter's closing `---`.
|
|
82
|
-
const AGENT_FILE = readFileSync(join(REPO, "agents", "fleet-implementer.agent.md"), "utf8");
|
|
82
|
+
const AGENT_FILE = readFileSync(join(REPO, "agents", "fleet-implementer-slow-high.agent.md"), "utf8");
|
|
83
83
|
const BODY = AGENT_FILE.split("---").slice(2).join("---");
|
|
84
84
|
|
|
85
85
|
// The Reviewers section is sliced before any opener is looked for, for the
|
|
@@ -275,6 +275,32 @@ const REGION_BLOCKS = [
|
|
|
275
275
|
"now **contradicts** is a bail, not a thing to implement: say which, and stop.",
|
|
276
276
|
],
|
|
277
277
|
},
|
|
278
|
+
{
|
|
279
|
+
what: "the implementer body's claim-discipline block",
|
|
280
|
+
opener: "**Claim discipline, on every ticket:**",
|
|
281
|
+
golden: [
|
|
282
|
+
"**Claim discipline, on every ticket:**",
|
|
283
|
+
"",
|
|
284
|
+
"1. The issue body is a lead, never a citation. Every factual claim the diff",
|
|
285
|
+
" restates needs a settling command run against the tree first.",
|
|
286
|
+
"2. Write no prose the ticket did not ask for — added prose is where minted",
|
|
287
|
+
" claims enter.",
|
|
288
|
+
"3. No positional references (`the closing/second/last X`); name the thing.",
|
|
289
|
+
"4. Evidence from another repo is cited by host: a github.com source as",
|
|
290
|
+
" `owner/repo#N`; anything else (GHE, GitLab, internal) as prose naming host",
|
|
291
|
+
" and repo and saying it cannot be settled from this repo. A bare `#N` is only",
|
|
292
|
+
" for the current repo's own issues and PRs.",
|
|
293
|
+
"5. Never write a count or tally into present-tense prose; state the property",
|
|
294
|
+
" instead (`every other test in the file`). A past-tense record of a",
|
|
295
|
+
" measurement you performed stays as written.",
|
|
296
|
+
"6. Every claim in a commit body or PR body gets its settling command re-run at",
|
|
297
|
+
" the commit that ships it, written inline beside the claim — a pushed body",
|
|
298
|
+
" cannot be edited.",
|
|
299
|
+
"7. A settling command over literal text uses `grep -F`, and its zero counts",
|
|
300
|
+
" only after the same command, with the same flags, finds a line known to",
|
|
301
|
+
" match.",
|
|
302
|
+
],
|
|
303
|
+
},
|
|
278
304
|
{
|
|
279
305
|
what: "the implementer body's commit-incrementally block",
|
|
280
306
|
opener: "Commit incrementally as you go",
|
|
@@ -693,6 +719,27 @@ const REVIEWER_BLOCKS = [
|
|
|
693
719
|
"that was two commits stale, and a finisher dispatched on either would have",
|
|
694
720
|
"halted on a diverged head.",
|
|
695
721
|
"",
|
|
722
|
+
"**Before you report, write every ruling to `<scratch>/dispositions-<pr>.json`**,",
|
|
723
|
+
"beside the review file — the record the controller checks with",
|
|
724
|
+
"`dispositions-check.mjs` before it dispatches any finisher. It is",
|
|
725
|
+
"`{\"head\": \"<the review file's head>\", \"entries\": [ … ]}`: one entry per",
|
|
726
|
+
"`survived` finding and per `unverified` finding, plus one per `refuted`",
|
|
727
|
+
"finding you reverse, its evidence in `reason`. Each entry carries `bucket`",
|
|
728
|
+
"(`survived|unverified|refuted`), `index` (its position in that bucket of the",
|
|
729
|
+
"review file), `scope` (`in|out`), `claimKind` (`behavior|shape`) and",
|
|
730
|
+
"`disposition` (`apply|defer`), and where they apply `reason`, `issue` (the",
|
|
731
|
+
"number you filed it to or commented on), `verdictPath` (an in-scope",
|
|
732
|
+
"suggestion's refuter verdict file) and `remedyFiles` (the files its remedy",
|
|
733
|
+
"names). A finding with no `line`, or on a line the PR's diff touched —",
|
|
734
|
+
"`git diff` from its merge-base with `origin/main` to the review's head — is",
|
|
735
|
+
"in scope whatever its `scope` says. An in-scope `survived` finding you defer",
|
|
736
|
+
"carries `reason` `false-rationale`, `mutual-exclusion`, `remedy-worse` or",
|
|
737
|
+
"`remedy-outside-diff`; the last needs `remedyFiles` to name a file the PR's",
|
|
738
|
+
"diff does not touch, and for a `critical` or `important` finding it sends the",
|
|
739
|
+
"PR to a human instead of passing. Any",
|
|
740
|
+
"other reason, none, or a `survived` or `unverified` finding with no entry is",
|
|
741
|
+
"a mismatch, and the PR gets no finisher.",
|
|
742
|
+
"",
|
|
696
743
|
"Then report to the controller the pushed SHA, your apply/defer split, and",
|
|
697
744
|
"the deferral issue numbers — a `filed: #N <subject>` line for every issue",
|
|
698
745
|
"step 5 created, and `unrecorded: #N <subject>` for one whose `ledger.mjs filed`",
|
|
@@ -727,6 +774,59 @@ const REVIEWER_BLOCKS = [
|
|
|
727
774
|
"like every other, not a spelling for you to correct.",
|
|
728
775
|
],
|
|
729
776
|
},
|
|
777
|
+
{
|
|
778
|
+
what: "the finisher's test-run verdict block",
|
|
779
|
+
opener: "**A test run is a verdict only if it ran to completion",
|
|
780
|
+
golden: [
|
|
781
|
+
"**A test run is a verdict only if it ran to completion — and you read that",
|
|
782
|
+
"off the test command's own exit status.**",
|
|
783
|
+
"Redirect the run's output to a file in your scratch directory and read the",
|
|
784
|
+
"command's own `$?` straight after it, then read the file. In an `eval` cell",
|
|
785
|
+
"there is no `$?`: spawn `<testCmd>` with its output going to that file and",
|
|
786
|
+
"read the exit code and the signal off the spawn result — `exitCode` and",
|
|
787
|
+
"`signalCode` on Bun's `spawnSync`, `returncode` on Python's `subprocess.run`,",
|
|
788
|
+
"which is negative for a signal. Never read the status of",
|
|
789
|
+
"`<testCmd> | tail` or `<testCmd> | grep`: a pipeline's status is its",
|
|
790
|
+
"last stage's, so the filter's 0 hides the run's own exit, and the array that",
|
|
791
|
+
"holds the earlier stages' statuses is spelled differently per shell. A run is",
|
|
792
|
+
"a verdict only when that exit status is 0 **and** its summary shows `tests`",
|
|
793
|
+
"above 0 and `cancelled` 0. A summary line without that",
|
|
794
|
+
"is not a verdict, whatever pass count it prints.",
|
|
795
|
+
"**A run completed when the command itself returned on its own** — an exit",
|
|
796
|
+
"code, no signal, and no `timeout`, deadline or kill of yours having fired.",
|
|
797
|
+
"Judge that by how the run ended, never by its `cancelled` count: a failing",
|
|
798
|
+
"`before` hook or a per-test `timeout` cancels tests inside a run that",
|
|
799
|
+
"completed, and a SIGTERM'd `node --test` can exit 1 with `cancelled` above 0",
|
|
800
|
+
"in a run that did not.",
|
|
801
|
+
"**Any run that did not complete is a killed run** — 124 (`timeout`), 137",
|
|
802
|
+
"(SIGKILL), 143 (SIGTERM), a signal in the spawn result, an `eval` cell's",
|
|
803
|
+
"deadline — and read for green it is FAILED, the same bucket as",
|
|
804
|
+
"`tests 0`, however many tests had passed before the kill. Halt with cause",
|
|
805
|
+
"`other` and the exit code plus the summary line as evidence; label nothing.",
|
|
806
|
+
"The same holds for the mutation gate: a killed run is not a mutant that",
|
|
807
|
+
"reddened, and the files it cancelled are not failures — only a run that",
|
|
808
|
+
"completed can kill a mutant. A completed run that exits 1 is a plain failure,",
|
|
809
|
+
"not a killed run, whatever its `cancelled` count, and exit 0 with `tests 0`",
|
|
810
|
+
"stays FAILED.",
|
|
811
|
+
"Do not wrap `<testCmd>` in an external `timeout`. Run a long suite in one",
|
|
812
|
+
"`eval` cell with `timeout: 0`, as the review runner does, and wait for it.",
|
|
813
|
+
],
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
what: "the finisher's duty-3 two-step block",
|
|
817
|
+
opener: "**Duty 3 is two steps, and only the second one labels.**",
|
|
818
|
+
golden: [
|
|
819
|
+
"**Duty 3 is two steps, and only the second one labels.**",
|
|
820
|
+
"(a) `gh pr view <M> --json labels` — confirm exactly one of",
|
|
821
|
+
"`patch`/`minor`/`major`. Zero or more than one halts you before the label:",
|
|
822
|
+
"name which you found. A repo whose `gh label list` defines none of the three",
|
|
823
|
+
"does not gate on one.",
|
|
824
|
+
"(b) `gh pr edit <M> --add-label ready-to-merge`. Step (a) passing labels",
|
|
825
|
+
"nothing; this command is the duty.",
|
|
826
|
+
"Then run `gh pr view <M> --json labels` once more and put its output in your",
|
|
827
|
+
"report: that read-back is what tells the controller the label is on.",
|
|
828
|
+
],
|
|
829
|
+
},
|
|
730
830
|
{
|
|
731
831
|
what: "the finisher's halt-cause block",
|
|
732
832
|
opener: "Worktree differs from your pin",
|
|
@@ -795,7 +895,7 @@ const REVIEWER_BLOCKS = [
|
|
|
795
895
|
|
|
796
896
|
const SURFACES = [
|
|
797
897
|
{
|
|
798
|
-
label: "the implementer agent body", file: "agents/fleet-implementer.agent.md", source: BODY, slice: body,
|
|
898
|
+
label: "the implementer agent body", file: "agents/fleet-implementer-slow-high.agent.md", source: BODY, slice: body,
|
|
799
899
|
extract: bodyBlock, all: (text) => bodyBlocks(text).blocks, blocks: REGION_BLOCKS, table: "REGION_BLOCKS",
|
|
800
900
|
},
|
|
801
901
|
{
|
|
@@ -844,7 +944,7 @@ test("the implementer agent body opens on its first fixtured block, with nothing
|
|
|
844
944
|
assert.equal(
|
|
845
945
|
bodyBlocks(BODY).lead,
|
|
846
946
|
"",
|
|
847
|
-
"agents/fleet-implementer.agent.md carries text ahead of its first fixtured block — a rule added there reaches every member and no golden fixture sees it",
|
|
947
|
+
"agents/fleet-implementer-slow-high.agent.md carries text ahead of its first fixtured block — a rule added there reaches every member and no golden fixture sees it",
|
|
848
948
|
);
|
|
849
949
|
});
|
|
850
950
|
|
|
@@ -861,7 +961,7 @@ test("run-team/SKILL.md has no verbatim block outside the fixtured Reviewers sec
|
|
|
861
961
|
assert.equal(
|
|
862
962
|
quoteBlocks(RUN_TEAM).length,
|
|
863
963
|
quoteBlocks(reviewers()).length,
|
|
864
|
-
"run-team/SKILL.md holds a quote block outside the Reviewers section — a block added there is invisible to the coverage tests above, and an implementer block re-pasted into phase 2 is a second copy of what agents/fleet-implementer
|
|
964
|
+
"run-team/SKILL.md holds a quote block outside the Reviewers section — a block added there is invisible to the coverage tests above, and an implementer block re-pasted into phase 2 is a second copy of what the agents/fleet-implementer-<cell>.agent.md body already carries",
|
|
865
965
|
);
|
|
866
966
|
});
|
|
867
967
|
|
|
@@ -945,6 +1045,11 @@ const APPENDED = [
|
|
|
945
1045
|
after: "say which, and stop.",
|
|
946
1046
|
carveOut: "If the criterion looks close enough, implement it anyway.",
|
|
947
1047
|
},
|
|
1048
|
+
{
|
|
1049
|
+
what: "the implementer body's claim-discipline block",
|
|
1050
|
+
after: "finds a line known to match.",
|
|
1051
|
+
carveOut: "Skip all of this when the ticket is a pure code change.",
|
|
1052
|
+
},
|
|
948
1053
|
{
|
|
949
1054
|
what: "the implementer body's issue-read block",
|
|
950
1055
|
after: "bail, name the cause, do not implement.",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
//
|
|
62
62
|
// WHERE THE BLOCKS LIVE (#1804). They used to be a run of `>` quote blocks in
|
|
63
63
|
// run-team/SKILL.md's phase 2, pasted into every implementer prompt. Spec
|
|
64
|
-
// 2026-09-24 § 2 Decision 2 moved them into
|
|
65
|
-
// `agents/fleet-implementer
|
|
66
|
-
// pinned by
|
|
64
|
+
// 2026-09-24 § 2 Decision 2 moved them into
|
|
65
|
+
// the implementer agent body, `agents/fleet-implementer-<cell>.agent.md`
|
|
66
|
+
// (byte-identical in every cell, pinned by implementer-model-tier.test.mjs), which each harness injects as the
|
|
67
67
|
// member's system prompt, and #1804 deleted the SKILL.md copy. These pins
|
|
68
68
|
// retargeted with them: same slices, same bounds, read off the agent body.
|
|
69
69
|
import { test } from "node:test";
|
|
@@ -75,11 +75,11 @@ import { between, phrase } from "./prose-pin.mjs";
|
|
|
75
75
|
const REPO = join(import.meta.dirname, "..");
|
|
76
76
|
// The body alone — everything after the frontmatter's closing `---` — so a
|
|
77
77
|
// frontmatter field can never satisfy a pin meant for text the member reads.
|
|
78
|
-
const AGENT_FILE = readFileSync(join(REPO, "agents", "fleet-implementer.agent.md"), "utf8");
|
|
78
|
+
const AGENT_FILE = readFileSync(join(REPO, "agents", "fleet-implementer-slow-high.agent.md"), "utf8");
|
|
79
79
|
const BODY = AGENT_FILE.split("---").slice(2).join("---");
|
|
80
80
|
|
|
81
81
|
function region(text = BODY) {
|
|
82
|
-
assert.ok(text.trim().length > 0, "agents/fleet-implementer.agent.md has no body — the implementer background moved again; update this test");
|
|
82
|
+
assert.ok(text.trim().length > 0, "agents/fleet-implementer-slow-high.agent.md has no body — the implementer background moved again; update this test");
|
|
83
83
|
return text;
|
|
84
84
|
}
|
|
85
85
|
|