Skip to content

fix: restore Codex registration tests on Linux - #164676

Merged
shakkernerd merged 1 commit into
mainfrom
fix/codex-registration-platform
Oct 4, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix/codex-registration-platform

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Codex process-registration tests fail in Linux CI while inserting live child registrations. The suite reports PLUGIN_STATE_OPEN_FAILED because 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.platform to darwin for 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 live and state directory changed cases fail with GatewayLockNamespaceError. All durable registration, command-fingerprint, exit-cleanup, orphan-reaping, and concurrent-sweep assertions remain in the POSIX suite.

At head a86e7020600f8b575d9ff2b3ae72ea719085a3f9:

  • The primary file passes all 23 cases on the remote Mac with Node 24.21.0 and pnpm 12.5.1. pnpm test extensions/codex/src/app-server/transport-process-registration.test.ts --maxWorkers=1 took 22.07 seconds wall time, including cold compiled-worker preparation; Vitest reported 19.67 seconds total.
  • The lifecycle and procfs sibling files pass 35 additional cases in a separate 16.07-second command. The changed-file formatting check and git diff --check also pass.
  • Linux CI job 111336506943 passes all 23 primary cases in 10.21 seconds of Vitest time, including both originally failing cases. The complete CI job took 70 seconds.

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.

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 9:45 PM ET / October 4, 2026, 01:45 UTC (Revision 2).

ClawSweeper review

What this changes

The 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
Reviewed head: a86e7020600f8b575d9ff2b3ae72ea719085a3f9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable fixture repair with preserved assertions and recorded cross-platform validation.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored fixture repair is exempt from external-contributor runtime proof. Recorded Linux/macOS runs exercise the changed registration tests with real SQLite storage and mocked process operations; no production behavior or stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored fixture repair is exempt from external-contributor runtime proof. Recorded Linux/macOS runs exercise the changed registration tests with real SQLite storage and mocked process operations; no production behavior or stored-data contract changes.
Evidence reviewed 8 items Pinned introduced change: The introduced delta removes the suite-wide Darwin platform mock, retains the POSIX registration and cleanup assertions, and extracts two Windows cases that additionally assert the registration store is never opened. The verified test merge contains only this test-file change.
Current main still needs the repair: Fetched main still forces process.platform to Darwin before opening real plugin-state storage. It has not adopted the native-platform fixture or independent Windows suite.
Latest release retains the old fixture: The test file in v2026.9.8 also contains the suite-wide Darwin platform mock, so the latest supplied release does not include this repair.
Findings None None.
Security None None.

How this fits together

OpenClaw’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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +27. Total +27 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 112 85 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 112 85 +27

Review metrics

Metric Value Why it matters
Focused validation cost macOS: 22.07 s wall; Linux CI: 70 s job, 10.21 s Vitest The recorded measurements satisfy the changed-test cost reporting requirement and the previous review’s follow-up.

Technical review

Best 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.

Labels

Label changes:

  • add P2: This bounded fixture repair restores meaningful cross-platform registration coverage without changing product runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored fixture repair is exempt from external-contributor runtime proof. Recorded Linux/macOS runs exercise the changed registration tests with real SQLite storage and mocked process operations; no production behavior or stored-data contract changes.

Label justifications:

  • P2: This bounded fixture repair restores meaningful cross-platform registration coverage without changing product runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored fixture repair is exempt from external-contributor runtime proof. Recorded Linux/macOS runs exercise the changed registration tests with real SQLite storage and mocked process operations; no production behavior or stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-04T01:39:29.654Z sha a86e702 :: needs changes before merge. :: none

@shakkernerd shakkernerd self-assigned this Oct 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 4, 2026
@shakkernerd
shakkernerd merged commit b323c04 into main Oct 4, 2026
118 checks passed
@shakkernerd
shakkernerd deleted the fix/codex-registration-platform branch October 4, 2026 01:48
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: Codex registration tests use the native platform for SQLite workers while retaining Windows no-op coverage.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
Keep Codex process-registration storage tests on the native platform and preserve independent Windows no-op coverage.
RomneyDa pushed a commit that referenced this pull request Oct 4, 2026
Keep Codex process-registration storage tests on the native platform and preserve independent Windows no-op coverage.

(cherry picked from commit b323c04)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant