Repository navigation
feat(skills): resolve explicit $skill references on every channel - #123387
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 8:28 PM ET / August 14, 2026, 00:28 UTC. ClawSweeper reviewWhat this changesThe PR resolves authorized explicit Merge readinessKeep open for maintainer review. The supplied PR material describes the parent issue’s approved direction, but this review environment could not execute read-only repository commands, so current-main, exact-head, history, scoped policy, and the claimed Codex-harness parity could not be verified. Priority: P2 Review scores
Verification
How this fits togetherInbound channel text enters the auto-reply pipeline before the selected agent harness runs. This change resolves eligible explicit skill references there and injects instructions for the harness to use before producing a channel reply. flowchart LR
A[Authorized inbound message] --> B[Auto-reply pipeline]
B --> C{Explicit skill reference?}
C -->|Yes| D[Resolve eligible skills]
D --> E[Inject skill instruction]
E --> F[Agent harness]
F --> G[Channel reply]
C -->|No| F
Decision needed
Why: The parent issue supplies product direction, but this review could not inspect the current implementation, relevant history, or the Codex-facing contract required by the PR’s parity claim. Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +9, Docs -1. Total +11 across 5 files. View PR surface stats
Review metrics
Mantis proof suggestionA redacted Telegram transcript would materially confirm the intended channel-visible invocation behavior and literal guard behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve one reply-pipeline resolver for authorized current-message references, then validate exact-head behavior across a messaging channel and each affected harness before merging. Do we have a high-confidence way to reproduce the issue? No. The submitted tests describe a focused path, but the read-only checkout could not execute any inspection or reproduction command in this environment. Is this the best way to solve the issue? Unclear. Centralizing resolution before harness dispatch matches the stated parent direction, but current-source and Codex-contract inspection are required to establish that it is the best owner boundary. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 245c14f30fa9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Explicit $skill-name references from authorized senders now resolve on all channels, not only WebChat/Control UI, and explicitly referenced skills are always invoked: disable-model-invocation keeps a skill out of model-initiated selection but no longer blocks user-initiated explicit references. Hidden skills carry their SKILL.md path in the injected instruction since the model cannot discover them from the available-skills prompt. Part of #123367
b6f5dc4 to
ccdd706
Compare
|
Merged via squash.
|
…enclaw#123387) * feat(skills): resolve explicit $skill references on every channel Explicit $skill-name references from authorized senders now resolve on all channels, not only WebChat/Control UI, and explicitly referenced skills are always invoked: disable-model-invocation keeps a skill out of model-initiated selection but no longer blocks user-initiated explicit references. Hidden skills carry their SKILL.md path in the injected instruction since the model cannot discover them from the available-skills prompt. Part of openclaw#123367 * fix(ci): dedupe run-attempt-state vitest lane ownership Main is red on the full-suite ownership audit from the openclaw#123235 x openclaw#123363 double-registration race. Keep run-attempt-state.test.ts beside its run-attempt siblings in the extra lane and heal the audit here per the land-onto-red-main policy.
Part of #123367 (Phase 1+3)
What Problem This Solves
Explicit
$skill-namereferences only worked on WebChat/Control UI turns; every other channel kept the token literal, so the same message behaved differently per channel. Manual-only skills (disable-model-invocation: true) additionally could not be invoked via$references at all — the explicit resolver skipped them.Why This Change Was Made
Maintainer product decision on #123367: if the user explicitly names a skill, it is invoked — everywhere. Resolution stays in the reply pipeline (one harness-independent owner before harness dispatch), so behavior is identical across embedded, Claude, and Codex harnesses and across channels.
disable-model-invocationnow governs exactly what its name says: model-initiated selection. Explicitly referenced hidden skills carry theirSKILL.mdpath in the injected instruction because the model cannot discover them from the available-skills prompt; model-visible skill lines stay byte-identical for prompt-cache stability.Existing guards are unchanged: authorized senders only,
\$nameescaping, all-uppercase shell variables ($PATH,$HOME) stay literal, resolution only against real eligible skill names, 8-reference cap.Phase 2 (Codex-side dedup: pass OpenClaw-resolved selections as structured
UserInput::Skilland neutralize consumed tokens, salvaging the #123311 design) follows as its own PR.User Impact
$skill-namein a Telegram/Discord/Slack/etc. message from an authorized sender now invokes the skill exactly like on WebChat, including manual-only skills. Docs updated (docs/tools/skills.md).Evidence
node scripts/run-vitest.mjs src/auto-reply/reply/get-reply-inline-actions.skip-when-config-empty.test.ts src/skills/discovery/chat-commands.test.ts(24 + 31 passed). The prior contract-pinning test ("keeps $ skill references literal on message channels") is flipped to assert resolution and hidden-skill path rendering.node scripts/check-changed.mjsgreen.Red-main heal (bundled per landing policy)
Current
mainfails the full-suite ownership audit (test/vitest-projects-config.test.ts):extensions/codex/src/app-server/run-attempt-state.test.ts(added by #123345 without a lane owner) was registered in two vitest lanes by independent repairs —attempt-lightvia #123235 andattempt-extravia #123363. The second commit here removes theattempt-lightentry soattempt-extrakeeps ownership (matching #123363's rationale); audit passes locally (21 tests green).