Repository navigation
fix: make Linux adapter wiring tests portable on Windows - #120741
Conversation
|
@clawsweeper review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 7:47 PM ET / 23:47 UTC. ClawSweeper reviewWhat this changesThe PR makes Linux-specific supervisor adapter tests simulate Merge readinessNo blocking findings. This focused test-only repair remains needed on current main and should receive routine maintainer review rather than closure or an automated repair lane. Priority: P3 Review scores
Verification
How this fits togetherThe process supervisor selects child or PTY adapters for tool processes. Tests simulate a Linux platform and shell availability to verify the adapters apply the Linux OOM-score wrapper correctly. flowchart LR
Host[Windows or Linux test host] --> Fixture[Platform and shell fixture]
Fixture --> Cache[Linux shell availability cache]
Cache --> Adapter[Child or PTY adapter]
Adapter --> Test[Adapter wiring test]
Test --> Result[Portable assertions]
Decision needed
Why: The PR carries the protected maintainer label and is maintainer-authored, so this workflow must leave the final merge decision to a human despite a clean technical review. Before merge
Agent review detailsSecurityNone. PR surfaceSource +17, Tests +8. Total +25 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Merge the scoped test-boundary fixture and cache isolation after normal maintainer sign-off, preserving production shell detection unchanged. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main simulates Linux while the OOM helper reads the real host Is this the best way to solve the issue? Yes. Mocking shell availability at the filesystem owner boundary and resetting the evaluated module cache is narrower and safer than adding a production cache-reset API or disabling the production cache. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 019dd0e08659. 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)
|
|
Merged via squash.
|
Punchcard-Session: amber-workshop-workshop-36 * origin/main: (28 commits) perf(doctor): keep bundled doctor contract closures dependency-light (#120698) fix(elevenlabs): preserve repeated committed speech segments (#120792) fix(ai): fence Responses replay metadata (#120777) fix(ai): invalidate stale compaction replay (#120786) fix(telegram): clean up every failed webhook startup phase (#120788) fix(codex): preserve configured MCP tools in scheduled turns (#120366) fix(ui): show dev checkout commit lag in Updates (#120769) fix(agents): repair XML-polluted tool names (#113814) fix(discord): remove only the bot own reactions (#120785) fix(macos): complete ChatGPT subscription setup (#120782) fix(plugins): surface safe administrator install warnings (#120783) fix(release): keep upgrade survivor sessions fresh (#120778) fix(providers): preserve realtime tool-result delivery ownership (#120776) fix(plugins): retain incognito scope for embedded session ownership (#120215) fix(elevenlabs): surface realtime provider error events (#120772) fix(agents): preserve exact steering delivery ownership (#120770) fix(telegram): prevent session-count routing slowdown (#120774) fix(agents): preserve authoritative background process outcomes (#120754) test(process): make Linux adapter wiring portable (#120741) fix(diagnostics-prometheus): send Content-Length on metrics HEAD responses (#120212) ...
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where Windows contributors running the process supervisor adapter tests would get Linux-only wiring failures because the tests probed the Windows host for
/bin/shwhile simulating Linux.Why This Change Was Made
The test fixture now models Linux shell availability at the filesystem boundary and reloads the PTY adapter only while that fixture is active. The spy is restored and Vitest's evaluated-module cache is reset in
finally, so the non-isolated suite cannot leak forced host behavior or the memoized Linux shell result. The earlier cross-platform signal test uses Darwin, which still covers the intended non-Windows production branch without priming Linux-only state.This is deliberately test-only. It does not skip Windows coverage, weaken assertions, change production behavior, add configuration, or alter dependencies.
User Impact
Windows contributors and CI can run the Linux adapter wiring coverage reliably. There is no runtime behavior change for OpenClaw operators.
Evidence
b2210c8270d1d818953a9d7890781bde1e80b337(parentb5180b68163a0dec24ac7615b81e7f12aadbd5e2)node scripts/run-vitest.mjs src/process/supervisor/adapters/child.test.ts src/process/supervisor/adapters/pty.test.ts src/process/linux-oom-score.test.tsoxfmt --check: passed for all three changed filesgit diff --check HEAD^ HEAD: passed08d2062c7f6027fa5d99493247ae3abb3fb29364: all three parent blobs are byte-identical to main; clean three-way merge; no rebase requiredchild.test.tsservice-detach section and leaves these hunks intactContributor credit: Peter Steinberger (
steipete).