Repository navigation
fix: recognize the bun-installed omp as a harness process - #8350
Conversation
|
Speaking as Kun's firstmate: thanks @fmaggi-cw. I read the full diff against main Status: waiting on you. It's a draft, so it isn't in the merge queue yet. When it's ready, please raise it through no-mistakes with What I checked (looks right): VISION (per rule): One captain: aligns (the session no longer stays read-only without saying why). Authority explicit: aligns. Scripts own mechanics: aligns (exact process identity). Restart non-event: aligns. Delegation: aligns. Fleet outlives vendor: aligns (adapter verification for an install main already lists). Scope: aligns. Contract-class: restore. |
[Medium impact] No new blocking issue was found beyond the existing review threads. Reviews (3) · Last reviewed commit: "no-mistakes(document): Note omp live gua..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thanks @fmaggi-cw for marking this ready. I re-read the full diff at This waits on you for two things:
My read is unchanged on the rest. Contract-class: restore. Main already records the Bun package install ( |
b29e4db to
c76d456
Compare
|
Speaking as Kun's firstmate: thank you @fmaggi-cw. That settles all three things I asked for. I read the full diff at
The full suite is queued now; nothing is needed from you while it runs. contract-class: restore. VISION: One captain aligns (the session no longer stays read-only without saying why) · Authority aligns · Scripts aligns (exact process identity) · Restart aligns · Delegation aligns · Vendor aligns (adapter verification for an install |
|
Speaking as Kun's firstmate: thanks @fmaggi-cw. The labelled full suite ran on This waits on you for one fix.
These fixtures already copy Everything else still holds: no-mistakes binds contract-class: restore, unchanged. |
The bun global package runs omp as `bun <path>/omp`, so ps reports the process name `bun` and the lock ancestry walk and primary detection, which matched only the exact name `omp`, refused the session lock and printed unknown. bin/fm-omp-process-lib.sh now owns omp identity: the exact name `omp`, or bun whose first non-option argument is a script named `omp` or the package's dist/cli.js. Both call sites use it. Regressions drive real processes through fm-harness.sh and fm-lock.sh, and the omp live guard gains a token-free installed-omp identity probe.
The ps args fallback split the script path on whitespace, so a path like /opt/Agent Tools/bin/omp was judged as /opt/Agent. Rebuild the first non-option word until it names an existing file. The token-free live guard now also asserts the saved session lock names the omp process.
Match only comm omp, or bun whose argv0 is bun and whose next argument is a script named exactly omp. Drop the dist/cli.js path, the bun option skip with its eval/print exclusion, and the argv0-omp-under-bun branch, with their tests and doc mentions. Spaced install paths still resolve.
c76d456 to
5cae1d2
Compare
|
Speaking as Kun's firstmate: thanks @fmaggi-cw, that's the fix I asked for. On The no-mistakes attestation binds this head with no skipped steps, Greptile is 5/5 with both threads resolved, and the branch is current with main. contract-class: restore, unchanged. Nothing is needed from you while it runs. |
|
Speaking as Kun's firstmate: this is merged. Thank you @fmaggi-cw — really appreciate you taking the time on this. |
Resolve conflicts with the omp process identity library (kunchenguid#8350) by sourcing and checking both the omp and Auggie identity libraries and by listing both in the test fixtures that copy them.
Intent
for your modification of firstmate: see and act on this review #8350 (comment)
The modification is PR #8350, "fix: recognize the bun-installed omp as a harness process", opened from the fork branch fmaggi-cw/firstmate:fm/fm-omp-bun-identity-pr (head b29e4db). It adds bin/fm-omp-process-lib.sh with fm_omp_process_matches, used by the session-lock ancestry walk (bin/fm-session-lock-lib.sh) and harness detection (bin/fm-harness.sh), so an omp installed as the bun global package (process
bun <path>/omp) is recognized and owns its session lock.The review asks for three things:
read -r -asplits the printed ps args on whitespace, sobun /opt/Agent Tools/bin/ompis checked as/opt/Agentand refused, and both detection and the session-lock walk miss a bun-run omp on that install path. Handle a script path that contains spaces, with a regression for it.git push no-mistakesfrom the fork branch, so the attestation binds the head with no skipped steps.What Changed
bin/fm-omp-process-lib.shwithfm_omp_process_matches. It matches the compiledompbinary by exact process name, and also matches the bun global package, wherepsreportsbun <path>/omp. Becausepsjoins argv with spaces, the function rebuilds a script path containing spaces (such asbun /opt/Agent Tools/bin/omp) by extending the word until it names an existing file.bin/fm-harness.sh(marker check and ancestry verdict) and the session-lock walk inbin/fm-session-lock-lib.shboth use it, so a bun-run omp is detected asompand owns its session lock.ompd,comp, and other scripts followed by anompargument still don't match.tests/fm-omp-harness.test.shandtests/fm-session-lock-ancestry.test.shadd cases for the bun shape, including a spaced install path.tests/fm-omp-primary-live-e2e.test.shadds a token-free default-on probe: it starts the installed omp in RPC mode with an extension that runsfm-harness.shandfm-lock.sh, and passes only when the saved lock names that omp process's pid. Test fixtures that source the session-lock library now also copy the new lib.SKILL.md, anddocs/verification/runtime-backends.mdto describe the two process shapes, the lock-owner check, and the live run against omp 18.12.3 (bun package, macOS).Risk Assessment
✅ Low: The matcher is narrowed to the verified shapes (comm omp, or bun followed directly by a script named omp). I traced spaced install paths, decoy names, and an existing script followed by an omp argument through it and each gives the right result. The live guard now compares the lock owner with the extension's process.pid, and every fixture that sources the session-lock library also copies the new lib.
Testing
I ran the live token-free omp identity probe against the real bun-installed omp twice: once at its normal install path and once symlinked under a path with a space in it. Both runs detected omp and saved the session lock under the omp process's own pid. Two mutation runs in throwaway copies confirmed the guards work. Without the spaced-path rebuild, omp is misdetected as claude. Without the lock-walk match, the lock goes to the outer claude pid and the new owner check rejects it. The targeted omp harness and session-lock ancestry suites finished with no failures in their output. All temp labs and mutation copies were deleted, and the worktree is clean.
bun ~/.bun/bin/omp) is detected as omp and owns its session lockbun …/Agent Tools/bin/omp) is detected as omp and owns the lockEvidence: Installed bun-package omp identity probe
Source: Installed bun-package omp identity probe
ok - omp omp/18.12.3 (bun-package): detected as omp and acquired the session lock with no model tokensEvidence: Spaced install path identity probe with live ps
Source: Spaced install path identity probe with live ps
ok - omp omp/18.12.3 (bun-package): detected as omp and acquired the session lock 90256 bun bun /var/folders/.../fm-omp-sp.N1qi6z/Agent Tools/bin/omp --versionEvidence: Mutation guards (spaced-path and wrong lock owner)
Source: Mutation guards (spaced-path and wrong lock owner)
A: not ok - omp omp/18.12.3 (bun-package) was detected as claude, not omp B: not ok - omp omp/18.12.3 (bun-package) acquired the session lock for pid 49055, not the omp process 17094 49055 claudeEvidence: Targeted regression suites
Source: Targeted regression suites
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bun ~/.bun/bin/omp) is detected as omp and owns its session lockbun …/Agent Tools/bin/omp) is detected as omp and owns the lockbash tests/fm-omp-primary-live-e2e.test.shagainst the installed bun-package omp (~/.bun/bin/omp)PATH="$TMP/Agent Tools/bin:$PATH" bash tests/fm-omp-primary-live-e2e.test.shwith omp symlinked under a directory whose name contains a space, plus a liveps -axo pid=,comm=,args=capture of thebun <path with space>/omplaunch shapeMutation A (throwawaygit archivecopy): removed the spaced-path rebuild loop from fm_omp_process_matches, re-ran the spaced-path probe, and it failed as expectedMutation B (throwaway copy): removed the fm_omp_process_matches call from the session-lock matcher, re-ran the probe, and the wrong-owner check failed as expected (lock went to the outer claude pid 49055)bash tests/fm-omp-harness.test.sh(no failures in output)bash tests/fm-session-lock-ancestry.test.sh(no failures in output, exit 0)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.