Repository navigation
fix(skills): preserve ClawHub publisher identity - #117681
synthalorian wants to merge 1 commit into
Conversation
|
Codex review: found issues before merge. Reviewed August 12, 2026, 5:20 AM ET / 09:20 UTC. ClawSweeper reviewWhat this changesThis PR carries a selected ClawHub publisher reference through Gateway, Control UI, and native clients so same-slug skills are reviewed and installed from the chosen publisher. Merge readinessKeep this PR open: current main still has the reported publisher-collision bug, but this branch leaves source-qualified search results vulnerable to identity loss and the proposed replacement is currently reported as conflicted, so it cannot safely supersede this work yet. Priority: P1 Review scores
Verification
How this fits togetherClawHub search results pass through the Gateway protocol to web and native skill browsers, which then request a skill review or installation. The selected registry identity must remain intact across that path so a duplicate slug cannot select a different publisher or source. flowchart LR
A[ClawHub search] --> B[Gateway search contract]
B --> C[Web and native skill browsers]
C --> D[Selected skill identity]
D --> E[Gateway detail or install]
E --> F[ClawHub registry]
A --> G[Source-qualified skill]
G --> B
Decision needed
Why: The branch fixes publisher-qualified ClawHub results but deliberately omits the existing source-qualified identity, and the user-facing behavior for those results requires an explicit product choice. Before merge
Findings
Agent review detailsSecurityNeeds attention: The identity-preservation change leaves an existing source-qualified result able to lose its identity before a security-sensitive review/install decision. PR surfaceSource +31, Tests +297, Generated 0, Other +50. Total +378 across 39 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Project the registry-supplied installRef as the one canonical search identity, carry it unchanged through every client and Gateway operation, and give external-source review an explicit safe refusal or install-only flow before selecting one clean canonical PR. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main drops identity at the Gateway search schema and sends a bare slug for detail and installation, while the registry client already supports qualified identity. Is this the best way to solve the issue? No; the publisher-only repair is incomplete because it ignores the producer-owned installRef used for source-qualified results. Carrying that one reference end-to-end is the safer owner-boundary fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5350b92dc83d. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What 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
HistoryReview history (18 earlier review cycles; latest 8 shown)
|
d31b509 to
cd8f75f
Compare
Fix for P1: Include publisher in the in-flight install keyWhat this fixesThe in-flight install deduplication key did not include Changes
Live test evidenceKey tests:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
emma300es
left a comment
There was a problem hiding this comment.
This PR threads publisher identity through the Control UI detail/install requests, which is the right direction for #117633. At exact head 3fe9c2afa712, though, the repair is still incomplete across the shared client contract and introduces an unrelated browser-redaction regression.
LOC: +394/-63 (10 files)
Findings
-
P1 — Restore the existing Control UI error-redaction boundary. The patch removes
formatErrorMessage(..., { redact: redactToolDetail })and replaces it with rawError.message/String(err)atui/src/lib/skills/index.ts:160; that raw text is then rendered from the catch paths at lines 351, 470, 514, 567, 678, and 746.ui/src/lib/browser-redact.ts:66-81exists specifically to mask credential families and sensitive URL query values before browser display. This change is unrelated to publisher qualification and can expose secret-shaped gateway error text. Please restore the imports and all prior redacted formatting calls, with a regression that feeds credential-shaped error text through a Skills catch path. -
P1 — Carry publisher identity in the authoritative search-result contract and native clients.
SkillsSearchResultSchemaremains a closed object withoutownerHandleatpackages/gateway-protocol/src/schema/agents-models-skills.ts:400-410, even though detail/install now accept it. The web UI works only through a parallel local type.ClawHubSkillSummaryalso still omits the owner and keys rows by bare slug (apps/shared/OpenClawKit/Sources/OpenClawKit/SkillManagement.swift:227-240); macOS sends only the slug for detail (apps/macos/Sources/OpenClaw/GatewayConnection+ClawHubSkills.swift:23-27), and iOS does the same (apps/ios/Sources/Design/SettingsSkillsDestination.swift:518-540). Add optionalownerHandleto the shared search item, regenerate consumers, use qualified row identity, and preserve it through native detail/install while keeping bare-slug compatibility. -
P2 — Key detail ownership by the qualified selection, not slug alone.
loadClawHubDetailacceptsownerHandle, but stores onlyclawhubDetailSlugand considers a response current when only the slug matches (ui/src/lib/skills/index.ts:649-683). If owner A is opened and owner B with the same slug is opened before A resolves, both requests remain current and A can overwrite B. The modal install then reconstructs identity from whichever detail response won (ui/src/pages/skills/view.ts:567-574). Store/compare one{ slug, ownerHandle }selection (or a request token), and add an out-of-order two-owner regression.
Current external contract proof: ClawHub search returned three live imap-smtp-email publishers (gzlicanyi, vthoram, wangchenyu8); bare detail returned HTTP 409 AMBIGUOUS_SKILL_SLUG, while owner-qualified detail for gzlicanyi and wangchenyu8 returned distinct HTTP 200 responses. So the owner is authoritative at search time and must survive every client boundary.
The current lint failure is also patch-related: CI run 30743751039, job 91485725504, reports ui/src/lib/skills/index.ts:764:2: File has too many lines (710). A clean shape is to extract the ClawHub UI types/state/actions into a focused sibling module and make the qualified identity one object instead of adding a suppression. For the real-behavior gate, the smallest safe proof is a real Control UI + real Gateway E2E backed by a local ClawHub HTTP fixture that returns two same-slug publishers and owner-specific 409 install-resolution sentinels; that proves distinct detail/install queries without downloading or installing a skill.
Best-fix verdict: too narrow. Publisher qualification belongs in the shared search-to-detail/install identity contract, with the Control UI as one consumer.
Alternatives considered: an error-time 409 picker adds a redundant round trip after a user already selected an owner; overloading slug with @owner/slug preserves CLI compatibility but duplicates the explicit ownerHandle protocol field. The shared optional field plus a qualified selection object is the cleaner existing seam.
Code read: ui/src/lib/skills/index.ts, ui/src/pages/skills/{skills-page,view}.ts, packages/gateway-protocol/src/schema/agents-models-skills.ts, src/gateway/server-methods/skills.ts, src/infra/clawhub.ts, src/skills/lifecycle/clawhub.ts, and the macOS/iOS/shared Swift Skills clients and tests.
Remaining uncertainty: contributor source was not executed locally under the repository's untrusted-source policy. The verdict is based on exact-head source, current CI, and live read-only ClawHub contract responses.
emma300es
left a comment
There was a problem hiding this comment.
Follow-up on exact head 88ac4f32eaf2: the two new commits restore formatErrorMessage(..., { redact: redactToolDetail }) across the Skills catch paths and bring ui/src/lib/skills/index.ts back under the max-lines gate. Those parts of my prior review are resolved.
The remaining merge blockers are unchanged:
SkillsSearchResultSchemais still a closed result object withscore,slug,displayName,summary,version, andupdatedAt, but noownerHandle(packages/gateway-protocol/src/schema/agents-models-skills.ts:400-410). The PR body says the generated Swift/Kotlin protocols includeownerHandle, but the search-result schema still cannot generate or validate that identity.- Native clients still lose the owner:
ClawHubSkillSummaryhas noownerHandleand uses bareslugasid; macOSskillsDetail/skillsInstallClawHuband iOSClawHubDetailRequeststill send only the slug. - Control UI detail ownership is still keyed only by
clawhubDetailSlug. Two out-of-order requests for owner A and owner B with the same slug both pass the currentness check, so A can overwrite B.
Also, the green Real behavior proof job in run 30768011684 is not runtime proof of this patch. Its log shows checkout of base commit 9b6bda696eab..., then node scripts/github/real-behavior-proof-check.mjs, which reports only External PR includes problem context and evidence. The PR's Evidence section still lists mocked/unit tests and generation commands; it does not show a real Gateway/UI collision path or owner-specific detail/install requests.
Please keep the PR open until the qualified identity is carried by the shared response contract and every active client boundary, the same-slug response race is covered, and the requested non-installing real-Gateway fixture proof is attached.
emma300es
left a comment
There was a problem hiding this comment.
Correction to my exact-head follow-up on 88ac4f32eaf2: I said the two commits brought ui/src/lib/skills/index.ts back under the max-lines gate. That was based on the green dedicated checks-fast-max-lines-ratchet check, but the subsequently completed authoritative lint job proves otherwise.
check-lint job 91550403512 fails at ui/src/lib/skills/index.ts:757:2 with File has too many lines (704). eslint(max-lines). The aggregate openclaw/ci-gate is therefore also failed. Please treat my earlier max-lines statement as withdrawn; the original module-size concern remains unresolved at this head.
This does not change the other outstanding findings: the shared search-result contract/native clients still lose publisher identity, the Control UI response-currentness key still compares only the bare slug, and real after-fix collision proof is still absent.
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer rewrite pushed. Current head: The fix carries publisher-qualified native ClawHub identity through the shared search contract, Control UI selection/detail/install/retry state, Gateway detail/install/deduplication, and the active Apple/Android clients. It also normalizes ClawHub's canonical Proof:
Decision needed before further code: ClawHub has no source-qualified detail/read endpoint for a Current hosted CI has one unrelated timeout in |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: synthclaw <[email protected]>
|
Closing as superseded: this exact fix shipped in #121697 (merged Aug 13), which closes the same issue (#117633). The merged implementation exposes the publisher-qualified reference as The merged contract uses |
Closes #117633
What Problem This Solves
ClawHub allows different publishers to use the same skill slug. The skills clients kept only the bare slug after search, so selecting one publisher could open or install another publisher's skill, or fail with an ambiguous-slug response.
Proposed fix
This PR keeps the selected ClawHub identity as
@owner/slugfrom search through detail and install:skills.searchexposes the publisher handle alongside the slug.@owner/slugreference and reuse it for selection, busy state, detail, and install.skills.detailparses that canonical reference and forwards the owner to ClawHub.The scope deliberately does not add
installRefortrustStateto the shared result. Source-qualifiedskills.shdetail remains a separate product/API decision tracked in the existingskills.sh detail source-qualifiedbacklog item;skills.detailcontinues to reject that source instead of silently collapsing it to a bare slug.The rebuild preserves @synthalorian's original diagnosis and patch direction; the replacement commit includes co-author credit.
Evidence
Before the fix, the focused Gateway regression expected
{ slug: "weather", ownerHandle: "alice" }but received{ slug: "@Alice/weather" }.After the fix:
weather; Alice detail resolves Alice, and Bob install reaches the owner-qualified Bob endpoint. 2 passed in Testbox.SkillManagementTestand the Gateway protocol check passed in Testbox.Proposed Control UI — light
Proposed Control UI — dark