Repository navigation
fix: restore Codex registration tests on Linux - #164676
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 October 3, 2026, 9:45 PM ET / October 4, 2026, 01:45 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR runs Codex process-registration storage tests on the native POSIX platform and moves Windows no-op coverage into an independent suite. Merge readiness✅ Ready for maintainer review The focused fixture repair remains necessary and has no actionable review findings. The recorded Linux/macOS outcomes and timing measurements satisfy the previous review’s follow-up; maintainer-authored work also remains protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s Codex plugin records child-process identities in SQLite before starting native work and uses those records to clean up orphaned processes. These tests exercise registration and cleanup while replacing process inspection and termination with controlled fixtures. flowchart TD
A[Test host platform] --> B{Windows or POSIX}
B -->|POSIX| C[Native SQLite registration tests]
C --> D[Registration and orphan cleanup]
D --> E[Stored identity and cleanup assertions]
B -->|Windows| F[No-op registration tests]
F --> G[No storage or process inspection]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +27. Total +27 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep real SQLite coverage on native POSIX hosts and verify Windows no-op behavior independently of storage fixtures. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the Linux fixture mismatch: the test process claims Darwin while real storage workers retain Linux. The linked original CI failure supports that mechanism; this review did not execute tests. Is this the best way to solve the issue? Yes, removing the global platform mock repairs the fixture at its owner while preserving production namespace validation and independently covering Windows no-op behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 91e9b93bcebd. LabelsLabel changes:
Label 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)
|
|
Fixed: Codex registration tests use the native platform for SQLite workers while retaining Windows no-op coverage. |
Keep Codex process-registration storage tests on the native platform and preserve independent Windows no-op coverage.
Keep Codex process-registration storage tests on the native platform and preserve independent Windows no-op coverage. (cherry picked from commit b323c04)
What Problem This Solves
The Codex process-registration tests fail in Linux CI while inserting live child registrations. The suite reports
PLUGIN_STATE_OPEN_FAILEDbecause its test process claims to run on macOS while the real SQLite workers run on Linux, leaving their process-owner namespaces inconsistent.User Impact
This restores useful CI coverage for Codex registration and orphan cleanup without changing runtime behavior. Real storage operations keep the host platform, and the existing Windows no-op cases remain independently covered on every host.
Why This Change Was Made
The registration fixture previously forced
process.platformtodarwinfor the entire suite. Owner-namespace validation now correctly refuses the resulting unverifiable owner. The POSIX suite uses the native platform and skips on Windows, where the production registration and reaper intentionally do nothing. The two Windows cases live outside that suite and verify that neither path opens the registration store; they retain their process-inspection, termination, and warning checks.Evidence
The original failure is visible in Plugin Prerelease job 111325834462: the
liveandstate directory changedcases fail withGatewayLockNamespaceError. All durable registration, command-fingerprint, exit-cleanup, orphan-reaping, and concurrent-sweep assertions remain in the POSIX suite.At head
a86e7020600f8b575d9ff2b3ae72ea719085a3f9:pnpm test extensions/codex/src/app-server/transport-process-registration.test.ts --maxWorkers=1took 22.07 seconds wall time, including cold compiled-worker preparation; Vitest reported 19.67 seconds total.git diff --checkalso pass.Both Windows no-op cases ran on Mac and Linux through the scoped platform mock. Native Windows execution was not performed; the existing Windows CI inventory does not include this file. No local tests ran.