fix: harden remote worker and supervision recovery - #2950
Open
V4f1k wants to merge 8 commits into
Open
Conversation
* fix: odpojit Linux Herdr server od zděděných deskriptorů * no-mistakes(review): fix: Zombie-safe liveness predikáty v Linux regresním testu * no-mistakes(document): Aktualizována dokumentace bounded Herdr startu * test: počkat na vlastnictví setsid skupiny
* fix(brief): preserve worker decision and evidence contracts * no-mistakes(review): Fix brief continuation and pipeline-entry contracts * no-mistakes(review): Fix post-response pipeline driving contract * no-mistakes(document): Align ask-user guidance with same-turn waiting
* fix(brief): require same-turn helper cleanup * no-mistakes(document): Align Codex task status documentation
* fix: povol max effort pro Codex * no-mistakes(document): Konsolidace Codex effort ověření
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains. Reviews (2): Last reviewed commit: "no-mistakes(document): Document remote w..." | Re-trigger Greptile |
V4f1k
force-pushed
the
fm/oracle-remote-job-worker-probe-fix
branch
from
August 24, 2026 13:38
b5848e4 to
a64c772
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Diagnose and fix the Oracle-specific remote job worker readiness failure that prevents Firstmate from propagating inherited config and relaunching remote secondmates. The end-user reproduction must use the official path with the tracked worktree code and primary private registry/home: FM_HOME=/Users/computer/firstmate FM_ROOT_OVERRIDE="/Users/computer/.treehouse/firstmate-110893/2/firstmate" bin/fm-on.sh fleet-platform fm-remote-doctor.sh. The failure was reproduced before the fix as remote-job-worker=ok with remote-job-probe=fixable, while the independent isolarpv-ai path passed. Root cause evidence must explain how a Linux worker can remain running while its required-tool probe is stale: a serving worker can own the lock while a long-poll job output readers remain hung after the job target disappears, stopping the heartbeat; the lifecycle must distinguish owned process identity from readiness freshness so --fix stops the owned worker before replacement instead of launching a second supervisor behind the lock. Keep the readiness contract fail-closed. Preserve all required tool, code identity, transport, endpoint, ownership, quarantine, and fresh-probe checks. Do not bypass fm-on.sh, weaken the readiness gate, or invent an alternate control path. Use the smallest robust correction in the authoritative remote worker lifecycle owner and executable-interface regression coverage through the real fm-remote-doctor.sh interface. Review the supported Darwin and Linux lifecycle paths and the applicable worker backend behavior. The incident allowed host-local cleanup only for the exact previously recorded Oracle processes bound to job-p2TIjY: before each signal revalidate PID, actual parent, start time, cwd, cmdline, and job binding, and verify the postcondition after each step. Never use a broad kill, signal the supervisor process group for that cleanup, or expand the target set. That cleanup was completed and restored the real Oracle doctor. Verify a real post-fix official Oracle doctor pass and one ordinary remote command that previously failed through the job worker. The ordinary command is the idempotent official fm-on.sh fleet-platform fm-remote-inherit.sh absent config/trace-context 0 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 25, which completed with exit 0 and unchanged. Focused tests, the changed relevant test family, bin/fm-lint.sh, and bin/fm-doc-audience-check.sh must pass when applicable. Do not use Claude for any part of the task or pipeline.
What Changed
Separate remote worker ownership from readiness probing so Linux
fm-remote-doctor.sh --fixcan replace an owned worker with a stale heartbeat without launching a second supervisor.Harden Linux Herdr server startup with descriptor isolation and bounded failed-start termination/reaping, with regression coverage for ready and never-ready server lifecycles.
Extend Claude supervision, helper cleanup, continuation, and Codex
maxeffort contracts, with corresponding documentation and regression updates.Risk Assessment
✅ Low: The Oracle lifecycle fix is small and preserves fail-closed ownership and readiness checks; the remaining issue is limited to test design.
Testing
Focused lifecycle and executable-interface checks completed. The live Oracle doctor remained fail-closed with a stale probe; the single authorized inheritance rerun exited 64 before execution. No lint or static analysis commands were run per phase constraints.
Evidence: Oracle live validation evidence
Source: Oracle live validation evidence
inherit_rc=64 error: remote job worker did not report ready after startupPipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
.agents/skills/afk/SKILL.md- branch carries 5 commit(s) that exist on your local main branch but were never pushed to origin/main; rebasing would bundle this unrelated work (172 file(s)) into the PR:Push main to origin, or rebase your branch onto origin/main, before gating.
🔧 Fix applied.
1 warning still open:
.agents/skills/afk/SKILL.md- branch carries 5 commit(s) that exist on your local main branch but were never pushed to origin/main; rebasing would bundle this unrelated work (172 file(s)) into the PR:Push main to origin, or rebase your branch onto origin/main, before gating.
tests/fm-brief.test.sh:213- New assertions here and in the added brief checks at lines 259, 365, 735, and 780 only grep natural-language sentences from generatedbrief.md; this does not establish agent behavior and violates the supplied test-quality rule. Remove or replace them with executable contract/state/side-effect checks.fm-remote-inherit.sh absent ... 25command was not run because it may mutate the external primary remote home, outside this phase's write boundary. Local inheritance and lifecycle tests cover the behavior, but not that live Oracle state. Smallest next step: run the exact command in an authorized environment and capture exit 0 plus unchanged state.FM_HOME=/Users/computer/firstmate FM_ROOT_OVERRIDE="/Users/computer/.treehouse/firstmate-110893/2/firstmate" bin/fm-on.sh fleet-platform fm-remote-doctor.shbash tests/fm-remote-doctor.test.shbash tests/fm-on.test.shbash tests/fm-remote-job.test.shbash tests/fm-remote-secondmate-lifecycle-e2e.test.shbash tests/fm-remote-secondmate-trace-context.test.shbash tests/fm-remote-job-orphan-reap.test.sh🔧 Fix: Oracle inherit rerun blocked by readiness; state unchanged
1 warning still open:
bash tests/fm-remote-doctor.test.shbash tests/fm-remote-job.test.shbash tests/fm-on.test.shbash tests/fm-remote-secondmate-lifecycle-e2e.test.shbash tests/fm-remote-job-orphan-reap.test.shOfficial Oracle doctor check, read-only state probe, authorized inheritance command, and post-check doctor.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.