Repository navigation
test(codex): run the native output-fidelity proof without the Linux bwrap sandbox - #156132
Conversation
…wrap sandbox The proof dials app-server directly with sandbox_mode=read-only, which on Linux (Codex >= 0.154, bwrap-only) needs user plus network namespaces. The GitHub-hosted ubuntu-24.04 Full Release Validation shard cannot configure loopback in that namespace (bwrap: loopback: Failed RTM_NEWADDR), so cat never runs, app-server emits no commandExecution item, and requireRecord throws. Use danger-full-access like product launches (--sandbox from the resolved exec policy) and print the observed notifications when the item is missing.
|
🦞👀 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 real behavior proof before merge. Reviewed September 22, 2026, 11:18 PM ET / September 23, 2026, 03:18 UTC. ClawSweeper reviewWhat this changesRuns the native Codex output-fidelity test without OS sandboxing and adds command-output and event details to missing-completion failures. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: current main still uses the problematic fixture configuration, and the patch preserves the output-fidelity assertions. No actionable correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s Codex plugin converts native command events into conversation tool results. This test compares real native execution output with the next provider request and OpenClaw’s projected result. flowchart LR
A[Synthetic local provider] --> B[Native Codex app server]
C[Temporary source file] --> D[Fixed read command]
B --> D
D --> E[Native output and events]
E --> F[Next provider request]
E --> G[OpenClaw tool result]
F --> H[Fidelity assertions]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceTests +14. Total +14 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep native output-fidelity coverage independent of host namespace support while preserving its real command, provider-request, and projection assertions. Do we have a high-confidence way to reproduce the issue? No independently verified current-main reproduction was run; the reported namespace-denial trace matches the fixture configuration and pinned Codex sandbox checks. Is this the best way to solve the issue? Yes: changing this synthetic fixture’s execution posture removes an unrelated platform prerequisite without weakening the output-fidelity contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 516e330fdf63. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…wrap sandbox (openclaw#156132) ## Summary `extensions/codex/src/app-server/event-projector.output-fidelity.native.test.ts` fails in every Linux Full Release Validation run for 2026.9.6 (runs 35743778013, 35761282770, 35776854018, 35802235259 attempts 1 and 2) with `Error: Expected native command execution` from `requireRecord`, while passing on macOS. ## Root cause (environment, not a runtime contract change) The proof dials `codex app-server` directly with `sandbox_mode="read-only"`. Since Codex 0.154 bubblewrap is the only Linux sandbox (`use_linux_sandbox_bwrap` is `Stage::Removed`, `use_legacy_landlock` deprecated) and a read-only exec needs a user plus network namespace. The GitHub-hosted `ubuntu-24.04` shard (`checks-node-extensions-shard-1`, image 20260907.300.1) cannot configure loopback inside that namespace. The diagnostics from openclaw#154919 captured the real exec output on Linux CI (run 35612418856): ``` Process exited with code 1 Output: bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted ``` `cat source.txt` never runs, app-server emits a `function_call_output` with the bwrap error but no `item/completed` with `type: "commandExecution"` for the call id, and the harness throws. The same symptom is already documented in `docs/plugins/codex-harness-reference/approval-and-sandbox.md` and probed by `openclaw doctor` for namespace-restricted Ubuntu/AppArmor hosts. It became deterministic on the 09-22 runner rotation; Codex 0.155.1 did not change the Linux sandbox path (`git diff rust-v0.154.0 rust-v0.155.1 -- codex-rs/linux-sandbox codex-rs/sandboxing` only adds WSL interop masking). `settled-turn-finalizer.native.test.ts` passes on the same shard because it runs through the product path, which launches app-server with `--sandbox` from the resolved exec policy and therefore never enters bwrap. ## Fix - Use `sandbox_mode="danger-full-access"` for this proof. It covers exec output fidelity (history truncation vs the provider-visible result), not sandboxing, and mirrors how product launches configure app-server. Every assertion stays in place. - When the `commandExecution` item is missing, the failure message now lists the observed notifications (method, item type, id, status) and the first 500 chars of the exec output, so a future regression is self-describing. This folds in the diagnostics from openclaw#154919. ## Proof - Local macOS, Node 24, `vitest.extension-database-workers.config.ts`: 5/5 runs green while the whole `extensions/codex/src/app-server` batch ran concurrently as load. - Docker `ubuntu:24.04` with the 0.155.1 linux-arm64 binary: `codex sandbox -c sandbox_mode=read-only -- cat` fails with bwrap namespace errors under default confinement and succeeds only when the container may create namespaces; `danger-full-access` runs in both. - `OPENCLAW_TESTBOX=1 pnpm check:changed`: see the landing log. Related: openclaw#154919 (diagnostics-only PR, superseded by this change), openclaw#155989 (0.155.1 pin).
…wrap sandbox (#156132) ## Summary `extensions/codex/src/app-server/event-projector.output-fidelity.native.test.ts` fails in every Linux Full Release Validation run for 2026.9.6 (runs 35743778013, 35761282770, 35776854018, 35802235259 attempts 1 and 2) with `Error: Expected native command execution` from `requireRecord`, while passing on macOS. ## Root cause (environment, not a runtime contract change) The proof dials `codex app-server` directly with `sandbox_mode="read-only"`. Since Codex 0.154 bubblewrap is the only Linux sandbox (`use_linux_sandbox_bwrap` is `Stage::Removed`, `use_legacy_landlock` deprecated) and a read-only exec needs a user plus network namespace. The GitHub-hosted `ubuntu-24.04` shard (`checks-node-extensions-shard-1`, image 20260907.300.1) cannot configure loopback inside that namespace. The diagnostics from #154919 captured the real exec output on Linux CI (run 35612418856): ``` Process exited with code 1 Output: bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted ``` `cat source.txt` never runs, app-server emits a `function_call_output` with the bwrap error but no `item/completed` with `type: "commandExecution"` for the call id, and the harness throws. The same symptom is already documented in `docs/plugins/codex-harness-reference/approval-and-sandbox.md` and probed by `openclaw doctor` for namespace-restricted Ubuntu/AppArmor hosts. It became deterministic on the 09-22 runner rotation; Codex 0.155.1 did not change the Linux sandbox path (`git diff rust-v0.154.0 rust-v0.155.1 -- codex-rs/linux-sandbox codex-rs/sandboxing` only adds WSL interop masking). `settled-turn-finalizer.native.test.ts` passes on the same shard because it runs through the product path, which launches app-server with `--sandbox` from the resolved exec policy and therefore never enters bwrap. ## Fix - Use `sandbox_mode="danger-full-access"` for this proof. It covers exec output fidelity (history truncation vs the provider-visible result), not sandboxing, and mirrors how product launches configure app-server. Every assertion stays in place. - When the `commandExecution` item is missing, the failure message now lists the observed notifications (method, item type, id, status) and the first 500 chars of the exec output, so a future regression is self-describing. This folds in the diagnostics from #154919. ## Proof - Local macOS, Node 24, `vitest.extension-database-workers.config.ts`: 5/5 runs green while the whole `extensions/codex/src/app-server` batch ran concurrently as load. - Docker `ubuntu:24.04` with the 0.155.1 linux-arm64 binary: `codex sandbox -c sandbox_mode=read-only -- cat` fails with bwrap namespace errors under default confinement and succeeds only when the container may create namespaces; `danger-full-access` runs in both. - `OPENCLAW_TESTBOX=1 pnpm check:changed`: see the landing log. Related: #154919 (diagnostics-only PR, superseded by this change), #155989 (0.155.1 pin).
Summary
extensions/codex/src/app-server/event-projector.output-fidelity.native.test.tsfails in every Linux Full Release Validation run for 2026.9.6 (runs 35743778013, 35761282770, 35776854018, 35802235259 attempts 1 and 2) withError: Expected native command executionfromrequireRecord, while passing on macOS.Root cause (environment, not a runtime contract change)
The proof dials
codex app-serverdirectly withsandbox_mode="read-only". Since Codex 0.154 bubblewrap is the only Linux sandbox (use_linux_sandbox_bwrapisStage::Removed,use_legacy_landlockdeprecated) and a read-only exec needs a user plus network namespace. The GitHub-hostedubuntu-24.04shard (checks-node-extensions-shard-1, image 20260907.300.1) cannot configure loopback inside that namespace. The diagnostics from #154919 captured the real exec output on Linux CI (run 35612418856):cat source.txtnever runs, app-server emits afunction_call_outputwith the bwrap error but noitem/completedwithtype: "commandExecution"for the call id, and the harness throws. The same symptom is already documented indocs/plugins/codex-harness-reference/approval-and-sandbox.mdand probed byopenclaw doctorfor namespace-restricted Ubuntu/AppArmor hosts. It became deterministic on the 09-22 runner rotation; Codex 0.155.1 did not change the Linux sandbox path (git diff rust-v0.154.0 rust-v0.155.1 -- codex-rs/linux-sandbox codex-rs/sandboxingonly adds WSL interop masking).settled-turn-finalizer.native.test.tspasses on the same shard because it runs through the product path, which launches app-server with--sandboxfrom the resolved exec policy and therefore never enters bwrap.Fix
sandbox_mode="danger-full-access"for this proof. It covers exec output fidelity (history truncation vs the provider-visible result), not sandboxing, and mirrors how product launches configure app-server. Every assertion stays in place.commandExecutionitem is missing, the failure message now lists the observed notifications (method, item type, id, status) and the first 500 chars of the exec output, so a future regression is self-describing. This folds in the diagnostics from test(codex): show native output-fidelity failure context #154919.Proof
vitest.extension-database-workers.config.ts: 5/5 runs green while the wholeextensions/codex/src/app-serverbatch ran concurrently as load.ubuntu:24.04with the 0.155.1 linux-arm64 binary:codex sandbox -c sandbox_mode=read-only -- catfails with bwrap namespace errors under default confinement and succeeds only when the container may create namespaces;danger-full-accessruns in both.OPENCLAW_TESTBOX=1 pnpm check:changed: see the landing log.Related: #154919 (diagnostics-only PR, superseded by this change), #155989 (0.155.1 pin).