Repository navigation
fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) - #137358
Conversation
The Gateway E2E vitest project globbed extensions/qa-lab's
control-ui-media-transcript.real-gateway.e2e.test.ts, a browser suite that
depends on the Control UI project's global setup (inject("controlUiE2eChromium")).
Collected under the Gateway project it fails at suite load with
"Cannot destructure property 'executablePath' of 'inject(...)'". Exclude the
UI real-gateway suite list from the Gateway project and assert the two
projects never collect the same browser file.
Owner: test/vitest/vitest.e2e.config.ts (Gateway E2E project).
Proof: new sharding test "collects browser suites only in their Control UI
projects" fails before and passes after; Full Release Validation Gateway 3/4
shard (run 33757831055) reproduced the load failure.
…ce argv transferSkillResources passed the receiver's temp root, identity, resource name, offsets and hash as argv to `node -e`. The paired-node workspace guard (node-worker-workspace.ts) realpaths every argv element and rejects paths outside the workspace, so the absolute tmpdir root failed every skill transfer with "INVALID_REQUEST: workspace command argv resolves outside its workspace" and Codex turns on paired nodes died before replying. Move the whole operation into a validated stdin JSON envelope: the receiver derives its temp root from a caller-supplied hex id, checks the exact key set, identity, hash and chunk bounds, and size-budgets each chunk against the stdin limit including the envelope. argv is now only `node -e <script>`. Owner: src/gateway/worker-environments/skill-resource-transfer.ts. Proof: unit tests drive a real NodeWorkerWorkspaceRuntime carrier (transfer despite a project path collision, rejected mutated requests); e2e codex-node-exec-server.e2e.test.ts fails before and passes after.
… Codex plugins Since #135118 the runtime reports a disabled or untrusted harness plugin as 'Agent harness runtime "codex" is unavailable. (reason=..., ownerPluginId=codex)' with a doctor hint instead of "plugin registration is missing from this prepared run". The copied-session e2e still asserted the retired text. Assert the current diagnostic and its reason per case. Proof: gateway-copied-codex-session-resume.e2e.test.ts 4/4 after; the two rejection cases failed before.
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 3, 2026, 11:13 AM ET / 15:13 UTC. ClawSweeper reviewWhat this changesThe branch keeps browser-only Control UI suites out of Gateway E2E shards, transfers paired-node skill resources through bounded stdin JSON instead of workspace command arguments, and updates a stale Codex harness diagnostic assertion. Merge readiness⛔ Blocked before merge - 1 item remains No blocking findings. The verified test-merge delta contains a focused repair for a real paired-node workspace failure and its E2E routing coverage; this maintainer-authored, maintainer-labeled PR should remain open for normal merge handling. Priority: P1 Review scores
Verification
How this fits togetherBefore a paired-node agent turn starts, Gateway transfers selected skill files through a workspace command boundary and gives the resulting resource locations to the turn. Separately, Vitest project configuration decides whether Gateway or Control UI owns each E2E suite. flowchart LR
A[Selected skill files] --> B[Gateway resource transfer]
B --> C[Workspace command boundary]
C --> D[Validated temporary resources]
D --> E[Paired-node agent turn]
F[E2E test files] --> G[Gateway E2E shard]
F --> H[Control UI browser project]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +34, Tests +212. Total +246 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain the workspace containment guard and land this bounded producer-side transfer repair with its direct-node and project-routing regressions. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the pre-fix transfer passed its absolute temporary resource root as argv, while the node workspace owner rejects argv paths outside the workspace. Is this the best way to solve the issue? Yes: carrying the resource operation in a bounded, exact-shape stdin envelope preserves the workspace argv containment invariant instead of weakening it or adding a fallback path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1fb3e0ca3384. 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.
|
* refs/remotes/origin/main: fix(plugins): reject unverifiable pinned npm installs (#136725) improve(ui): lift sidebar section headers on hover and mark online owners (#136985) test(cron): reuse isolated run suite hooks (#137341) test(channels): reuse shared indexed call guards (#137350) fix(ui): sidebar header controls read misaligned after the + button lost its border (#137317) fix(qa-channel): preserve conversation kind for implicit actions (#137343) fix: target the source checkout in Control UI repair commands (#137354) chore: reduce CI job count and database test overhead (#137352) fix(ios): preserve chat live edge across keyboard transitions (#136660) refactor(control-ui): consolidate mention inbox requests (#137375) fix(openai): preserve ChatGPT HTTP status for retry pacing (#137146) fix(mcp): hide policy-denied plugin tools from ACP sessions [AI] (#136546) test(queue): reuse shared deferred fixtures (#137338) fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) (#137358)
…ill resource argv, Codex diagnostic) (openclaw#137358) * fix(test): keep Control UI browser suites out of the Gateway E2E project The Gateway E2E vitest project globbed extensions/qa-lab's control-ui-media-transcript.real-gateway.e2e.test.ts, a browser suite that depends on the Control UI project's global setup (inject("controlUiE2eChromium")). Collected under the Gateway project it fails at suite load with "Cannot destructure property 'executablePath' of 'inject(...)'". Exclude the UI real-gateway suite list from the Gateway project and assert the two projects never collect the same browser file. Owner: test/vitest/vitest.e2e.config.ts (Gateway E2E project). Proof: new sharding test "collects browser suites only in their Control UI projects" fails before and passes after; Full Release Validation Gateway 3/4 shard (run 33757831055) reproduced the load failure. * fix(gateway): carry skill resource operations over stdin, not workspace argv transferSkillResources passed the receiver's temp root, identity, resource name, offsets and hash as argv to `node -e`. The paired-node workspace guard (node-worker-workspace.ts) realpaths every argv element and rejects paths outside the workspace, so the absolute tmpdir root failed every skill transfer with "INVALID_REQUEST: workspace command argv resolves outside its workspace" and Codex turns on paired nodes died before replying. Move the whole operation into a validated stdin JSON envelope: the receiver derives its temp root from a caller-supplied hex id, checks the exact key set, identity, hash and chunk bounds, and size-budgets each chunk against the stdin limit including the envelope. argv is now only `node -e <script>`. Owner: src/gateway/worker-environments/skill-resource-transfer.ts. Proof: unit tests drive a real NodeWorkerWorkspaceRuntime carrier (transfer despite a project path collision, rejected mutated requests); e2e codex-node-exec-server.e2e.test.ts fails before and passes after. * test(gateway): expect the harness-unavailable diagnostic for disabled Codex plugins Since openclaw#135118 the runtime reports a disabled or untrusted harness plugin as 'Agent harness runtime "codex" is unavailable. (reason=..., ownerPluginId=codex)' with a doctor hint instead of "plugin registration is missing from this prepared run". The copied-session e2e still asserted the retired text. Assert the current diagnostic and its reason per case. Proof: gateway-copied-codex-session-resume.e2e.test.ts 4/4 after; the two rejection cases failed before.
What Problem This Solves
Full Release Validation's "Repo E2E (Gateway 3/4)" shard failed deterministically on the 2026.9.1 release branch (run 33757831055, three attempts) and, on inspection, in every earlier run's shard log as well. Three independent defects surfaced together:
extensions/qa-lab/src/control-ui-media-transcript.real-gateway.e2e.test.tsis a Control UI browser suite, but the Gateway E2E vitest project globbed it and it died at load withCannot destructure property 'executablePath' of 'inject(...)'.INVALID_REQUEST: workspace command argv resolves outside its workspacewhenever skill resources were transferred.test/gateway-copied-codex-session-resume.e2e.test.tsasserted the retired "plugin registration is missing from this prepared run" text for disabled/untrusted harness plugins.Why This Change Was Made
transferSkillResourcespassed the receiver's absolute temp root (plus identity, name, offsets, hash) as argv tonode -e; the paired-node workspace guard realpaths every argv element and rejects paths outside the workspace. Operations now travel as a validated stdin JSON envelope; the receiver derives its temp root from a hex id and checks the exact key set, identity, hash and chunk bounds; chunks are size-budgeted against the stdin limit including the envelope. argv is onlynode -e <script>.Agent harness runtime "codex" is unavailable. (reason=..., ownerPluginId=codex)diagnostic that fix: explain unavailable agent harnesses on failed turns #135118 introduced, per case.User Impact
Codex runs on paired nodes that deliver skill resources no longer fail before the first reply. Release validation's Gateway E2E shard is green and stays green regardless of shard composition.
Evidence
src/gateway/worker-environments/skill-resource-transfer.test.ts(4/4, drives a realNodeWorkerWorkspaceRuntimecarrier incl. a project path collision and rejected mutated requests),test/scripts/vitest-e2e-sharding.test.ts(21/21, new browser-project assertion fails before the config change).test/gateway-copied-codex-session-resume.e2e.test.ts4/4 andtest/e2e/qa-lab/runtime/codex-node-exec-server.e2e.test.ts1/1 (both failed before).node scripts/check-changed.mjson all changed files: typecheck core/tests/root, oxlint, oxfmt, boundary and dead-code guards pass.