Repository navigation
fix: install or review the publisher you picked when ClawHub skills share a slug - #121697
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
d4b33b5 to
f429fc9
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 12, 2026, 2:02 AM ET / 06:02 UTC. ClawSweeper reviewWhat this changesThe PR adds a publisher-qualified ClawHub skill reference to search results and carries it through Gateway, CLI, web, Android, iOS, and macOS detail/install actions. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessThis remains a necessary fix: current main still loses publisher identity between ClawHub search and detail. No concrete patch defect was found in the available evidence, but exact-head blob inspection is blocked by promisor/DNS failure and iOS CI was still running. Priority: P1 Review scores
Verification
How this fits togetherClawHub search results flow through OpenClaw infrastructure and the Gateway protocol into skill browsers. A selected result then returns to Gateway for detail lookup or installation. flowchart LR
A[ClawHub search] --> B[OpenClaw infrastructure]
B --> C[Gateway search response]
C --> D[CLI and skill browsers]
D --> E[Qualified skill reference]
E --> F[Skill detail]
E --> G[Skill install]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +204, Tests +177, Generated 0, Other +59. Total +440 across 45 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. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one producer-recorded reference as the selection identity across every client; the remaining positive LOC is warranted only by those distinct client state paths, with the CLI derivation removed. Do we have a high-confidence way to reproduce the issue? Yes—current main returns bare search slugs at src/infra/clawhub-skills.ts:201 and forwards that bare value at src/gateway/server-methods/skills.ts:301, so same-slug publishers cannot remain distinct. Is this the best way to solve the issue? Yes—the producer-owned reference and existing parser are preferable to each client rebuilding publisher identity from separate fields. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6752f8b4f133. 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
HistoryReview history (16 earlier review cycles; latest 8 shown)
|
f429fc9 to
0dab0fd
Compare
2a94b8a to
5b54757
Compare
5b54757 to
8107967
Compare
8107967 to
d8cdb51
Compare
e8f9627 to
520d1f6
Compare
ClawHub search returns one entry per publisher, so several results can share a slug. Every client collapsed the selection to that bare slug before calling skills.detail and skills.install, and ClawHub answered 409 AMBIGUOUS_SKILL_SLUG with no in-product way forward. searchClawHubSkills now records the publisher-qualified reference once, on the result that carries it, and the Gateway protocol documents it. skills.detail parses the same reference grammar skills.install already accepted, so review and install cannot resolve to different publishers. Control UI carries that one reference through row actions, detail, busy state, and acknowledgement retries, and shows it so otherwise identical rows are distinguishable. Fixes #117633
…wsers macOS, iOS, and Android read the qualified reference from search results and use it for skills.detail, install, busy state, installed matching, and list identity, so two publishers sharing a slug stay distinct instead of collapsing into one ambiguous request.
… same-slug skill ClawHub has no source-qualified read endpoint, so a skills-sh reference parsed down to its bare slug would have returned a registry skill's card while install resolved the external artifact. Review and install could name different skills. skills.detail now fails closed on any reference that carries a source, and the macOS and AgentPro rows show the publisher reference next to the summary instead of only when a summary is missing, so same-slug rows stay distinguishable.
installRef is the one reference clients send back, and no client reads the publisher handle separately, so the protocol and Control UI carry one field instead of two.
Clients that gate install behind a successful review would otherwise see only a refusal, so the error names the direct install path and the CLI equivalent.
swift-format's docComments rule requires doc comments on declarations; the subtitle property carried a regular comment and failed macos-swift.
Forwarding installRef let clients install the exact publisher the operator picked, including external skills-sh sources. It did not forward the trust state that says ClawHub never scanned that source, so iOS AgentPro — the one surface that installs in a single tap with no review step — could install an unscanned artifact with nothing on screen saying so. The CLI already labels these (docs/clawhub/cli.md, docs/cli/skills.md); native clients could not, because trustState was never on the wire. trustState becomes an optional field on SkillsSearchResultSchema. It is purely additive: older clients ignore an unknown key and the field is absent for registry results, so downgraded readers are unaffected and no protocol version moves. Every client that renders a search row now shows "Not scanned by ClawHub", matching the CLI wording exactly: iOS AgentPro in the row above the install button, macOS and Android beside the review action, and Control UI on the row that explains why review is refused for these sources. Covered by a wire assertion that the state reaches clients for an external source and stays absent for registry rows, plus decode-and-label tests on the shared Swift kit and the Android parser, and a Control UI render assertion.
Refusing detail for an external source made an error-only dialog reachable. The shared preview panel reserves a tall reader height for skill documents, so a two-line refusal rendered in a mostly empty dialog and read as broken rather than deliberate. Found by inspecting the review captures.
Maintainer product decision: skills.sh runs its own scanners, so OpenClaw does not add a second alert layer in the apps. Removes the label from Control UI, iOS, macOS and Android, and drops the trustState wire field that nothing would render. The CLI keeps its existing label; changing that is a separate call. Publisher identity, the fail-closed detail refusal, and the message-only dialog are unchanged. Splits the oversized skills view test file to satisfy max-lines without a suppression.
520d1f6 to
7ba2614
Compare
|
Maintainer landing review on repaired head
No actionable finding remains. |
|
Merged via squash.
|
Closes #117633
Related: #117681
Credit: @synthalorian reported and first fixed this in #117681. This branch is a maintainer replacement rewritten on current
main(see "Relationship to #117681" below); the diagnosis and the acknowledgement/dedup identity insight are theirs.What Problem This Solves
Fixes an issue where an operator searching ClawHub for a skill whose slug is published by more than one person could neither review nor install any of them. Control UI, the macOS and iOS skill browsers, and the Android skills screen all showed several identical-looking rows, then sent only the bare slug to the Gateway. ClawHub correctly answered
409 AMBIGUOUS_SKILL_SLUG, so every row dead-ended with no in-product way forward. The CLI already worked, becauseopenclaw skills install @owner/slugcarries the publisher.Live registry today, three publishers share
imap-smtp-email:Why This Change Was Made
The publisher was never missing — it was discarded.
/api/v1/searchreturnsownerHandleper result, and the Gateway already forwards it, but nothing recorded the reference that identifies the result, so the CLI rebuilt@owner/sluginline and every other client dropped it.This change records that fact once, at the producer, and reads it everywhere:
searchClawHubSkillssetsinstallRefon every result: the registry-supplied external reference when present, otherwise@ownerHandle/slug. The CLI now reads that field instead of deriving its own (net -8 production lines there).SkillsSearchResultSchemadeclaresinstallRefandicon, which the server already sends. Additive only; no protocol version bump.skills.detailparses the same reference grammarskills.installhas always accepted (parseRequestedClawHubSkillRef). Detail and install therefore take one identical string, so a client cannot review one publisher and install another. No new request field on either method.Deliberately out of scope: ClawHub exposes no source-qualified detail endpoint for
skills-sh:references. That behavior is unchanged here (askills-sh:result still reads detail by bare slug, exactly as onmain), and it needs a product decision rather than a guess. See "Follow-ups".User Impact
Same-slug ClawHub results are now distinguishable and individually reviewable and installable from Control UI and all three native clients. Selecting the second publisher reviews and installs the second publisher. Nothing about the single-publisher path changes.
Before / after — Control UI, same-slug search (light)
Re-shot on the current head, after the trust label was reverted (see "Trust label: owner decision" below). The "after" frames include an external
skills-sh:result, which is now shown by reference only, like every other row.Before / after (dark)
After — reviewing the second publisher
Clicking the second row opens that publisher's card (
By wangchenyu8 (@wangchenyu8)), and its install button installs that publisher.After — review is refused for an external source, with a next step
Opening an external
skills-sh:row refuses review rather than showing a different publisher's card, and the message names the exact command that does work.Capturing this is what surfaced the dialog-sizing fix: the refusal first rendered inside the tall reader panel meant for skill documents, leaving a mostly empty dialog that read as broken. It now sizes to the message.
The refusal dialog is still ugly, and that is a known, owned decision. The maintainer's verdict on this screen was blunt, and the redesign is an approved follow-up rather than something this PR attempts: install-only is information, not an error, so it should not be a red error callout, and it should offer an Install action directly instead of telling the operator to go run a CLI command. Logged in the fleet backlog; not in scope here.
Native gap, stated honestly. iOS, macOS and Android carry the same identity fix, but I cannot exercise those simulators here, so they have no captures. Their evidence is the decode tests on the shared Swift kit and the Android parser.
Evidence
Live ClawHub, 2026-08-10 —
GET /api/v1/search?q=imap-smtp-emailreturns three entries sharingslug: "imap-smtp-email"with distinct top-levelownerHandle(gzlicanyi,vthoram,wangchenyu8). Bare detail returns409;?ownerHandle=gzlicanyireturns200.Real-behavior proof — Control UI + mocked Gateway, headless Chromium. Same scenario driven against the pre-fix and post-fix Control UI bundles, recording the actual
skills.detailrequest the browser sent after clicking the second result:Screenshots above are from that run (capture harness was temporary and is not part of the diff).
Boundary regression —
src/gateway/server-methods/skills.publisher-identity.test.tsfakes only the HTTP layer; search, both Gateway handlers, and the detail client are real. It proves same-slug results get distinctinstallRefs, that each selected reference produces an outbound?ownerHandle=<publisher>on the real ClawHub URL, that a bare slug still surfaces the ambiguity error rather than silently picking a publisher, that a source-qualifiedskills-sh:reference is refused without any outbound read, and that install forwards the reference unchanged.Focused suites, all green:
Checks run locally:
tsgocore / UI / core-test,oxfmt,scripts/run-oxlint.mjson every changed TS file,protocol:gen+protocol-gen-swift+protocol-gen-kotlin(generated Swift/Kotlin unchanged),check-protocol-since,check-protocol-registry,native-app-i18n baseline+verify,git diff --check,swift build --package-path apps/shared/OpenClawKit(clean).Sequential review passes: clean; no accepted/actionable findings reported.
LOC (excluding the two regenerated baselines, which are line-neutral at 94/94 and 18/18): production +171 / −88 = net +83 across the Gateway protocol, ClawHub infra, the Gateway handler, the CLI (net −8), Control UI, and four native surfaces; tests net +261. The growth is the identity contract itself — one recorded reference field, one reference-parsing boundary, one fail-closed branch — plus the per-client reads of that single field.
Plugin SDK API baseline
The third commit regenerates
docs/.generated/plugin-sdk-api-baseline.jsonl. Every one of the 18 changed records is closure-hash-only — thedeclarationtext is byte-identical before and after (verified by diffing(entrypoint, exportName, declaration)tuples, which come back empty). The hashes move because the additive skills protocol fields enter the transitive type closure ofmeeting-runtime,provider-catalog-runtime,agent-harness,channel-message,channel-outbound,gateway-runtime, andinbound-reply-dispatch. No plugin SDK export changed shape. This is the regeneration the check itself prescribes for an intentional surface change, not a silenced baseline.CI status on this head (
81079674a93)Rebased onto
39b9d7b1a16, which healed twomain-owned breakages this branch had been inheriting:src/plugins/worker-provider-registry.tspulled the fullOpenClawConfiggraph back into the plugins layer (aconfig↔pluginsmadge cycle, failingcheck-additional-runtime-topology-architecture), andsrc/gateway/server-methods/approval.tswas pushed unformatted (failingcheck-lint). Neither file is in this diff; both were fixed onmainrather than absorbed here.Earlier CI attribution, kept for the record
Superseded: CI status on head
0dab0fd606997 of 100 checks green. Three red, and all three are already red on
mainat55afad26c07— the exact commit this branch is rebased onto:main@55afad26c07check-lintsrc/gateway/server-methods/setup-admission.ts:32:12 Type parameter T is used only once in the function signature. typescript(no-unnecessary-type-parameters)checks-node-compact-large-6src/gateway/server-methods/system-agent.test.ts:435openclaw.setup > runs the selected provider method in a shared wizard session and commits its configopenclaw/ci-gateNeither file is in this diff. Both need a
main-side fix; this branch does not touch or depend on either.An earlier push of this branch was based on an older, red
mainand showed six additional failures (check-plugin-sdk-api-baseline,checks-ui,checks-ui-e2e3/4 and 4/4,checks-node-compact-small-2,small-9). The rebase onto55afad26c07plus the baseline commit cleared all six.ClawSweeper review response
Review of
f429fc9a561. Every actionable finding is applied.src/gateway/server-methods/skills.ts)skills-sh:reference the parser yields a bare slug with no owner, so detail would have read a same-slug registry skill while install resolved the external artifact.skills.detailnow fails closed on any reference carrying a source (INVALID_REQUEST, no outbound request at all) instead of answering with a different skill. Pinned byrefuses external-source detail instead of reading a same-slug registry skill. Correction (see "Trust label: owner decision" below): the "no shipped path could reach it" claim was wrong and is retracted.src/cli/skills-cli.tsreadsinstallRefandtrustStateoff the same search entry, which proves ClawHub search can return askills-sh:installRef. The seam was fail-open and is now fail-closed.AgentProTab+Skills.swift)summarywas nil, so same-slug rows on a direct-install surface stayed identical. Now rendered assummary · reference.ClawHubSkillsBrowser.swift)subtitleproperty.searchClawHubSkillsrecordsinstallRefonce, server-side, and every client reads that one field — and the pre-land audit tightened it further by droppingownerHandlefrom the search-result contract entirely: no client read it, so the wire and Control UI now carry one reference field instead of two. The remaining per-clientinstallRef ?? slugis a single-expression compatibility read for gateways older than this contract, not a second identity derivation; no client rebuilds@owner/slugitself, and the CLI's own inline derivation was deleted.skills-sh:rows?Relationship to #117681
@synthalorian diagnosed this correctly and #117681 got the core idea right. It is not rebaseable now: its largest hunk edits
src/infra/clawhub.ts, which #121565 deleted when it split ClawHub infrastructure, and the search normalization it added is superseded by whatmainalready does. Three substantive issues also had to change shape rather than be patched:ownerHandleas a second identity encoding onskills.install, next to the reference stringinstallSkillFromClawHubhas always parsed. Two ways to say the same thing.slug: "@alice/weather"andownerHandle: "alice", so the lease reference became@alice/@alice/weather— a key no other caller (CLI, tracked updates) would ever match. Concurrent installs of the same skill would stop coordinating.clawHubDetailParamsdroppedinstallRefwhileclawHubInstallParamskept it, so an external result could be reviewed as one skill and installed as another (ClawSweeper P1 / security-boundary finding on that PR). Sending one identical reference to both methods removes that divergence structurally rather than by patching the helper.Follow-ups (not in this PR)
skills-sh:detail is a product decision. ClawHub has no source-qualified read endpoint for external references. This PR makes the interim behavior safe but blunt: review is refused with an explicit reason, so external sources are install-only. The maintainer has ruled out an app-side trust label. What remains open is the install-only UX itself — the dialog redesign below — or extending the ClawHub detail contract.AgentProTab+Skills.swift): no detail review, no version pin, no risk acknowledgement. It now sends the right publisher, but it is duplicate policy that should probably route through the Settings surface.Trust label: owner decision
A ClawSweeper review of
7edc2392a09raised a P1 asking maintainers to choose the external-source policy before this could be finalized. That decision has been made, and it went against adding a label.Decision. OpenClaw does not add a trust-label layer for
skills-sh:results in its apps. skills.sh runs its own scanners, and the maintainer's position is that we trust them rather than stacking a second OpenClaw-side alert on top. This is product judgment, not a technical rebuttal of the finding.What that reverted. An earlier revision of this PR added a "Not scanned by ClawHub" label to Control UI, iOS, macOS and Android, plus a
trustStatefield onSkillsSearchResultSchemato carry it. All of that is reverted. The wire field went with it: with nothing rendering it, keeping it would have left an undeclared, unused field on the protocol.What did not change.
trustStateon the infra search type predates this PR and is untouched; the Gateway forwarded it before this PR and still does, so wire behavior matches what shipped. The CLI's existing label reads from infra in-process and never through the Gateway schema, so removing the schema field does not affect it.What still protects this path. Publisher identity is a single search-produced reference, so review and install can no longer diverge across same-slug publishers, and
skills.detailstill fails closed for source-qualified external references with an actionable message. External results stay reachable through an explicit install path rather than a silently-wrong review card.Unrelated breakage folded in
checks-ui-e2e (4/4)failed onsession-management.archive.e2e.test.tsfor a reason unrelated to this PR. #121625 made session switching keep the previous pane warm, so two.agent-chat__input textareaelements are mounted after a switch and an unscoped strict locator resolves to both. That PR's own "scope retained session assertions" pass scoped part of this file — line 338 already usesopenclaw-chat-pane[aria-hidden="false"]— but missed the deleted-session recovery test.Scoped those locators to the visible pane using the pattern already present in the file, per the root
AGENTS.mdrule that unrelated breakage blocking the merge gate is fixed in the landing PR. Tests only, no production change, kept as its own commit so it is droppable if a heal lands onmainfirst.Landing onto red main
The first exact-head run failed in
ui/src/pages/chat/chat-pane-task-suggestions.test.ts. A cleanmaincheckout at4401ff2a923reproduced the same failure under the full UI suite on Blacksmith Testbox: the test mocked../../lib/clipboard.ts, but the UI suite deliberately usesisolate: false, so a previously cached production module could retain the real clipboard binding while the test asserted against a different mock.The repair is test-only and kept in its own commit: it exercises the real clipboard boundary by stubbing
navigator.clipboard.writeTextand thedocument.execCommandfallback, then asserts the visible pane error path. Production LOC delta: zero.Remote proof:
main@4401ff2a923:pnpm --dir ui test --maxWorkers 3reproduced the failure (run)oxfmt --checkpassed (run)Landing repair superseded by main
The test-only clipboard isolation repair described above was required for the earlier landing head, but it is not present on the current head. Main subsequently merged #122451, which repairs the same shared-suite isolation failure more completely; the redundant local commit was dropped during the final rebase. The prior remote reproduction and repair runs remain provenance for the red-main diagnosis. Current exact-head CI is the landing gate.
Current per-module SDK baseline
The current head uses the per-module baseline format introduced by #121842. The earlier
plugin-sdk-api-baseline.jsonlwording above describes superseded heads. On the final transplant, 17 module records underdocs/.generated/plugin-sdk-api-baseline/were regenerated and checked remotely; the generated delta is line-neutral.