Skip to content

test: harden remote lifecycle and process-owner fixtures - #8

Merged
roderik merged 1 commit into
mainfrom
fm/rex-p2-followups
Oct 22, 2026
Merged

roderik merged 1 commit into
mainfrom
fm/rex-p2-followups

Conversation

@roderik

@roderik roderik commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Intent

do it

Context: "it" is the queued Rex phase 2 follow-up work, which the Phase 2 worker (PR #2, second mates and away mode on the Rex backend) reported as left over: (1) teardown needs a rerun after a secondmate retire; (2) one transient remote relaunch refusal; (3) the remote secondmate lifecycle watcher-relaunch test and (4) the remote doctor --fix test fail on main independent of Rex.

What Changed

  • Extend the Rex secondmate end-to-end coverage to verify that one fm-teardown retires the secondmate, session, home, route, and records, and document the verified runtime evidence.
  • Make remote lifecycle waits tolerate heavily loaded hosts by using a five-minute polling bound.
  • Replace platform-binary socket-owner fixtures with compiled environment-holder stand-ins, add fixture coverage for environment visibility, and update remote doctor and herdr guard tests accordingly.

Risk Assessment

✅ Low: The change is limited to test robustness, fixture helpers, documentation, and an opt-in Rex teardown regression check; no source runtime behavior or authorization boundary is altered, and the reviewed logic is internally consistent.

Testing

The Test agent exceeded its invocation budget before live validation completed; no evidence was gathered for this head.

  • Outcome: ⚠️ 1 warning across 1 run (30m2s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ The Test agent did not finish within its invocation budget. Reported: agent run tests timed out after 30m0s: agent last produced output 10m23s ago (41 observed); agent reported: claude exited: exit status 143: ⚠ claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and takes precedence over your claude.ai login · Unset it to load your organization's connectors. This is a budget or provider-slowness cut, not a code failure. Re-running the same request costs another full budget, so no further attempt is made automatically. If this repository's targeted tests or evidence gathering routinely approach the default 30m0s, raise test_agent_timeout in global config. Respond with fix to spend another budget: a repair turn runs only for selected findings other than this budget cut, then validation re-runs. Or abort and retry after raising the budget.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Notes

  • The pipeline's test step timed out (the test agent exhausted its 30 minute budget on a heavily loaded machine) and was approved on this evidence: review passed with 0 findings, and the test agent's own report plus local runs show these passing: tests/fm-remote-doctor.test.sh, tests/fm-remote-herdr-guard.test.sh, tests/fm-test-fixtures.test.sh, tests/fm-documentation-audiences.test.sh, the full 35-scenario tests/fm-remote-secondmate-lifecycle-e2e.test.sh, and FM_REX_SECONDMATE_E2E=1 tests/fm-rex-secondmate-e2e.test.sh on a bin/fm-rex-lab.sh lab server (the pipeline environment has no rex binary).
  • Items 1 and 2 were not reproduced, so no production code changed for them. A single teardown retired a local Rex secondmate completely on a lab server (the only rerun seen was the designed refusal while a routed reply is unresolved), and this PR adds an e2e case pinning that. The transient relaunch refusal could not be reproduced or explained from the code, so no fix was guessed.
  • Items 3 and 4: the lifecycle test waited 30s while production allows the relaunch 120s (it took 59s under load); the doctor and herdr guard tests used the system jq, which macOS now ships as a platform binary that hides its environment.

Follow-ups noticed, not done

  • The unreachable-host watcher check in the lifecycle test uses fixed 4 second and 1 second sleeps.
  • Pi's composer reads unknown on Rex, so a Pi relaunch on a Rex lab refuses at the exit gate.

…ycle tests pass on a loaded macOS host

The doctor and guard tests used the system jq as the socket-owner stand-in, which macOS now ships as a platform binary whose environment ps hides, so every owner read as unproven. They now share a holder helper that proves the environment is readable on the host.

The lifecycle test waited 30 seconds for remote spawns and the watcher relaunch, which production allows 120 seconds; the waits now share one bound that only catches a hang.

The Rex secondmate e2e also pins that a single teardown retires a secondmate completely.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-22T18:08:25.537095Z
We couldn’t complete this review. Comment @codex review to try again.
122dd65 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@roderik
roderik merged commit e3697bf into main Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant