Repository navigation
Conversation
omp (Oh My Pi) joins as a CANDIDATE crewmate/scout adapter, not a verified one: the wiring is deterministically proven against a stub executable, but its first live pilot stays separately approval-gated, so nothing dispatches real work on it yet. It is reachable only through an explicit --harness omp or an explicit local config/crew-harness value; it is never a coordinator, a backend, or an implicit default, and the shipped configuration is unchanged. Every omp launch is pinned twice. The executable must be the `omp` on PATH reporting exactly omp/17.2.9, probed with --version and nothing else. The model must arrive on this spawn's own --model flag as a fully qualified provider/model, validated structurally and passed through byte-for-byte; omp's legacy --provider flag is never passed, so no fuzzy match, provider cycle, or fallback is reachable from the launch. An absent, unqualified, malformed, or ambiguous model - and a secondmate selection, on adapter identity alone - refuses before the watcher guard runs and before any lock, endpoint, worktree, state, config, registry, metadata, or extension mutation. The guard therefore moves below argument parsing and the effective-selection resolution, and the positional harness split is hoisted to that same point so it is resolved once, as pure string work, before anything is created. A --relaunch adopts its harness from the task's own record, so it reaches the identical refusals at that adoption point. The launch clears the foreign CLAUDECODE, PI_CODING_AGENT, GROK_AGENT, and FM_PI_HARNESS markers and sets the firstmate-owned FM_OMP_HARNESS=1; --no-extensions and --no-skills leave the firstmate-written state/<id>.omp-ext.ts as the only loaded extension; and the --tools allowlist excludes omp's task subagent delegation plus its browser, computer, web-search, and MCP surface. No effort flag is wired. Liveness and the busy-state trust table both match the exact token `omp`, never a substring, because `omp` occurs inside ordinary shell machinery such as compinit, compdef, and composer. Teardown removes the per-task extension in both its top-level and secondmate-child cleanup lists. Non-omp harnesses are unchanged and still receive no model or provider flag when none was requested. tests/fm-omp-harness.test.sh adds two policy matrices that report their own row counts rather than a bare pass: 12 equivalence classes of rejected model value and 8 selection shapes, each proven to refuse before any mutation.
The landed omp candidate could still launch on a non-Orca backend, inherited the home's frozen trace-context decision, and applied its model pin on relaunch only after lock acquisition. Resolve the backend read-only before any mutation, retain that value so the refusal and endpoint creation cannot drift, and refuse any resolved backend other than orca at the same early gate as the model pin. Force effective trace propagation off for omp and strip TRACEPARENT from the child so an ambient carrier cannot reach it. Bind one read-only regular-file metadata snapshot before every lock so a relaunch can apply omp's model and backend gates, and reject an unsafe record, before the watcher guard, spawn lock, or any other mutation. The locked endpoint validation remains authoritative. This does not change the existing Orca metadata-publication refusal that already sits after the temp-file write and before relaunch promotion. omp stays a CANDIDATE adapter: no shipped default, no live-verified claim.
… relaunch preflight
💡 Codex ReviewLines 662 to 664 in 4f071a5 Captain, when AGENTS.md reference: AGENTS.md:L187-L189 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Closed as superseded — this work already landed on main via #3867. — Kun's Firstmate |
Intent
Harvest three behaviors from the preserved tag atx1840/omp-upstream-07450 (commit 9e2aed9) into firstmate main, adapting each to the CURRENT code rather than cherry-picking. This task changes firstmate's shared tracked material (bin/, .agents/skills/), so firstmate-coding-guidelines (knowledge-placement, one-owner, repo-style) are binding.
The omp candidate adapter already landed on main at 7cf00a0 (merged as db9aa5b). It is deliberately CANDIDATE-only: not live-verified, reachable only through an explicit --harness omp. Nothing here changes that dormancy. Do not live-verify or pilot omp. Do not change config/crew-harness, config/crew-dispatch.json, or any dispatch default. Do not touch the atx1840/omp-reference tag content or anything under projects/.
The three behaviors, in dependency order:
backend=orca gate (from f4c8af4). omp must refuse to launch on any non-Orca backend. Implement require_omp_orca_backend(), resolved READ-ONLY before any mutation, with the resolved value RETAINED so it cannot drift between the refusal check and endpoint creation. This is the highest-value item — implement it first and make it independently testable. The refusal must happen before ANY lock, endpoint, worktree, state, config, registry, metadata, or extension mutation — the same standard the existing omp model-pin refusal already meets. Prove it in a test, not in prose.
Trace suppression, enforced rather than assumed (from f4c8af4). Force SPAWN_TRACE_EFFECTIVE=off for omp and strip TRACEPARENT from the child via the launch template. The landed candidate only ASSERTS that no traceparent= reaches metadata and otherwise relies on the home default being off — that is an assumption, not an enforcement. Close it.
Relaunch preflight before the locks (from cf4d08b + 9e2aed9). Move omp's model and backend gates ahead of every lock via a bounded READ-ONLY relaunch preflight, and reject unsafe relaunch records early. The landed candidate refuses a record-adopted relaunch at the adoption point, which is AFTER lock acquisition — weaker against the "refuse before any mutation" invariant. Related: bin/fm-spawn.sh now carries an Orca metadata-publication refusal placed immediately after the } > "$SPAWN_META_PATH" write and BEFORE the relaunch promotion. Item 3 work must not duplicate or weaken it. This implementation rejects unsafe relaunch records for every harness and applies omp model/backend gates before any lock; it does NOT change the general metadata temp-file promotion sequence (the existing Orca publication refusal before promotion is unchanged). Do not overstate that as closing the muse-disposition promotion gap.
Acceptance: each of the three behaviors is implemented against current main and independently covered by a test that FAILS without the change. tests/fm-omp-harness.test.sh and tests/fm-busy-adapter-wiring.test.sh pass, and tests/fm-backend-orca.test.sh stays at zero failures attributable to this change. bin/fm-lint.sh is clean. omp stays dormant: no change to shipped config/crew-harness, no new implicit default, no live-verified claim anywhere in docs or skills. .agents/skills/harness-adapters/SKILL.md's omp section is updated to describe what the adapter now does, still marked CANDIDATE / NOT LIVE-VERIFIED.
Implementation notes a reviewer should treat as deliberate: do not cherry-pick or merge the reference tag; reimplement semantically against current main (SPAWN_META_PATH/SPAWN_META_TMP publication plus relaunch promotion already exist). Tests exercise behavior through fm-spawn, not implementation-source bytes. The omp-harness suite defaults the test fixture backend to orca and stubs the Orca CLI so successful omp launches remain deterministic; non-Orca backends are refused by explicit --backend matrix. A host-local fm-backend-orca scout-teardown case can fail when tasks-axi is absent; that is a pre-existing environment gap, not this change (the omp-on-Orca cases in that suite pass).
What Changed
ompcrewmate/scout adapter intobin/fm-spawn.sh(with supporting changes inbin/fm-backend.sh,bin/fm-busy-lib.sh,bin/fm-harness.sh,bin/fm-teardown.sh, andbin/backends/tmux.sh), and addsrequire_omp_orca_backend(), which resolves the backend read-only and refuses any non-Orca backend before any lock, endpoint, worktree, state, config, registry, metadata, or extension mutation. The resolved value is retained so it cannot drift between the refusal check and endpoint creation, and the late relaunch gate re-checks the locked$BACKENDrather than the pre-lock snapshot.ompinstead of relying on the home default:SPAWN_TRACE_EFFECTIVEis forced tooffandTRACEPARENTis stripped from the child via the launch template. Adds an Orca metadata-publication refusal that releases resources rather than promoting a partially written record, and validates live composite Orca worktree handles.--relaunchnow rejects astate/<id>.metathat is a symlink, is not a regular file, or fails a two-descriptor stability check, and applies theompmodel and backend gates before any mutation. This refusal is new for every harness, not justomp. Covered by the newtests/fm-omp-harness.test.shsuite plus additions totests/fm-backend-orca.test.shandtests/fm-busy-adapter-wiring.test.sh;ompstays CANDIDATE / NOT LIVE-VERIFIED, with no change to shippedconfig/crew-harnessor any dispatch default.Pipeline: Review and Document each raised informational-only findings (a defensive metadata-status branch that errexit already covers, a raw
omp ...command string that bypasses the adapter contract, the new preflight's cross-harness blast radius, a duplicated refusal message string, and pre-existing SKILL.md wording). Onetests/fm-backend-orca.test.shcase fails on this host becausetasks-axiis absent; that case is untouched by this change and everyomp-on-Orca case passes.Risk Assessment
Testing
Ran the three suites the intent names as acceptance, then drove the actual operator-facing behavior through real fm-spawn against stub executables and captured a CLI transcript for each of the three harvested behaviors: the non-Orca backend refusal with a post-refusal scan proving zero home mutations, the trace suppression showing the
-u TRACEPARENTlaunch prefix and a metadata record with notraceparent=even from a trace-on home with an ambient carrier, and the pre-lock relaunch preflight refusing an unsafe/non-Orca/model-less record with no lock files left behind. I then neutered each behavior in turn and confirmed a distinct test failure for each, so the coverage genuinely bites, restoring the file byte-for-byte afterwards. fm-omp-harness and fm-busy-adapter-wiring are green; fm-backend-orca has one failure that is a pre-existing host gap (tasks-axi absent), unattributable to this change and unfixable from inside the worktree. This is a shell/CLI change with no rendered surface, so the evidence is CLI transcripts rather than screenshots.Evidence: CLI transcript: all three omp behaviors driven through real fm-spawn
Evidence: Evidence harness that produced the transcript (re-runnable: FM_REPO=<worktree> bash omp-harvest-demo.sh)
Evidence: Fails-without-the-change proof (one mutation per behavior, with the resulting failure line)
Evidence: Backend gate refusal + zero-mutation proof (excerpt)
Evidence: Enforced trace suppression from a trace-on home with an ambient carrier (excerpt)
Evidence: Relaunch preflight refusing ahead of every lock (excerpt)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
bin/fm-spawn.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
bin/fm-spawn.sh:3104- The Orca metadata-publication refusal is dead code. The script runs underset -eu(line 219) and} > "$SPAWN_META_PATH"is a top-level compound, so a failed redirect or a failedechoinside the group aborts via errexit beforeMETA_WRITE_STATUS=$?ever runs; if errexit somehow did not fire, the group's status is that of its last command (theif [ "$SPAWN_CONTROL_PARENT" = 1 ] ...test), which is 0 on the common path.tests/fm-backend-orca.test.sh:test_spawn_releases_orca_resources_when_metadata_write_failsconfirms this: it asserts the raw bash"Is a directory"message, never"failed to publish Orca metadata". The invariant (never promote broken metadata) does hold, but via errexit + the abort trap, not via this branch. Making it real is mechanical:if ! { ... } > "$SPAWN_META_PATH"; thensuppresses errexit for the group so the status is actually observable.bin/fm-spawn.sh:3017- A raw launch command whose first non-assignment word isomp(e.g.fm-spawn.sh <id> <proj> "omp --model a/b" --mode ... --yolo off) setsHARNESS=ompat line 1481, which then reaches the omp-specific branches — forced trace-off here,omp-extbusy wiring infm-busy-lib.sh,harness=ompin metadata — whilespawn_selection_is_ompdeliberately returns 1 for anyARG3containing a space, so the version pin,--model <provider>/<model>pin, andbackend=orcagate are all skipped. The header comment states raw commands are intentionally outside every adapter contract, andmusehandles this the other way (its secondmate refusal at line 1520 keys on$HARNESSand so does cover raw commands). Worth confirming the asymmetry is intended: as written, a rawomp ...string is one CLI argument away from an unpinned omp build launching on tmux while still being recorded and supervised as harness=omp.bin/fm-spawn.sh:534- The new preflight is the one part of this change that alters a shared, non-omp production path: every--relaunch, on every harness, now refuses before the watcher guard and every lock ifstate/<id>.metais a symlink, is not a regular file, or fails the two-descriptor stability binding. Previously the relaunch path only required[ -f "$RELAUNCH_META" ], which follows symlinks. This matches the stated intent ("reject unsafe relaunch records early") andtest_valid_nonomp_relaunch_passes_the_preflightcovers the happy path, but the refusal is new for all adapters, not just the dormant omp one — noting it so the blast radius is a recorded decision rather than a surprise.bin/fm-spawn.sh:1538- The late relaunch gate re-implements the Orca check inline ([ "$BACKEND" != orca ]plus a byte-identical copy of the refusal message fromrequire_omp_orca_backendat line 466) instead of sharing one emitter. The two checks legitimately read different sources of truth — the pre-lock resolved value versus the locked, record-adopted$BACKEND— so the duplicated logic is defensible, but the duplicated message string is a drift hazard:tests/fm-omp-harness.test.shasserts on"omp requires backend=orca"and would silently stop covering one of the two sites if only one string changed. Extracting a smallrefuse_omp_non_orca_backend <resolved>helper that both call keeps the two independent resolutions and removes the duplicated literal.tests/fm-backend-orca.test.sh:955- tests/fm-backend-orca.test.sh has one failure, "Orca scout teardown should succeed once report exists" (task orcateardownz3), becausetasks-axiis absent on this host and the scout completion gate refuses without it (fm-decision-hold: compatible tasks-axi is required). That case is untouched by this change (context-only in the diff) and cannot be fixed from inside the worktree — installing tasks-axi is out of bounds. Every omp-on-Orca case in the suite passes, including the new omp teardown/extension-cleanup case.bash tests/fm-omp-harness.test.sh— all passed (24 cases plus the 12-class model matrix and 8-row selection matrix, both self-reporting their row counts)bash tests/fm-busy-adapter-wiring.test.sh— all passed, including the two omp-ext casesbash tests/fm-backend-orca.test.sh— 1 failure, pre-existing host gap (see findings); the omp Orca launch and omp teardown/extension-cleanup cases passManual CLI transcript viaomp-harvest-demo.sh: realbin/fm-spawn.shagainst stub tmux/orca/omp — backend matrix (tmux/herdr/zellij/cmux refused, orca launches) plus a post-refusalfindover state/ and config/ showing zero mutationsManual CLI transcript:TRACEPARENT=<carrier> fm-spawn.sh ... --harness omp --backend orcafrom a home whose.trace-context-effectiveis frozenon— captured the delivered launch argv, every pane send line, and the full recorded<id>.metaManual CLI transcript:fm-spawn.sh --relaunch <id>against abackend=tmuxomp record, then without--model, then against a symlinked metadata record — captured each refusal plus afindfor*.lock*Fails-without-the-change proof: neuteredrequire_omp_orca_backend, then theHARNESS = omptrace-force branch, then-u TRACEPARENTin the omp launch template, then the--relauncharm ofspawn_selection_is_omp; re-ranbash tests/fm-omp-harness.test.shafter each and restored bin/fm-spawn.sh (git status clean).agents/skills/harness-adapters/SKILL.md:44- Pre-existing wording in .agents/skills/harness-adapters/SKILL.md's new-harness verification checklist says the bin/backends/tmux.sh agent-process liveness classification is recorded "when the harness can launch a secondmate". Both muse and now omp are crewmate/scout-only yet correctly carry that classification for pane liveness, so the conditional under-describes when it is required. Left unedited as out of scope (the looseness predates this change and the omp section already documents its own anchored classification); worth a one-line wording fix in a follow-up.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.