Skip to content

fix: grok socket guard, lock reaper race, companion perf (0.0.62) - #69

Merged
okisdev merged 11 commits into
mainfrom
fix/close-open-issues
Sep 28, 2026
Merged

okisdev merged 11 commits into
mainfrom
fix/close-open-issues

Conversation

@okisdev

@okisdev okisdev commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

closes #57
closes #62
closes #64
closes #66
closes #68

summary

  • grok write runs refuse an undenied container runtime socket (strict does not deny orbstack's non-admin docker socket #57). inside a grok 1.0.41 strict write run, curl --unix-socket ~/.orbstack/run/docker.sock http://localhost/_ping returned OK: orbstack's non-admin socket is missing from upstream's deny list and the macos strict profile allows network-outbound. a managed write run now fails as sandbox before spawn while that socket exists; consult and review proceed, and /grok:setup reports writeReady: false. codex's sandbox blocks the same connect (curl exit 7)
  • the lock reaper race (flaky: grok-state-lock 'concurrent reapers serialize after a lock owner is killed' fails under load #62) is fixed in both grok and codex: the winning reaper deleted the dead owner's directory recursively while losers were still staging their claims inside it, and only ENOENT counted as a lost race. claims now live beside the lock, and every teardown error is a lost race. the concurrent reapers case failed 3 of 100 loaded runs before and passes 100 of 100 after, in each plugin
  • codex companion startup (perf: a codex task run shells out to ps 32 times and scans every job record for the flagship stat #66): the cost that grew with job count was reserveWorkspace resolving the workspace root with a git spawn per job record under the workspace lock (17.1s of a 17.7s run at 600 records), not the flagship stat. git probes are cached briefly and the own identity and boot marker once per process (grok mirrors the identity cache). at 600 records a task --write went from 6260ms, 32 ps and 612 git spawns to 544ms, 8 and 2
  • flaky suites (flaky: codex companion process tests fail on the macos-latest node 22 job under load #64) and the smoke skill (smoke skill still pins gpt-5.6-luna and omits --cwd #68): a census of all 40 failed CI jobs since 08-01 left five open flakes. the top one, the codex background launch lock timeouts, was a product bug: lock timeout errors now name the holder, which showed on CI that the holder was a linux zombie (a dead owner its blocked parent had not reaped yet) that answered kill(pid, 0) while its identity read as gone, so waiters never reclaimed the lock. a zombie owner now counts as dead, proven both sides with a linux regression test. the inherited-pipe case now gets a 2000ms budget instead of 50ms, the fake grok leaves the companion 5000ms instead of 1000ms to kill it after a warning, flaky: grok-state-lock 'concurrent reapers serialize after a lock owner is killed' fails under load #62 covers the grok case, and a linux case was already fixed by 0.0.60. the smoke engine probes take their model from the lane defaults and pass --cwd

test plan

already verified

  • npm test -> 1316 tests, 1315 pass, 0 fail, 1 skipped
  • full npm test with one busy loop per core, three rounds -> 0 failures each (166 to 178s; at 0.0.61 codex-companion.test.mjs alone was still running after 200s)
  • grok and codex "concurrent reapers serialize after a lock owner is killed" -> 100/100 each under full saturation with a parallel npm test
  • task --write --model gpt-6-astra against the fake codex with 0, 100 and 600 seeded records -> 381, 429 and 544ms, always 8 ps and 2 git spawns
  • live probes: grok 1.0.41 strict write reaches the orbstack socket (OK), codex's sandbox does not (curl exit 7)
  • claude plugin validate on plugins/codex, plugins/grok, plugins/fusion and the marketplace root -> all pass

reviewer should verify

  • with orbstack running, /grok:setup --json shows ready: true and writeReady: false, a /grok:task --write fails as sandbox before spawn, and a consult still answers
  • test (macos-latest, 22) stays green across repeated runs of this head

notes

@okisdev
okisdev merged commit d86796d into main Sep 28, 2026
51 checks passed
@okisdev
okisdev deleted the fix/close-open-issues branch September 28, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment