Repository navigation
fleet i161: launchd suites fail loudly when mktemp fails (D-FLEET-50) - #2578
sunholo-voight-kampff wants to merge 5 commits into
Conversation
…50 = A) A shared guard, tools/launchd/lib/test-tmp.sh (mc_test_mktemp_d/_f), refuses a failed, empty, missing or caller-CWD mktemp result with a FATAL line. test_mission_base.sh and the three suites that wrote T=$(cd "$(mktemp -d)" && pwd -P) now stop before any git, cd or EXIT-trap rm -rf can reach the caller's checkout. install_coordinator.sh checks its plist temp file. New suite test_mktemp_guard.sh runs the guard and two real suites under a failing mktemp shim inside a sentinel directory and compares the real checkout's HEAD, local email and origin/dev before and after. Co-Authored-By: codex gpt-6.2-sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e guard; lint enforces it All in-scope suites in LAUNCHD_SUITES, the standalone tools/launchd tests, and the sprint-skill test scripts (with their .agents mirrors) now take temp paths from mc_test_mktemp_d/_f with a checked assignment, and register EXIT traps only after a validated allocation. test_mktemp_guard.sh gains a line-based lint (LINT-BAD/GOOD/LIST/ LIVE) that refuses a raw mktemp outside the guarded assignment form, an unchecked helper call and a local-masked assignment, across 69 files. Out-of-scope suites (tools/ci, tools/eval, tools/attended, scripts/test_worktree_sweep.sh) are unchanged and reported. Changelog fragment added. Co-Authored-By: codex gpt-6.2-sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fter the guard helper
The independent judge (sonnet, PASS 88) found that the lint accepted any `||` after
$(mc_test_mktemp_d …), so `|| true` or `|| exit 0` would disarm the exit-before-trap
protection unnoticed in test_mission_worktree.sh and test_mission_slots.sh, which have no
end-to-end injection arm. The helper form now needs the same terminal `|| exit N` /
`|| return N` (1-255) as the raw form, or a `|| { …; exit|return N; }` block. Four new
LINT-BAD fixtures and one LINT-GOOD fixture. Mutation-checked: reverting the rule reds
LINT-BAD; planting `|| true` in test_mission_slots.sh reds LINT-LIVE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…check-autopush (SC1091) The required lint job runs `make shellcheck-autopush`, which lints scripts/hooks/test_pre_push.sh alone at every severity. It could not follow the new helper source and reported SC1091 (info), failing the job. `# shellcheck source=/dev/null` on that line. Local: shellcheck-autopush rc 0, test-shellcheck-autopush rc 0, test_pre_push 37 passed (same as base), guard suite 11/0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n dev's inherited checks red [HARNESS] Log entry 161, charter STATUS stamp (158's stamp moved to the status archive), dashboard, regenerated log and status indexes, and evidence under design_docs/fleet-mission-evidence/iteration161/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fleet iteration 161 record is stacked on this branch ( |
…FLEET-46 ticket resolved; PR blocked on dev's inherited checks red [HARNESS] Iteration 162 built the fleet idle fingerprint (D-FLEET-49 = A) on top of PR #2578 and recorded it: log entry, STATUS stamp (159 rotated to the archive), dashboard, regenerated index and evidence under design_docs/fleet-mission-evidence/iteration162/. Under D-FLEET-46 = A it resolved pi:openrouter:uncapped-max-tokens-402 after a re-check at HEAD and left quorum:gpt6-1-sol-openai-api-credits-exhausted open (live seat still ABSENT on codex quota). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-credits-exhausted resolved; PRs still blocked on dev's inherited checks red [ADMIN] Iteration 163 resolved one ticket in the D-FLEET-46 = A class as bookkeeping. With codex headroom back at 4.9pp, the live 1-seat quorums seated both OpenAI seats on the codex subscription at $0 (gpt-6.2-sol, and gpt-6.2-astra after the judge objected). Fix 41c628b is on origin/dev. The independent sonnet judge voted RESOLVE 88%. The resolve's --sha was hand-typed and invalid. A correction naming the full SHA went to both filing inboxes. Nothing in the code changed. The record adds the log entry, a STATUS stamp (160 rotated to the archive), the dashboard, an index row and evidence under design_docs/fleet-mission-evidence/iteration163/. PR #2580, which carries #2578, still waits on dev's required checks; D-FLEET-52 is unanswered and its default is B. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…FLEET-46 ticket resolved; PR blocked on dev's inherited checks red [HARNESS] Iteration 162 built the fleet idle fingerprint (D-FLEET-49 = A) on top of PR #2578 and recorded it: log entry, STATUS stamp (159 rotated to the archive), dashboard, regenerated index and evidence under design_docs/fleet-mission-evidence/iteration162/. Under D-FLEET-46 = A it resolved pi:openrouter:uncapped-max-tokens-402 after a re-check at HEAD and left quorum:gpt6-1-sol-openai-api-credits-exhausted open (live seat still ABSENT on codex quota). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-credits-exhausted resolved; PRs still blocked on dev's inherited checks red [ADMIN] Iteration 163 resolved one ticket in the D-FLEET-46 = A class as bookkeeping. With codex headroom back at 4.9pp, the live 1-seat quorums seated both OpenAI seats on the codex subscription at $0 (gpt-6.2-sol, and gpt-6.2-astra after the judge objected). Fix 41c628b is on origin/dev. The independent sonnet judge voted RESOLVE 88%. The resolve's --sha was hand-typed and invalid. A correction naming the full SHA went to both filing inboxes. Nothing in the code changed. The record adds the log entry, a STATUS stamp (160 rotated to the archive), the dashboard, an index row and evidence under design_docs/fleet-mission-evidence/iteration163/. PR #2580, which carries #2578, still waits on dev's required checks; D-FLEET-52 is unanswered and its default is B. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i161 M1: launchd suites fail loudly when mktemp fails (D-FLEET-50 = A)
A shared guard, tools/launchd/lib/test-tmp.sh (mc_test_mktemp_d/_f), refuses a failed,
empty, missing or caller-CWD mktemp result with a FATAL line. test_mission_base.sh and the
three suites that wrote T=$(cd "$(mktemp -d)" && pwd -P) now stop before any git, cd or
EXIT-trap rm -rf can reach the caller's checkout. install_coordinator.sh checks its plist
temp file. New suite test_mktemp_guard.sh runs the guard and two real suites under a
failing mktemp shim inside a sentinel directory and compares the real checkout's HEAD,
local email and origin/dev before and after.
Co-Authored-By: codex gpt-6.2-sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i161 M2+M3: every launchd suite allocates temp paths through the guard; lint enforces it
All in-scope suites in LAUNCHD_SUITES, the standalone tools/launchd tests, and the
sprint-skill test scripts (with their .agents mirrors) now take temp paths from
mc_test_mktemp_d/_f with a checked assignment, and register EXIT traps only after a
validated allocation. test_mktemp_guard.sh gains a line-based lint (LINT-BAD/GOOD/LIST/
LIVE) that refuses a raw mktemp outside the guarded assignment form, an unchecked helper
call and a local-masked assignment, across 69 files. Out-of-scope suites (tools/ci,
tools/eval, tools/attended, scripts/test_worktree_sweep.sh) are unchanged and reported.
Changelog fragment added.
Co-Authored-By: codex gpt-6.2-sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i161 judge round 1: the lint requires || exit N / || return N after the guard helper
The independent judge (sonnet, PASS 88) found that the lint accepted any `||` after
$(mc_test_mktemp_d …), so `|| true` or `|| exit 0` would disarm the exit-before-trap
protection unnoticed in test_mission_worktree.sh and test_mission_slots.sh, which have no
end-to-end injection arm. The helper form now needs the same terminal `|| exit N` /
`|| return N` (1-255) as the raw form, or a `|| { …; exit|return N; }` block. Four new
LINT-BAD fixtures and one LINT-GOOD fixture. Mutation-checked: reverting the rule reds
LINT-BAD; planting `|| true` in test_mission_slots.sh reds LINT-LIVE.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i161: test_pre_push.sh sources the guard without tripping shellcheck-autopush (SC1091)
The required lint job runs `make shellcheck-autopush`, which lints scripts/hooks/test_pre_push.sh
alone at every severity. It could not follow the new helper source and reported SC1091 (info),
failing the job. `# shellcheck source=/dev/null` on that line. Local: shellcheck-autopush rc 0,
test-shellcheck-autopush rc 0, test_pre_push 37 passed (same as base), guard suite 11/0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i161 record: D-FLEET-50 = A built, judged PASS 92; PR blocked on dev's inherited checks red [HARNESS]
Log entry 161, charter STATUS stamp (158's stamp moved to the status archive), dashboard,
regenerated log and status indexes, and evidence under
design_docs/fleet-mission-evidence/iteration161/.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(launchd): fleet arm for the idle fingerprint (D-FLEET-49 M1)
lib/idle-fingerprint.sh now accepts MISSION_NAME=fleet. The fleet arm hashes
the open-ticket set (signature, slots_lost, last_seen), the charter's ledger
statuses on origin/dev, allowlisted directives on the current and previous
bookkeeping issue, the unread mission-fleet inbox, and dev's required-check
verdicts (newest completed verdict per classic-protection context across at
most 8 first-parent tips, so a pending tip does not flip the hash). No head
and no nightly-rig rows. Any failed or malformed read prints no fingerprint.
The product arm's rows and output are unchanged. The driver still excludes
fleet until M2.
Co-Authored-By: codex gpt-6.2-sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(launchd): the fleet takes the shared idle pre-check and snapshot (D-FLEET-49 M2)
The driver's MISSION IDLE PRE-CHECK and MISSION IDLE SNAPSHOT blocks no longer
exclude fleet. The fleet ticket count still runs first, so zero tickets exits
before any fingerprint read. Gate 5's IDLE RECORD now covers fleet: record only
a NONE pick the independent judge sustained, with no fleet PR landing owed.
The .agents mirror of gate-5-retro.md is kept byte-identical. Driver tests
cover match, change, failed read, expiry, zero-count precedence, triage,
work-item and dry-run exclusions, and the fleet snapshot.
The executor's run hit its 30-minute cap before the drills. The controller
fixed one test stub (the ticket-count call has 6 arguments, not 5), mirrored
the skill file, and ran drills (e) and (f): each reds its named arm.
Co-Authored-By: codex gpt-6.2-sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(launchd): judge round 1 — pin the green-older-tip lookback; say when a fleet PR bars the idle record
The independent judge (sonnet, PASS 82) found two surviving mutants in the
required-check lookback: with the older verdict already red, a pending run
mis-read as resolved also reads red, so the busy-tip arm could not tell. A new
case starts from an all-green tip and adds a busy tip on top; both mutants
(any-completed, and dropping the completed requirement) now red it.
Its strongest objection: Gate 5 did not say whether a fleet record PR left open
bars recording. A matching next fire exits before it could merge it, so the
record PR would strand until the 24 h expiry. The rule now says: merging an
earlier record PR does not count as a landing; record only if this fire leaves
no fleet PR open, except one blocked only on dev's required red (dev turning
green changes the fingerprint). The .agents mirror stays byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i162 record: D-FLEET-49 = A built, judged PASS 82 -> 86; one D-FLEET-46 ticket resolved; PR blocked on dev's inherited checks red [HARNESS]
Iteration 162 built the fleet idle fingerprint (D-FLEET-49 = A) on top of
PR #2578 and recorded it: log entry, STATUS stamp (159 rotated to the
archive), dashboard, regenerated index and evidence under
design_docs/fleet-mission-evidence/iteration162/. Under D-FLEET-46 = A it
resolved pi:openrouter:uncapped-max-tokens-402 after a re-check at HEAD and
left quorum:gpt6-1-sol-openai-api-credits-exhausted open (live seat still
ABSENT on codex quota).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i162 record: file D-FLEET-52 (may the fleet clear dev's in-scope checks red that blocks its PRs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i163 record: D-FLEET-46 = A ticket quorum:gpt6-1-sol-openai-api-credits-exhausted resolved; PRs still blocked on dev's inherited checks red [ADMIN]
Iteration 163 resolved one ticket in the D-FLEET-46 = A class as bookkeeping. With codex headroom
back at 4.9pp, the live 1-seat quorums seated both OpenAI seats on the codex subscription at $0
(gpt-6.2-sol, and gpt-6.2-astra after the judge objected). Fix 41c628b is on origin/dev. The
independent sonnet judge voted RESOLVE 88%.
The resolve's --sha was hand-typed and invalid. A correction naming the full SHA went to both
filing inboxes. Nothing in the code changed.
The record adds the log entry, a STATUS stamp (160 rotated to the archive), the dashboard, an
index row and evidence under design_docs/fleet-mission-evidence/iteration163/. PR #2580, which
carries #2578, still waits on dev's required checks; D-FLEET-52 is unanswered and its default is B.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fleet i163 record: correct the astra quorum probe's token count
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: codex gpt-6.2-sol <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Landed through #2580, which carried this PR's commits unchanged. Fleet iteration 164 rebased them onto Closing this PR unmerged because its content is already on |
…n prod (#2630) * fleet i164 record: LANDED #2580 (carrying #2578) as 6b460bd [HARNESS] D-FLEET-50 = A (launchd temp-path guard) and D-FLEET-49 = A (fleet idle fingerprint) are on dev after dev's required checks went green again (a66b854). The PR was rebased because the scope guard refuses a dev merge; its patch-id is identical to the judged diff. Independent evaluator (sonnet): LAND-WITH-CONDITIONS 82%. STATUS 161 rotated to the archive; D-FLEET-52 annotated as overtaken (stays OPEN for Mark). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fleet i165 record: codex-lane fix 509146d inert in prod; no trio ticket resolvable [HARNESS] D-FLEET-46 = A re-check of the 509146d trio. The cloud completion path (CompareAndSetTaskStatus, both stores) never writes completed_at, and credentialLaneHolder skips a failed task without it, so the 11-16 lane fix has never held in prod. T1's repro recurred on 2026-11-28 under v0.64.1 (task-a2ab3af9 -> task-0a62d908). Independent sonnet judge AGREE 90%, root cause reproduced by mutation. Routed to mission-v1 under D-FLEET-39 A; no ticket resolved. Log entry 165, STATUS 165 (162 rotated to the archive), queue rows 54/55 annotated, dashboard, evidence under iteration165/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Fleet mission iteration 161. Builds Mark's attended ruling D-FLEET-50 = A: the fleet fixes the harness defect it found first-hand in iteration 155, where a failed
mktemplettools/launchd/test_mission_base.shcommit into the caller's checkout.What was wrong. On the rig's bash 3.2.57,
cd ""is a no-op andcd "" && pwd -Pprints the current directory with rc 0. So:test_mission_base.shrangit init,git configandgit commitin the caller's repo whenmktemp -dreturned nothing (iteration 155's incident).test_mission_worktree.sh,test_mission_slots.shandtest_mission_fire_env.shwroteT=$(cd "$(mktemp -d)" && pwd -P)and thenrm -rf "$T"on exit, so a failedmktempwould have deleted the caller's directory.Change.
tools/launchd/lib/test-tmp.sh:mc_test_mktemp_d/mc_test_mktemp_frefuse a failed, empty, missing or caller-directory result with oneFATAL:line and empty stdout.tools/launchd/test_*.sh, the sprint-skill test scripts and their.agentsmirrors) allocate through it with a checked assignment, and register EXIT traps only after a validated allocation.install_coordinator.shchecks its plist temp file.tools/launchd/test_mktemp_guard.sh(11 arms): guard behaviour under a failingmktempshim, two real suites run end to end under that shim inside a sentinel directory with the real checkout's HEAD, local email andorigin/devcompared before and after, and a lint over 69 suite files that refuses unguarded allocations.tools/attended/test_codex_oauth_profiles.sh,tools/ci/test_require_checks.sh,scripts/test_worktree_sweep.sh,tools/eval/test_motoko_connection_probe.sh.Verification (outside any sandbox, darwin/arm64, bash 3.2.57).
make test-launchd-drivers: base433529cd164 PASS / 0 FAIL; candidate 65 PASS / 0 FAIL. Every suite that prints a count prints the same count as base.bash -non 61 changed shell files: clean.shellcheck -S error: rc 0, and no new finding at any severity vs base.make check-changelogrc 0.mktempintmpdir, the nested-cdform, removing the empty-output check, removing the caller-directory check, an empty lint file list, one raw allocation inscripts/hooks/test_pre_push.sh, and|| trueafter the helper. Each one turns its named arm red.||) is fixed in2c6f6f871.🤖 Generated with Claude Code