Repository navigation
test(process): share relay startup fixtures - #140345
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 2:09 PM ET / 18:09 UTC. ClawSweeper reviewWhat this changesShares relay startup test fixtures and combines two abort scenarios into a table while preserving cleanup-failure coverage. Merge readiness✅ Ready for maintainer review Keep open as a useful, maintainer-requested cleanup. The retained assertions preserve both startup-abort timings and repeated cleanup joins; no actionable correctness or security defect was found. Current main still contains the duplicated fixtures. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's process supervisor launches commands through a relay and tracks command completion separately from descendant cleanup. These tests check that interrupted startup leaves cleanup uncertainty visible to shutdown and scope owners. flowchart LR
A[Command request] --> B[Process supervisor]
B --> C[Relay startup]
D[Startup abort or delivery failure] --> C
C --> E[Command result]
C --> F[Cleanup outcome]
F --> G[Scope and shutdown joins]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -34. Total -34 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the shared fixture while preserving distinct startup timing, deferred cancellation, and repeated cleanup-failure assertions. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates existing tests rather than reporting a new runtime defect; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes: a file-local shared fixture and two named table rows remove repetition while retaining the meaningful failure assertions and event ordering. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3967d9b6df1f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
4e69fa6 to
087c000
Compare
|
Merged via squash.
|
* origin/main: (25 commits) docs(releases): keep the release-notes nav group to version routes (#140353) fix(ui): hide trust wrappers in imported chat history fix(subagents): subagent list building decodes unrelated saved prompts in large session stores (#139540) test(process): share relay startup fixtures (#140345) refactor(doctor): inline GitHub skill discovery inputs (#140343) refactor(ui): share channel status type definitions (#140331) refactor: simplify queue state and infrastructure dispatch (#140311) fix: require saved agent turns before update verification succeeds (#140274) fix(update): keep the service profile when switching to Git (#140263) fix(ui): prevent image avatars overlapping mobile chat (#140341) fix(test): accept release subpages in docs route shape (#140337) refactor(plugins): share uninstall mutation ownership (#140322) refactor(agents): use canonical tool execution arguments (#140280) perf(cli): keep inference metadata and domain help lazy (#140327) refactor(plugins): simplify self-hosted setup results (#140332) refactor(config): reuse parent lookup for unset operations (#140326) fix(plugins): preserve exact installed-index mutation receipts (#140328) test(agents): simplify MCP and LSP boundary fixtures (#140312) fix(ui): preserve literal source previews and copied whitespace (#140306) fix: OpenCode Go/Zen requests are missing the required x-opencode-session header (#137464) ...
Related: #135868, #139517
What Problem This Solves
The Stage 3 process cleanup tests repeat relay startup fixtures across two abort timings and the supervisor cleanup joins. This is the maintainer-requested test compression pass for concern C of the #135868 split, after reviewing #139937 and #139953.
Why This Change Was Made
Table-drive the two startup timings and share their immediately writable relay fixture with the existing Linux/Windows supervisor cases. Keep the independent deferred cancellation writer, the abort → deferred delivery failure → rejection observation order, and all repeated cleanup joins.
User Impact
No runtime behavior changes. All test cases remain. Tests shrink by 34 lines (+31/−65); production, tooling, and docs each change by zero.
Evidence
src/process/supervisor/service-child-relay-host.test.ts:162, “reports cleanup uncertainty when construction aborts before ready”:162, “reports cleanup uncertainty when deferred start delivery fails after abort”; a typed callback retains the same delivery ordering:162andsrc/process/supervisor/service-child-relay-host.test.ts:205, “keeps rejected construction ownership failures visible to supervisor joins (%s)”, both Linux and Windows rows:162requires the spawned child's SIGKILL and the original cleanup-identity rejectionunrefmock assignmentssrc/process/supervisor/supervisor.anchored-shell.real.test.ts:240, “completes an otherwise idle host with %s command environment”Real process groups, owned stdio, output flushing, scope extinction, retained descendants, kernel census, and relay-reaping/deadline tests remain unchanged. This patch does not revisit the distinct ownership cases retained by the previous Stage 3 compression pass.
Full
src/processsuite before: 44 files, 634 passed / 63 skipped, 35.06 s. After: the same 44 files and case counts, 40.57 s. Real-process cases ran on macOS; Windows cases retain their fixtures. Fullnode scripts/check-changed.mjspassed, including test types, lint, guards, and all three dead-export scans. Independent Codex autoreview is scoped-clean through P2;git diff --checkpassed. File size: 592 → 558 lines.Exact-head CI is green for
087c0000f9ba546ebeb8dc397d27676b732055c4: https://github.com/openclaw/openclaw/actions/runs/34050481521 . ClawSweeper reviewed that head with no findings, before-merge requests, or rank-up moves.