Skip to content

fix(gateway): repair the Gateway E2E shard (browser suite project, skill resource argv, Codex diagnostic) - #137358

Merged
steipete merged 3 commits into
mainfrom
fix/release-gateway-e2e-shard3
Sep 3, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/release-gateway-e2e-shard3

Conversation

@steipete

@steipete steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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:

  1. extensions/qa-lab/src/control-ui-media-transcript.real-gateway.e2e.test.ts is a Control UI browser suite, but the Gateway E2E vitest project globbed it and it died at load with Cannot destructure property 'executablePath' of 'inject(...)'.
  2. Codex turns on paired nodes failed before replying with INVALID_REQUEST: workspace command argv resolves outside its workspace whenever skill resources were transferred.
  3. test/gateway-copied-codex-session-resume.e2e.test.ts asserted the retired "plugin registration is missing from this prepared run" text for disabled/untrusted harness plugins.

Why This Change Was Made

  • The Gateway project now excludes the UI real-gateway suite list, and a sharding test asserts the two projects never collect the same browser file.
  • transferSkillResources passed the receiver's absolute temp root (plus identity, name, offsets, hash) as argv to node -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 only node -e <script>.
  • The copied-session e2e asserts the current 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

  • Unit: src/gateway/worker-environments/skill-resource-transfer.test.ts (4/4, drives a real NodeWorkerWorkspaceRuntime carrier 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).
  • E2E on a fresh build of this branch: test/gateway-copied-codex-session-resume.e2e.test.ts 4/4 and test/e2e/qa-lab/runtime/codex-node-exec-server.e2e.test.ts 1/1 (both failed before).
  • node scripts/check-changed.mjs on all changed files: typecheck core/tests/root, oxlint, oxfmt, boundary and dead-code guards pass.
  • Origin: Full Release Validation 33757204984 → release-checks 33757831055 (Gateway 3/4, attempts 1–3).

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.
@steipete
steipete marked this pull request as ready for review September 3, 2026 14:52
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Sep 3, 2026
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 11:13 AM ET / 15:13 UTC.

ClawSweeper review

What this changes

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) B: a focused, source-consistent repair with boundary-level regression coverage and no identified introduced defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a member-authored PR, so the external-contributor proof gate does not apply; the supplied branch evidence reports focused E2E and real node-workspace coverage, while this read-only review independently verified the source-to-boundary path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a member-authored PR, so the external-contributor proof gate does not apply; the supplied branch evidence reports focused E2E and real node-workspace coverage, while this read-only review independently verified the source-to-boundary path.
Evidence reviewed 7 items Workspace rejection boundary: The node workspace runtime resolves path-like command arguments and rejects ones outside its workspace; the pre-fix resource root was such an argument.
Introduced resource-transfer repair: The introduced code keeps argv to the Node executable, -e, and script, sends an exact-shape operation envelope over stdin, bounds its byte size, and checks the generated resource identity before writes or cleanup.
Caller authority boundary: The worker-turn finalizer calls the transfer before preparing the computer and supplies a placement-and-turn liveness assertion, so the repair remains at the resource-transfer owner rather than weakening the workspace guard.
Findings None None.
Security None None.

How this fits together

Before 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]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +34, Tests +212. Total +246 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 1 71 37 +34
Tests 5 228 16 +212
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 299 53 +246

Review metrics

Metric Value Why it matters
Production vs test delta production +74/-37 (net +37); tests/support +225/-16 (net +209) The production growth is the validated bounded-envelope and identity fencing needed to preserve workspace containment; most added coverage exercises direct and node workspace carriers.

Stored data model

Persistent data-model change detected: serialized state: src/gateway/worker-environments/skill-resource-transfer.ts, unknown-data-model-change: src/gateway/worker-environments/skill-resource-transfer.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

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

Labels

Label changes:

  • add P1: The repaired path can prevent paired-node Codex agent turns from reaching their first reply.
  • 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 is a member-authored PR, so the external-contributor proof gate does not apply; the supplied branch evidence reports focused E2E and real node-workspace coverage, while this read-only review independently verified the source-to-boundary path.

Label justifications:

  • P1: The repaired path can prevent paired-node Codex agent turns from reaching their first reply.
  • 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 is a member-authored PR, so the external-contributor proof gate does not apply; the supplied branch evidence reports focused E2E and real node-workspace coverage, while this read-only review independently verified the source-to-boundary path.

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)
  • Josh Lehman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick Erichsen: 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.

@steipete
steipete merged commit d2a616b into main Sep 3, 2026
247 of 251 checks passed
@steipete
steipete deleted the fix/release-gateway-e2e-shard3 branch September 3, 2026 15:16
@steipete

steipete commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 3, 2026
* 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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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