Skip to content

fix(skills): keep paired-node skill reads on delivered instructions - #175906

Merged
roboclaw-bot merged 2 commits into
openclaw:mainfrom
galiniliev:galiniliev/port-paired-node-skill-turns
Oct 18, 2026
Merged

roboclaw-bot merged 2 commits into
openclaw:mainfrom
galiniliev:galiniliev/port-paired-node-skill-turns

Conversation

@galiniliev

@galiniliev galiniliev commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #175905

What Problem This Solves

Paired-node turns can lose access to verified skill instructions through skills_search and skills_read, including eligible skills omitted from the prompt directory.

User Impact

Prompt references, instruction search, and whole-skill reads consume the same verified delivery for the admitted turn, even without a node filesystem bridge. Retired turns and different mounts cannot reuse it. Eligible discovery skills share the existing 8 MiB transfer budget; no configuration or schema migration is required.

Why This Change Was Made

Reuse the existing session skill-resource context and exact mount identity to bind the delivered catalog. Transfer preparation includes eligible discovery candidates, publishes delivered locations and verified instruction bytes, and removes stale host provenance. Consumers retain the delivery owner’s lifecycle checks. No authority owner or persistent cache is added.

Evidence

The original transfer/catalog regression proves delivered prompt/search/read byte equality, changed-host/cache rejection, mismatched-mount exclusion, and retirement. Review added red-to-green regressions for prompt-omitted native node discovery and catalogs above the existing 256-item wire limit. Prompted, explicit, and pinned resources retain priority; the 8 MiB limit is unchanged.

All 62 focused transfer, resource-preparation, and workspace-resource tests pass after repair. Targeted source/test typechecks, lint, formatting, and diff checks pass. Independent Auto Review of the corrected candidate has no actionable P0–P2 findings. The original 118-test/build evidence is historical; no fresh full build or live paired-node/provider proof is claimed for the repair. Fresh hosted CI is pending.

Thanks @galiniliev for the original implementation.

Work sessions

These links cover review fixes and preparation; the original implementation predates this review.

Retained source-session evidence

Inspected the originating local implementation session and retained acceptance receipts. The JSON below is a sanitized field projection: private model routes, credentials, session/account identifiers, host/deployment paths and raw transcripts are omitted. Original evidence stays private.

No direct live paired-node skill search/read acceptance receipt was found in the identified primary session. Its successful local dashboard skills_read calls do not exercise paired-node mount identity or retirement and are not presented as that proof. The existing current-port boundary tests remain the evidence for those contracts.

Sanitized evidence receipt
{
  "proofKind": "primary-session evidence audit; no new live claim",
  "currentPortHead": "97305049ea1fb18ec35c597608bc85a5bdb1df9d",
  "qualifyingLivePairedNodeSearchReadReceiptFound": false,
  "existingCurrentPortBoundaryProof": {
    "passingOwnerAndSiblingTests": 118,
    "covers": [
      "same delivered prompt/search/read bytes",
      "mismatched mount identity exclusion",
      "retained search/read rejection after turn retirement",
      "node workspace lifecycle cleanup"
    ]
  },
  "localDashboardSkillReadsArePairedNodeProof": false
}

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: S labels Oct 17, 2026
@galiniliev
galiniliev marked this pull request as ready for review October 17, 2026 23:01
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 8baafc56b0af79fe43f86687f9dbe0876a912c56
  • Maintainer: @galiniliev
  • Repository role: maintain

These security sensitive changes were made:

  • src/agents/embedded-agent-runner/sandbox-skills.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR binds skill prompts, search, and reads to verified turn deliveries and includes eligible discovery skills.

Example: A paired-node turn receives the source skill containing instructions to read data.bin, without a filesystem bridge.

  • Before: Installed-skill reads discard the delivered instructions and fail because the filesystem bridge is unavailable.
  • After: Prompt, search, and read consumers use the delivered instructions while the exact turn remains active.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful owner-level boundary coverage supports the repair, but the new capacity filter leaves a concrete turn-start failure.
