Repository navigation
fix(skills): preserve explicit skill context in workflow runs - #107
Merged
Merged
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 38 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
There was a problem hiding this comment.
Approved.
Traced the full 38-file diff. Solid, well-scoped fix for the dropped /skill context in restricted-tool workflow runs.
Correctness / architecture
- The
resolvedSkills(prompt-visible) vscommandSkills(user-invocable) split is the right shape — an explicit skill is resolved only fromcommandSkills/filterUserInvocableSkillEntries, never from the prompt-visible list.resolveRunPromptPolicycleanly extracts the restricted-tool prompt rule and keeps the selected skill's prompt while stripping the general catalog. - Cold-resume path handled:
resolveEmbeddedRunSkillEntriesforces a reload when the persisted snapshot lacks the explicit skill, andhydrateRuntimeSkillsrebuilds both lists.
Security
- Authorization double-gated:
handleInlineActionssetsexplicitSkillNameonly after theisAuthorizedSendercheck (unauthorized senders return early, no leak), andresolveExplicitSkillForRunrefuses anyuserInvocable:falseskill. Confirmed by the 'does not authorize from prompt-visible snapshot' + 'non-user-invocable' tests. - Persistence-stripping extended to
commandSkillsinstripPersistedSkillsCache— no sessions.json bloat and no SKILL.md body leak (tests assert both fields absent on disk).
Tests
- Every new branch has a targeted test across skill loading, prompt policy, session persistence, queue collect-split, embedded + CLI runners. 569 focused Vitest pass; prod/test TS, oxlint, oxfmt, full build all green per the PR evidence.
No blocking issues. Nice clean refactor that reduces debt rather than adding it.
This was referenced Aug 9, 2026
william-antoline-boon
added a commit
that referenced
this pull request
Aug 9, 2026
* fix(test): mock the real skills/loading/workspace.js exports, not a hand-picked subset attempt.spawn-workspace.context-engine.test.ts (and its sibling spawn-workspace test) fail with: [vitest] No "resolveExplicitSkillForRun" export is defined on the "../../../skills/loading/workspace.js" mock. #107 added resolveExplicitSkillForRun to src/skills/loading/workspace.ts and attempt.ts now calls it directly, but the test-support mock for that module was a hand-written full replacement exporting only resolveSkillsPromptForRun -- any other real export throws when called under test. Switch the mock to vi.importActual + spread (matching the existing pattern used one mock up, for ../../workspace.js) so it tracks the module's real export surface and only overrides what the test actually needs to control. Verified: both spawn-workspace test files pass (124/124). * release: 2026.6.11-boon.15 Version-bump release carrying the 1 commit merged onto boon since boon.14: #107 (ENG-17282, preserve explicit skill context in workflow runs). Bumps gateway + slack + msteams + diagnostics-prometheus to 2026.6.11-boon.15 in lockstep (9 files). * fix(deps): pin nanoid off HIGH advisories (GHSA-2v37-7h3g-55p8, GHSA-28wg-ghj8-5hjv) pnpm-audit-prod flags 2 HIGH advisories in the production dependency graph: - [email protected] (postcss>vite>vitest chain, reached via @openclaw/qa-lab's @copilotkit/aimock dependency) — GHSA-2v37-7h3g-55p8, non-secure generator can loop indefinitely when size is zero, fixed <3.3.17. - [email protected] (node-llama-cpp, an optionalDependency of @openclaw/llama-cpp-provider) — GHSA-28wg-ghj8-5hjv, same generator-loop class, fixed >=5.1.16. Range-scoped pnpm overrides (nanoid@3 / nanoid@5), matching the existing undici@7 / undici@8 precedent in this file, rather than a single global nanoid override — postcss's toolchain needs nanoid's CJS-era ^3 API while node-llama-cpp resolves the ESM-only 5.x line, so a global override would force one chain onto an incompatible major. Both patched versions were published 2026-08-07T16:41:06Z, inside the repo's 2880-min minimumReleaseAge window as of this fix, so they need an explicit minimumReleaseAgeExclude entry (same pattern as the other pinned CVE-fix versions already in that list). Regenerated extensions/llama-cpp/npm-shrinkwrap.json (the only extension shrinkwrap that pins nanoid) via generate-npm-shrinkwrap.mjs. Verified: node scripts/pre-commit/pnpm-audit-prod.mjs --audit-level=high -> "No high or higher advisories found for production dependencies." Also verified test/package-manager-config.test.ts + test/plugin-npm-package-manifest.test.ts (21/21) — the npm-shrinkwrap generation path that the earlier (reverted) 'parent>child' selector syntax crashed with EINVALIDTAGNAME is exercised cleanly by this range-selector form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Authorized
/skill <name>commands were rewritten into generic model text, but the selected skill identity was discarded before agent execution. Restricted-tool workflow runs then removed the entire skills prompt, so the model had no access to the selected skill instructions.Why This Change Was Made
User Impact
Manual workflow runs can execute the selected skill with its SKILL.md context instead of returning a generic capability refusal. Normal chat runs continue to expose only model-visible skills.
Paired transport and producer changes:
Deployment order: OpenClaw first, anychat second, boon-core producer last.
Evidence
pnpm buildpassedSummary by cubic
Fixes loss of explicit
/skill <name>context during runs. The selected skill is now preserved and validated end-to-end, and restricted-tool runs use minimal prompts while keeping the selected skill’s prompt.Bug Fixes
explicitSkillName.Refactors
resolvedSkillsand user-invocablecommandSkills; strip both from session persistence and hydrate both on resume.explicitSkillNameandpluginSkills.Written for commit f748f44. Summary will update on new commits.