Repository navigation
fix(worker): remote skills use the wrong filesystem paths - #138091
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 5:14 AM ET / 09:14 UTC. ClawSweeper reviewWhat this changesThe PR makes remote-worker skill catalogs and explicit skill references point to the worker’s transferred copy rather than the Gateway source path. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: current main still exposes Gateway source paths to remote-worker skill selection, while this PR repairs that mismatch at the transfer and dispatch boundaries with matching coverage. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway transfers selected skills into a remote worker for each turn. That transferred snapshot feeds Code Mode and explicit skill selection during the worker run. flowchart LR
A[Gateway skill selection] --> B[Per-turn resource transfer]
B --> C[Worker-copy catalog]
C --> D[Code Mode selection]
D --> E[Remote worker run]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +16, Tests +460, Docs +2. Total +478 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one transferred per-turn snapshot whose catalog and explicit references name the worker copy, retaining the Gateway source only as provenance. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main retains Gateway source paths in the transferred catalog and forwards explicit selections unchanged despite mounting worker copies; the read-only review did not rerun the live scenario. Is this the best way to solve the issue? Yes: projecting the catalog at the transfer owner and mapping explicit selections from the same mounts establishes one worker-copy identity without duplicate catalog state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b8cdd65bdf61. 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.
|
…38091) * fix(worker): remote skills use the wrong filesystem paths * test(worker): wait for session hosting before live dispatch
What Problem This Solves
Remote-exec skill bundles were copied to the worker, but the skill catalog still listed the Gateway's original
SKILL.md. Ordinary skill invocation could therefore read or execute from the Gateway path, which is unavailable on a separate machine. Explicit skill references also retained that source path.This was found while live-testing the cleanup repair in #137800. The path mismatch predates that repair: the parent-relative patch for #134068 introduced the original-path-plus-remote-note representation, and it is present in stable
v2026.9.1.Why This Change Was Made
The transfer owner now gives the turn one location: the verified worker copy. Catalog entries use its file and directory, Code Mode reads the same prepared instruction bytes, and dispatch remaps explicit references with the existing sandbox path helper. Original source metadata remains provenance. The contradictory location note is removed; generic guidance tells the model to read the listed file without assuming a particular tool name.
This follows the existing worker materialization and sandbox ownership boundary. Registering remote files in Codex's shared skill catalog or adding a second resolver would create another state owner without fixing the incorrect turn snapshot.
User Impact
Named and explicit skill invocation use the current worker copy, including relative scripts and resources. Gateway source edits affect later turns. No SQLite, schema, migration, configuration, protocol, or dependency changes.
Production delta: +16 lines net, covering the remote projection and reuse of the existing explicit-reference mapping. Tests exercise both SSH and node transfer, ordinary sandbox behavior, original-source immutability, prepared reads after source edits, and actual harness dispatch.
Evidence
openai/gpt-5.6-lunaproof passed onf7d63dd6867cf4094c2b905a1a1a8fd486b7ec7a: ordinary named invocation and explicit$skillinvocation used the worker copy while the Gateway source directory was hidden. Both read 168,000 verified bytes with SHA-256d4bad64fd45be27881187c6d782515eacfe6f485e1fe0b880f036e3759d1f493; executable mode and node process ancestry passed. Normal cleanup removed the allocation. An actual moved allocation caused visible cleanup failure, then a no-skill turn reclaimed it while preserving attachment and project sentinels.OPENCLAW_LIVE_TEST=1 OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.live.config.ts test/e2e/qa-lab/runtime/worker-skill-resources.live.test.ts. Backend: Blacksmith Testboxtbx_01m1nskj34rac1dnccadp1br0n; run, command exit 0, test 59.44 seconds. Testbox teardown can show the linked workflow as cancelled; the wrapper command result is the live verdict.sessionHostreadiness signal; the rerun passed. Test-only lint findings were also fixed.codex-rs/ext/skills/src/tools/read.rsuses package catalog identity;codex-rs/ext/skills/src/selection.rsresolves explicit selections by exact catalog path. Existing OpenClaw Codex input handling omits unavailable native catalog selections and retains prompt guidance.Related: #137800.
Maintainer review resolution
ClawSweeper identified no actionable code or security findings and accepted the real-behavior proof. Its sole merge-risk item is the +16 production lines. Accepted: those lines are limited to projecting the already-transferred skill's file/base path and verified instruction bytes (+6 net), and reusing the existing dispatcher/sandbox reference mapper (+10 net). The requested mitigation is already implemented: one per-turn snapshot and one worker-copy identity, with Gateway source retained only as provenance. A net-zero variant would leave either conflicting catalog paths or unremapped explicit references; adding another catalog/resolver would be less simple. No new state owner, configuration, schema, or fallback path was introduced.
Final-head CI passed on
f7d63dd6867cf4094c2b905a1a1a8fd486b7ec7a.