Proof confidence 🦐 gold shrimp (3/6) Sufficient (none): For this maintainer-authored change, the supplied production-owner node-runtime regression covers allowed delivered reads, exclusion of a different mount identity, and rejection of retained tools after retirement; the body reports passing focused tests and explicitly disclaims live paired-node proof.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Paired-node agents cannot reliably search or read admitted skill instructions when no filesystem bridge is available.
Reason: The change restores useful existing skill operations through their established delivery owner; maintainer authorship supplies direction for including discovery skills.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This PR addresses a current paired-node skill-read defect, but its discovery cap is applied too late to prevent an omitted skill from aborting the turn.

Priority: P2
Reviewed head: 8baafc56b0af79fe43f86687f9dbe0876a912c56

Before merge

  • Apply the discovery slot limit before reading bundles (P2) - The filter runs after every candidate has been read and charged against the 8 MiB limit at lines 314–316. With maxSkillsInPrompt=1, maxSkillsLoadedPerSource=300, and 257 eligible skills whose bundles are each 32 KiB, the intended 256-skill delivery fits exactly, but preparing the 257th bundle throws SkillResourceDeliveryLimitError before this filter can omit it. Current main prepares only the prompted skill for that input. Select the prioritized 256 candidates before bundle reads so resources excluded from delivery cannot abort the turn.

Findings

  • [P2] Apply the discovery slot limit before reading bundles — src/skills/runtime/resources.ts:347-350

Tests

  • Missing end-to-end proof: The supplied regressions do not cover aggregate overflow caused solely by discovery bundles later excluded by the 256-skill cap.
Agent review details

How this fits together

Skill preparation converts the admitted catalog into bounded worker resources; sandbox and installed-skill consumers expose their verified instructions to the agent.

flowchart LR
  A[Admitted skill catalog] --> B[Resource preparation]
  B --> C[Node workspace delivery]
  C --> D[Turn resource context]
  D --> E[Sandbox prompt]
  D --> F[Installed skill search and read]
  G[Live turn authority] --> D
Loading

Technical review

Best possible solution:

Keep the existing delivery owner and select the prioritized, bounded candidate set before reading bundles or charging the aggregate byte budget.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the no-bridge failure, and the added production-owner regression composes the affected consumers; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Reusing the admitted delivery context is appropriate, but the capacity selection must precede bundle preparation to enforce the intended delivery boundary.

Full review comments:

  • [P2] Apply the discovery slot limit before reading bundles — src/skills/runtime/resources.ts:347-350
    The filter runs after every candidate has been read and charged against the 8 MiB limit at lines 314–316. With maxSkillsInPrompt=1, maxSkillsLoadedPerSource=300, and 257 eligible skills whose bundles are each 32 KiB, the intended 256-skill delivery fits exactly, but preparing the 257th bundle throws SkillResourceDeliveryLimitError before this filter can omit it. Current main prepares only the prompted skill for that input. Select the prioritized 256 candidates before bundle reads so resources excluded from delivery cannot abort the turn.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against fefe44fe787f.

Provenance checked

  • Sandbox installed-skill reads keeps the original intent (b5b1029: Bind installed skills to their admitted catalog and readable sandbox placement rather than trusting ambient host paths.)
  • Worker-copy paths and instruction bytes keeps the original intent (7abb0ec: Give remote turns one verified worker-copy location and retain its exact instruction bytes.)
  • Discovery transfer selection changes intended behavior with a stated reason (b5b1029: Installed discovery originally preserved worker transfer selection and exposed only already-delivered sandbox skills.)
  • Sandbox prompt resource projection keeps the original intent (3b6bcbf: Advertise readable sandbox copies instead of inaccessible host paths while preserving filesystem boundaries.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/skills/runtime/resources.test.ts --maxWorkers=1
  • pnpm test src/gateway/worker-environments/skill-resource-transfer.test.ts --maxWorkers=1
  • pnpm test src/skills/runtime/resources.workspace.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Vincent Koc: Raw commit b5b1029 adds src/agents/installed-skill-runtime.ts:12 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b5b1029990fd; files: src/agents/installed-skill-runtime.ts)

PR surface

Source +82, Tests +177, Docs +6. Total +265 across 11 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 92 10 +82
Tests 3 178 1 +177
Docs 1 8 2 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 278 13 +265

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #175905
Summary: The linked report describes the same discarded delivery and missing discovery-resource paths addressed by this PR.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add merge-risk: 🚨 availability: An eligible discovery skill omitted by the final cap can exhaust preparation's byte budget and prevent the turn from starting.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: The PR repairs a bounded paired-node workflow and has a focused capacity defect without evidence of widespread outage.
  • merge-risk: 🚨 availability: An eligible discovery skill omitted by the final cap can exhaust preparation's byte budget and prevent the turn from starting.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-17T23:18:14.945Z sha 9730504 :: needs maintainer review before merge. :: none

