Add hosted catalog source profile validation#95969
Conversation
e8762f2 to
623a159
Compare
9464bb1 to
7ab496e
Compare
21ef7fb to
ceef5a5
Compare
c371b39 to
f261e76
Compare
ceef5a5 to
30fbce9
Compare
|
Codex review: needs maintainer review before merge. Reviewed June 27, 2026, 11:52 PM ET / 03:52 UTC. Summary PR surface: Source +378, Tests +585. Total +963 across 2 files. Reproducibility: not applicable. this is a feature and trust-boundary PR, not a bug report. The behavior is source-reviewable, covered by focused tests, and demonstrated by current-head live output in the PR body. Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land only after maintainers accept the source-profile and hosted-feed trust vocabulary, keeping later config and CLI activation in separate reviewed slices. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature and trust-boundary PR, not a bug report. The behavior is source-reviewable, covered by focused tests, and demonstrated by current-head live output in the PR body. Is this the best way to solve the issue? Yes, with maintainer acceptance: the catalog loader is the right owner for sourceRef validation before later marketplace activation, and the direct URL override remains constrained to the public ClawHub allowlist. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 830467bc9306. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +378, Tests +585. Total +963 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
3032d05 to
c3348ec
Compare
|
@clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
8bb652b to
4cbec6c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
4cbec6c to
453680c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
453680c to
6dc6ca1
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
Merged via squash.
Thanks @giodl73-repo! |
Summary
This PR restacks the hosted catalog source-profile slice on top of the merged persistent snapshot work in #95964.
It adds local source-profile validation for hosted catalog entries:
clawhub-publicfeed profile tohttps://clawhub.ai/v1/feeds/pluginsfeedUrloverrides constrained to the public hosted-feed allowlist (clawhub.ai)sourceRefis missing or unknown to local source profilessourceRef: public-clawhubsha256:<hex>candidate integrity to SRI for the ClawHub install path without attaching that artifact hash to an npm fallbackstate: availableorpublisher.trust: officialsourceReffor custom/overridden feed profiles even when top-level candidates are presentStack context
Merged predecessors:
This PR is the next source-profile/trust validation layer. Later marketplace/config PRs must opt into any search/startup/marketplace consumption explicitly.
Boundary
Persisted hosted feed bodies remain inert cache material until this and later PRs explicitly validate source profiles and feed trust rules. This PR validates local source profiles and trusted ClawHub install candidates, but does not add broader marketplace refresh/search/startup activation.
Validation
Local validation on restacked head
6dc6ca154c7f0000a6961a347a2d572a2493b8a6:pnpm exec oxfmt --check src/plugins/official-external-plugin-catalog.ts src/plugins/official-external-plugin-catalog.test.tspnpm exec oxlint --deny-warnings src/plugins/official-external-plugin-catalog.ts src/plugins/official-external-plugin-catalog.test.tsCI=1 node scripts/test-projects.mjs src/plugins/official-external-plugin-catalog.test.ts(44 tests)pnpm tsgo:coregit diff --check origin/main...HEADcodex review --base origin/mainon6dc6ca154c7f0000a6961a347a2d572a2493b8a6(no high-confidence correctness issues)Review-driven fixes in this closeout:
8bb652b2e5: fail closed on missingstate: available/publisher.trust: officialand fix CI lint URL assertions.4cbec6c7f5: avoid routing ClawHub artifact hashes into npm fallback integrity by no longer emittingnpmSpecfor ClawHub-source candidates.453680c88d: validate manifest installsourceRefeven when top-level candidates are present.6dc6ca154c: keep direct feed URL overrides constrained toclawhub.ai.Real behavior proof
Behavior or issue addressed:
Hosted ClawHub feed entries are accepted only through configured local source profiles, and trusted
public-clawhubcandidates normalize live ClawHubsha256:<hex>integrity values into SRI install integrity without an npm fallback sharing that artifact hash.Real environment tested:
Windows source harness in
C:\src\openclaw-prflow\.worktrees\pr-95969at head6dc6ca154c7f0000a6961a347a2d572a2493b8a6, using the live ClawHub feed athttps://clawhub.ai/v1/feeds/pluginswith no mocked feed body.Exact steps or command run after this patch:
node --import tsx -from the PR worktree.loadHostedOfficialExternalPluginCatalogEntries({ snapshotStore: null })and inspected resolved install metadata withresolveOfficialExternalPluginInstall(entry).Evidence after fix:
{ "url": "https://clawhub.ai/v1/feeds/plugins", "source": "hosted", "entryCount": 59, "feed": { "id": "clawhub-official", "schemaVersion": 1, "sequence": 17, "generatedAt": "2026-06-28T01:24:39.896Z" }, "metadata": { "url": "https://clawhub.ai/v1/feeds/plugins", "status": 200, "etag": "\"sha256:ba687b54daeb2ed65e3f963e5be86214bd0421be6d19cbc76595d36374911a5d-gzip\"", "lastModified": "Sun, 28 Jun 2026 01:24:46 GMT", "checksum": "sha256:ba687b54daeb2ed65e3f963e5be86214bd0421be6d19cbc76595d36374911a5d" }, "installableSample": [ { "id": "@expediagroup/expedia-openclaw", "sourceRefs": ["public-clawhub"], "install": { "clawhubSpec": "clawhub:@expediagroup/[email protected]", "defaultChoice": "clawhub", "expectedIntegrity": "sha256-s1XdoEQDvsqri7qwaf0eewV4Ji50WeWYzFsZYVtb2rk=" } } ], "unknownSourceEntryCount": 0 }Observed result after fix:
The live hosted feed loaded as
hosted, returned 59 entries, preserved theclawhub-officialfeed metadata, exposed trustedpublic-clawhubinstall candidates as ClawHub installs, normalized the live ClawHub checksum to SRI for the ClawHub install path without emitting an npm fallback for that artifact hash, and did not retain entries with unknown source refs.What was not tested:
No end-user marketplace UI or startup activation path was tested; this PR is limited to source-profile validation and catalog install metadata resolution.