Repository navigation
fix(agents): retain skill guidance for reader-enabled routines - #186306
Conversation
|
🦞👀 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 maintainer review before merge. What this changesRetain eligible skill catalogs for reader-enabled routines while suppressing guidance when Code Mode lacks an admitted skill reader. Example: A scheduled weather routine has toolsAllow: ["read"] and an eligible weather skill.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a current skill-discovery bug, and the prior Code Mode finding is resolved; no actionable correctness or security findings remain. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe embedded runner combines eligible skill metadata with final tool capabilities to produce provider instructions and context diagnostics. flowchart TD
A[Scheduled routine] --> B[Tool construction and filtering]
C[Eligible skill catalog] --> D[Prompt preparation]
B --> D
D --> E[Skills renderer]
E --> F[Provider request]
E --> G[Context diagnostics]
Technical reviewBest possible solution: Use the existing skills renderer to expose catalogs only through genuinely available readers while preserving runtime caps and permission refresh. Do we have a high-confidence way to reproduce the issue? Current main directly establishes finite-reader catalog loss, and the revised serialized-request regression exercises that path; this read-only review executed no tests or runtime reproduction. Is this the best way to solve the issue? The production change is the smallest complete repair: remove caller-side suppression and keep reader availability in the existing renderer, including Code Mode. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ae9b009123ec. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -2, Tests 0, Docs +5. Total +3 across 7 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 27, 2026, 6:08 PM ET / 22:08 UTC (Revision 2). |
Keep skill guidance aligned with the actual reader capability during initial prompt preparation and permission refresh. Preserve native reader catalogs, runtime caps, and explicit tool-less runs.
Preserve serialized reader and permission-refresh regressions while sharing equivalent prompt fixtures and removing duplicate cases. Keep the overall PR test-line delta at zero without changing the baseline.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
#186306 stopped prompt preparation from discarding the skills catalog for every finite tool cap; the renderer (buildSkillsSection) now gates on the actually admitted reader. The Code Mode skill-policy table still expected the old discard for `toolsAllow: ["message"]`, so main fails attempt.skills-policy.test.ts:298 (seen on PR #186368's CI). The renderer still omits the catalog there because no skills reader is admitted, and the row keeps asserting that the skills.list() guidance is absent. Proof: attempt.skills-policy 5/5 and system-prompt 60/60 green.
…law#186306) * fix(agents): retain skill guidance for reader-enabled routines * fix(agents): require an admitted Code Mode skill reader Keep skill guidance aligned with the actual reader capability during initial prompt preparation and permission refresh. Preserve native reader catalogs, runtime caps, and explicit tool-less runs. * test(agents): consolidate prompt capability coverage Preserve serialized reader and permission-refresh regressions while sharing equivalent prompt fixtures and removing duplicate cases. Keep the overall PR test-line delta at zero without changing the baseline. --------- Co-authored-by: Gio Della-Libera <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
openclaw#186306 stopped prompt preparation from discarding the skills catalog for every finite tool cap; the renderer (buildSkillsSection) now gates on the actually admitted reader. The Code Mode skill-policy table still expected the old discard for `toolsAllow: ["message"]`, so main fails attempt.skills-policy.test.ts:298 (seen on PR openclaw#186368's CI). The renderer still omits the catalog there because no skills reader is admitted, and the row keeps asserting that the skills.list() guidance is absent. Proof: attempt.skills-policy 5/5 and system-prompt 60/60 green.
Closes #186285.
What Problem This Solves
Fixes: scheduled agents lose eligible skill guidance when their explicit tool limits still permit reading instructions. Also prevents readerless Code Mode runs from advertising skill instructions they cannot read.
User Impact
Reader-enabled routines retain their skill catalog. Excluded or unavailable readers, write-only Code Mode, and explicit
toolsAllow: []still receive no catalog. This adds no tools, filesystem access, permissions, configuration, or persistence changes. A model still decides whether to follow the instructions.Why This Change Was Made
Keep Gio Della-Libera's original native-reader fix and remove the blanket finite-cap catalog suppression. The canonical skills renderer owns capability guidance: Code Mode now requires both its
execcontrol and the admittedskills_readcapability. Permission refresh uses the same final capability set. Runtime caps and minimal prompt mode remain enforced.Thanks @giodl73-repo for the original fix and request-level regression coverage; the original commit is preserved. Redundant prompt fixtures and equivalent cases were consolidated so the new regressions add no net test lines.
Evidence
readandskills_readpositives fail on main; write-only Code Mode and reader-removal refresh fail on the original PR renderer. The final consolidated regression still produces exactly those two Code Mode failures with seven controls passing. Excluded/unavailable readers and explicit empty caps remain omitted.openclaw/ci-gateand the separate aggregate gate passed. The six changed-test jobs took 141s, 289s, 373s, 476s, 198s, and 220s wall time including setup.readis offered but the canary catalog is absent. Real Qwen3 8B receives the same omission and guesses an incorrect token without reading the skill.readplus the canary catalog, obtains successful skill-file and canary-file receipts, and returns the exact token. Real Qwen3 8B repeats those two reads and the exact answer in 4.457s; delivery remainsnot-requested. The token is absent from the initial request. Raw synthetic runtime captures are retained locally and are not attached to this PR.Production +5/-7 (net -2), tests +254/-254 (net 0), documentation +5/-0 against the merge base. No compatibility path or new owner was added.