Reviewed October 17, 2026, 11:19 PM ET / October 18, 2026, 03:19 UTC (Revision 2).

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M and removed size: S labels Oct 18, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Prepared the corrected candidate at 8baafc56b0af79fe43f86687f9dbe0876a912c56: native node discovery survives prompt omission, and optional delivery respects the existing 256-item cap while preserving prompted, explicit, and pinned resources. Both regressions fail before repair; 62 focused tests and targeted checks pass afterward. The PR body records the proof and live-node limitation.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 18, 2026
@roboclaw-bot
roboclaw-bot merged commit 478f350 into openclaw:main Oct 18, 2026
181 of 182 checks passed
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 18, 2026
…penclaw#175906)

* fix(skills): bind paired-node instructions to delivered turns

* fix(skills): preserve bounded remote discovery resources

Co-authored-by: galiniliev <[email protected]>

---------

Co-authored-by: galiniliev <[email protected]>
ryan-dyer-sp added a commit to ryan-dyer-sp/openclaw that referenced this pull request Oct 19, 2026
Resolve 9 files / 17 conflict hunks from upstream/main (6e23cf0,
2471 commits; merge-base 8fda964) onto the skill-fingerprint port
branch, adapting the PR onto upstream's new shapes:

- skill-resource-transfer.ts: adopt upstream openclaw#175906 delivered-skills
  discovery projection (clearSkillFileHost, contentHash, sourceInfo)
  and thread the PR's bundleFingerprint onto the delivered entry so
  both the discovery projection and Object.assign'd resolved entry
  carry the transferred bundle's identity. Keep the PR's
  matchesDeliveryIdentity (host-aware same-path disambiguation) for
  resolved-entry matching; upstream still matches raw paths. Drop the
  PR-side cloned-discoverySkills stamping block as redundant under
  upstream's deliveredSkills construction.
- agent-tools.read.ts / prepared-compaction-runtime.ts /
  attempt-tool-prepare.ts: adopt upstream openclaw#174920 inlining of the
  single-owner createSkillInstructionDeliveryCache seam (new Map at
  the owning operation); keep the PR's per-attempt
  createSkillInstructionDeliveryMarkers contract on every owner.
  Adapt all cache callers (e2e/coding-tools/skill-runtime tests,
  attempt-execution-phase test support, upstream's
  attempt.tool-search-run-plan fixture) to inline Map construction.
- resources.test.ts: adopt upstream openclaw#175906's rewritten harness
  (prepare/selected/invalidBundle/materialize helpers) and port the
  PR's fingerprint suites onto it; the explicit-selection rejection
  assertion is upstream's own now (dedup).
- resources.workspace.test.ts: adopt upstream's thinned flattened
  suite and new fixture; port the PR's 10 fingerprint/discovery tests
  onto the global-f harness.
- session-snapshot.integration.test.ts: adopt upstream's rewritten
  suite (persist/bindWorkspace/params.resolve) and port the PR's
  restamp-monotonicity assertion blocks onto it.
- diagnostics-otel service.test.ts: adopt upstream's single-event
  recorder shape and counter() helper; keep the PR's
  skillFingerprint event field, span attribute, fingerprint-free
  metric assertions (omittedText in upstream's vocabulary; stateOmits
  machinery was removed upstream).

Validation: all suites around the merged files (skill-resource-transfer,
resources, resources.workspace, session-snapshot, session-snapshot.integration,
attempt-execution-phase, attempt-tool-prepare.web-search, skill-library-read,
session-updates, agent-tools e2e + coding-tools, skill-runtime, otel service),
tsgo:core / tsgo:extensions / tsgo:core:test, architecture guard, fast-baseline
ratchets (assertion-safety, database-worker, database-dialect, timeout-race,
mock-exports, protocol-since), oxlint at CI severity (one advisory max-lines
warning on skill-resource-transfer.test.ts, smaller than the pre-merge branch
file that already carried the same advisory), oxfmt, git diff --check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. security-sensitive-changed size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paired-node skill search and reads lose verified delivered instructions

2 participants