Repository navigation
fix(skills): preserve canonical names through discovery and workshop - #136495
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 2, 2026, 6:22 PM ET / 22:22 UTC. ClawSweeper reviewWhat this changesThe PR prioritizes exact skill names over metadata aliases and preserves the resolved name through CLI discovery, Workshop reads, proposals, revisions, and documentation. Merge readiness⛔ Blocked before merge - 1 item remains Keep open. The final commit addresses the prior retry-selector finding and preserves canonical names through discovery, Workshop proposals, and revisions; current main and the latest stable release still contain the first-match behavior this PR repairs. Priority: P2 Review scores
Verification
How this fits togetherSkill discovery resolves workspace skill identifiers for both the CLI and Skill Workshop. Workshop uses that result to read a skill, create or revise a proposal, and eventually apply changes to its backing file. flowchart LR
A[Workspace skill files] --> B[Skill discovery]
B --> C[Ranked identifier lookup]
C --> D[Skills CLI]
C --> E[Skill Workshop]
E --> F[Proposal and revision]
F --> G[Updated skill file]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -33, Tests +279, Docs +10. Total +256 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Merge the shared ranked resolver and canonical-name propagation after the exact-head required checks complete, leaving metadata keys as supported aliases rather than mutation selectors. Do we have a high-confidence way to reproduce the issue? Yes. Current main and v2026.8.2 source show the combined exact name-or-key first-match branch, and the introduced tests construct the conflicting-name workspace scenario across CLI and Workshop flows. Is this the best way to solve the issue? Yes. Centralizing ranked resolution at the shared discovery owner and carrying its canonical result into Workshop proposal generation avoids discovery-order selection and frontmatter-name replacement without adding configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9aa85210ab75. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Merged via squash.
|
…penclaw#136495) * fix(skills): prioritize exact names over metadata aliases Fixes openclaw#136493 * test(gateway): assert canonical pending recovery depth * test(gateway): adopt canonical recovery queue admission * ci: refresh checks against current main * fix(skills): preserve canonical names through workshop revisions
Fixes #136493.
What Problem This Solves
An exact skill name could silently select an earlier skill's metadata alias. Even after selecting the correct file, retry guidance could redirect the agent to the conflicting alias, and update/revision drafts could replace the live frontmatter name with that key. Inspection and Workshop now keep the requested skill's canonical name throughout the workflow.
Why This Change Was Made
The shared resolver checks exact names, exact metadata keys, case-insensitive matches and normalized matches in order; ambiguity in the strongest matching tier stops selection. Writable summaries and read/prepare results expose the canonical name. Retry instructions, generated update/revision frontmatter, proposal projections and Gateway revision instructions carry that same name. Creation still uses its existing normalized name.
The repair deletes four match/count accumulators, duplicate summary construction, duplicate update/patch proposal construction, a copied patch-target type and a redundant nullable instruction branch. Metadata keys, target files, content/revision hashes, receipt maps and authority bindings keep their existing contracts.
Production +82 / −115 = −33 LOC; tests/support +343 / −64 = +279; docs +10. No new config option, dependency, schema or material store change.
User Impact
skills infoand Workshop select exact names consistently regardless of discovery order. Following read/patch guidance stays on the intended skill, and applying a revision preserves the name needed to read that skill again. Unique aliases and normalized lookup remain supported. Existing pending drafts are not silently rewritten; their normal revision owner changes draft content.Evidence
The original compiled CLI on
65e5b2e19c9db6460494682bacc4bee10db755fdlisted both synthetic skills, then selectedqa-alias-skillforskills info qa-exact-target --json --agent proof. The rebuilt CLI selectedqa-exact-targetand its actual file in both JSON and text. Original owner/sibling validation passed 226 tests and the canonical runtime build.The final native tool/filesystem/proposal flows reproduce the complete failure and repair:
alpha-guide, whose metadata key isbeta-guidebeta-guidealpha-guideand its original filealpha-guidebeta-guide; readingalpha-guidefailsalpha-guide; read succeedsFriendly New Guidefriendly-new-guideThe original CLI proof uses the compiled CLI; final identity follow-through uses actual source tool/service operations and real synthetic files/proposals with a scripted guidance consumer. The Gateway instruction proof captures the existing handler dispatch, rather than claiming a live socket or model turn. UI autocomplete relevance in #123533 is a separate behavior.
Compatibility and final review
The latest ClawSweeper review confirms the prior retry-selector finding is fixed and reports no remaining correctness finding. Its sole remaining item flags
frontmatter.tsfor data-model compatibility. Seventeen complete record/schema/store/parser owners are byte-identical, as are the existing frontmatter renderer, reader and stripping functions. The change chooses between existing name/key values; it adds no field or migration.Actual readers from original
65e5b2e19c9db6460494682bacc4bee10db755fdand finalb09e55f6f1a8bd7e48869dd7eb3217fd6b7f79a4each accepted the same 27 copied Markdown artifacts and seven stored proposal records with identical results. They read the exact newly generated, revised and applied skill bytes. Both retained two older pending drafts with identical content, stored JSON, pending status, draft hash and revision hash. Explicit revision regenerates the corrected name; reads and apply do not silently rewrite approved drafts. This is real source-reader compatibility proof, not a separately installed stable-release downgrade test or a whole-SQLite-file byte-identity claim.The required CI gate passes on that final head, with no pending or failed checks in the final snapshot. The compatibility item is addressed and no Rank-up move remains.