Repository navigation
fix(macos): accept canonical Codex plugin config - #166510
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 7, 2026, 3:52 AM ET / 07:52 UTC. ClawSweeper reviewWhat this changesThe macOS native Codex catalog accepts canonical plugin configuration and uses the catalog’s own enable setting independently of agent-facing supervision tools. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main and the latest release still incorrectly require supervision for native catalog access. No blocking correctness finding was identified. Priority: P2 Review scores
Verification
How this fits togetherA paired Mac reads its local plugin configuration to advertise Codex session browsing and authorize subsequent catalog requests. Eligible requests use the native user-home App Server and return session metadata or transcript pages to the Gateway. flowchart TD
A[Local plugin configuration] --> B[Native configuration validator]
B --> C[Plugin policy and catalog opt-out]
C --> D[Transport and home restrictions]
D --> E[Paired Mac catalog capability]
E --> F[Gateway catalog request]
F --> C
D --> G[Native App Server reads]
G --> H[Session metadata or transcript page]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +148, Tests +15, Docs +3, Other +17. Total +183 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep native catalog admission aligned with the canonical plugin schema and independent catalog switch, with shared cross-language regression coverage. Do we have a high-confidence way to reproduce the issue? Yes, from source: valid config containing sessionCatalog is rejected on current main, and omitted supervision prevents advertisement. The supplied regressions target both failures; this review did not execute them. Is this the best way to solve the issue? Yes. Matching the existing canonical config contract and retaining independent catalog opt-out is a focused repair; the shared fixture guards cross-language drift. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 56bd0430d532. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Fix paired Macs hiding the native Codex catalog when canonical plugin config includes sessionCatalog or newer computer-use, app-server, and SecretInput options. Use sessionCatalog.enabled independently of agent-facing supervision, preserving explicit opt-out and native transport/home restrictions. Keep the native reader strict, reject retired options, and share a config fixture with the canonical manifest/runtime parser. The Swift regression fails on the original main reader and passes after the repair. Swift build, focused native tests, typechecks, cycle checks, lint, independent review, and exact-head selected CI passed. Full native suite was not run; broad local production/full-tree Knip scans timed out at their existing 600-second limit without findings. See the PR for the complete drift audit and validation evidence.
What Problem This Solves
Fixes valid Codex plugin configuration hiding a paired Mac's native session catalog. The native validator rejects canonical fields such as
sessionCatalog, and its activation check incorrectly requires agent-facing supervision tools to be enabled.User Impact
Paired Macs can advertise their Codex catalog with canonical config, including
sessionCatalogand omittedsupervision.enabled. Explicit catalog opt-out, plugin policy, and native stdio/user-home restrictions remain enforced. The macOS first-run opt-out remains intact. No config migration, schema, protocol, or dependency change is required.The affected path reads local config when preparing a remote node connection and again for list/transcript requests. It is not the settings or onboarding decoder. Validation failures suppress the advertised capability and commands; direct calls report the catalog disabled. A compatible Node worker fallback can mask the native failure.
Why This Change Was Made
The canonical owners are
extensions/codex/src/app-server/config-parsing.ts,session-discovery-config.ts, the plugin manifest, and the SDK SecretInput schema. The mirror inapps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swiftnow follows those contracts and usessessionCatalog.enabledfor catalog activation. It leaves the raw config intact, including fields the native catalog does not consume.The generated Swift Gateway models expose config/schema payloads as
AnyCodable; they do not contain a reusable Codex config model or validator. This repair retains the native validator and checks one shared config fixture through both the Swift reader and the canonical manifest/runtime parser.Drift audit
All fields below are optional unless explicitly identified as required within an object. Unconsumed options remain in the raw config; their runtime defaults belong to the plugin.
sessionCatalogsessionCatalog.enabledsupervision.enabled == truesessionCatalog.homespathand optional nonblanklabelsupervision.enabledcomputerUse.liveTestTimeoutMs,toolCallTimeoutMscomputerUse.healthCheckEnabledcomputerUse.healthCheckIntervalMinutescomputerUse.pluginCacheModeshared/independent, defaultindependentcomputerUse.strictReadiness,autoRepairappServer.loopDetectionPreToolUseRelay,enableUltrafastappServer.cyberFailovermode(auto/off, defaultauto), nonblankmodel(plugin-owned default), positivecooloffMs(default 600,000)appServer.turnCompletionIdleTimeoutMs,postToolRawAssistantCompletionIdleTimeoutMsappServer.authToken,headers.*source,provider,id; sources includestorestore; other secret grammars matchappServer.approvalPolicynever,on-request, and theon-failurealias; rejects retireduntrusteduntrustedappServer.serviceTierOther fields match the runtime parser's optionality and validation: dynamic tools, discovery, existing computer-use options, supervision/endpoints, remaining app-server options, network proxy, and experimental settings.
codexPluginsremains independently parsed by the canonical runtime; malformed policy data does not invalidate the catalog config. Native command/arguments/clearEnv normalization and fallback defaults are unchanged.Canonical-layer discrepancies found during the audit are outside this native fix: the manifest still lists retired
approvalPolicy: untrusted; its timeout minimum is 1 while runtime accepts any positive number; some manifest strings permit blanks that runtime rejects; runtime service-tier preprocessing drops nonstrings that manifest admission rejects. No owner schema is changed here.Evidence
Reviewed and tested head:
28dc11045f449b0995bb2b2384992f598c52561c.d70a16aab07cb1911884ec9ae9129899852437dc: the new Swift regression throwsinvalidAppServerConfigurationfor a canonical config containingsessionCatalogwithoutsupervision.enabled; default catalog advertisement also fails. The shared complete-config fixture fails on the same unchanged reader.swift build --package-path apps/macos --build-system native --build-testspassed. Apple Mermaid resources were generated withnode scripts/prepare-apple-mermaid.mjs.node scripts/run-vitest.mjs extensions/codex/src/app-server/config-native-contract.test.ts test/scripts/lint-suppressions.test.ts --maxWorkers=1passed. Final local fixture run: 0.476 seconds test time, 363.38 seconds runner time, largely compiled-worker preparation. On exact-head CI, the shared fixture test took 84 ms; its dedicated shard took 28.68 s (112 s job including setup).git diff --checkpassed.openclaw/ci-gate. CodeQL shard selection initially failed because the GitHub PR-files API returned truncated JSON; its failed-job rerun passed. Two cancelled auto-response jobs also passed their reruns.