Skip to content

fix: recover marketplace sources and render catalog logos under CSP - #648

Merged
pedronauck merged 4 commits into
mainfrom
fix/issue-644-marketplace-retry-images
Sep 15, 2026
Merged

pedronauck merged 4 commits into
mainfrom
fix/issue-644-marketplace-retry-images

Conversation

@pedronauck

@pedronauck pedronauck commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

What & why

Closes #644. Repository archives use GitHub API media negotiation and accept bounded global PAX metadata. Source warnings name only degraded sources; Retry preserves cached entries and clears warnings on recovery. Shipped logos resolve to bundled assets under the unchanged production CSP.

Authored and integrated by Codex (GPT-6 Astra). No human verification is claimed.

Squash-merged as 5fa857dabd755e6de012660e6c0346361c00ba90. All five PRs (#645–#649) are integrated and verified on main.

How you verified it

Public acquisition passed on 24dfc27: 52 entries plus pinned snapshot. PR CI passed all browser/runtime/desktop E2E but failed Go lint and PAX fixture creation. Main commit 09648e0 preserves all seven unfinished worktree fixes: errcheck/formatting, valid PAX fixture metadata, unique E2E-006 ID and corrected screenshot artifact path. These fixes passed main CI. Main public acquisition also passed all 52 entries and the pinned snapshot. The corrected marketplace screenshot artifact is present; the integration executor inspected partial-failure and recovered desktop states and recovered mobile state, including loaded logos under production CSP. The temporary error toast can still be visible immediately after recovery; per-source stale state and Retry clear correctly. First reviews have no inline defects; documentation/filter warnings have explicit dispositions. React Doctor reported no new PR issues. The full main scan reports 69/100, zero errors and 178 baseline warnings, matching the preceding main scan; a successful workflow status is not zero-warning evidence.

CI-only user override: no local make gate, builds, tests, typechecks or React Doctor runs. Local work is limited to source inspection, formatting and diff checks. Final integrated-main CI passed on e7e4a7e329499a56fa11b364ed453a1e9d5447f7: 26 successful jobs covering Go lint/build/race, frontend lint/types/tests/build, native Windows, real role/Goal integrations, and web/runtime/desktop E2E. PR-title validation is skipped on push; no applicable CI job failed or remained pending.

All available general, inline, outdated and collapsed first-review findings were collected. One consolidated remediation round is authorized; no second review or final-head reapproval is requested. Generic docstring quotas do not override the repository's requirement to comment non-obvious intent rather than repeat identifiers; no reviewer configuration or check is changed.

Final-head marketplace browser artifact passed and was visually inspected: degraded-source cached state, recovery, desktop/mobile layout and logos under production CSP.

Impact

Marketplace error classes and Web warning/logo behavior; public schemas, native IDs, config, hooks, ownership and credentials remain unchanged. Pinning, network policy, extraction limits and CSP are preserved. Marketplace guides, landing QA, cache inputs and change-impact audit co-ship. Official skill remains accurate.

Cross-surface audit: docs/_memory/change-impact.md.


  • make gate passes locally; this PR is delivered only after its required CI checks are green — local execution waived by explicit CI-only user instruction.
  • New or changed behavior is covered by tests, or I explained above why not
  • If an agent wrote or co-wrote this, I named it above and verified the result myself — authorship is named; no human verification is claimed.

@vercel

vercel Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
compozy-site Ready Ready Preview Sep 15, 2026 3:23am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9da2c709-5001-45d4-bdfc-74dea5813a8d

📥 Commits

Reviewing files that changed from the base of the PR and between b7f44a9 and a1bea40.

⛔ Files ignored due to path filters (8)
  • .github/workflows/ci.yml is excluded by !**/*.yml
  • .github/workflows/marketplace-public.yml is excluded by !**/*.yml
  • docs/_memory/change-impact.md is excluded by !**/*.md
  • docs/qa/scenarios/ET-web-marketplace-landing-browse.md is excluded by !**/*.md
  • packages/site/content/docs/marketplace/index.mdx is excluded by !**/*.mdx
  • packages/site/content/docs/marketplace/sources.mdx is excluded by !**/*.mdx
  • turbo.json is excluded by !**/*.json
  • web/e2e/__tests__/marketplace.spec.ts is excluded by !web/e2e/**
📒 Files selected for processing (14)
  • internal/marketplace/pluginsource/acquisition_test.go
  • internal/marketplace/pluginsource/github.go
  • internal/marketplace/pluginsource/reader_integration_test.go
  • internal/marketplace/pluginsource/reader_test.go
  • internal/registry/github/client_test.go
  • internal/registry/github/http.go
  • internal/registry/github/release_selection.go
  • internal/registry/github/repository.go
  • scripts/gate.sh
  • web/src/systems/marketplace/components/__tests__/marketplace-components.test.tsx
  • web/src/systems/marketplace/components/marketplace-entry-logo.tsx
  • web/src/systems/marketplace/components/marketplace-results.tsx
  • web/src/systems/marketplace/hooks/use-marketplace-page.ts
  • web/src/systems/marketplace/lib/marketplace-icon.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review.


Walkthrough

The changes fix GitHub archive media-type handling, classify marketplace source failures, improve retry and stale-source reporting, and restrict marketplace icons to bundled assets or supported data URLs.

Changes

Marketplace acquisition and source diagnostics

Layer / File(s) Summary
GitHub archive requests and source errors
internal/registry/github/..., internal/marketplace/pluginsource/...
GitHub tarball requests now use the JSON media type. Response errors expose HTTP status codes. Marketplace source errors classify HTTP, network-policy, DNS, and TLS failures. Tests cover status handling, safe diagnostics, transport causes, and the opt-in public marketplace integration flow.

Marketplace refresh and stale-source state

Layer / File(s) Summary
Marketplace refresh and stale-source state
web/src/systems/marketplace/hooks/use-marketplace-page.ts, web/src/systems/marketplace/components/marketplace-results.tsx, web/src/systems/marketplace/components/__tests__/marketplace-components.test.tsx
Refresh errors list every failed source and its error class. Stale-state messaging names degraded sources and preserves cached-entry details. Tests cover retry recovery and partial-source failure.

Bundled catalog icon resolution

Layer / File(s) Summary
Bundled catalog icon resolution
web/src/systems/marketplace/lib/marketplace-icon.ts, web/src/systems/marketplace/components/marketplace-entry-logo.tsx, web/src/systems/marketplace/components/__tests__/marketplace-components.test.tsx, scripts/gate.sh
Marketplace icons pass through supported data URLs or resolve from bundled catalog assets. Unsupported remote URLs use the brand fallback. Icon changes enable catalog and web validation lanes.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant MarketplaceUI
  participant refreshCatalog
  participant MarketplaceSources
  participant MarketplaceStaleLine
  MarketplaceUI->>refreshCatalog: request catalog refresh
  refreshCatalog->>MarketplaceSources: refresh all sources
  MarketplaceSources-->>refreshCatalog: source results and error classes
  refreshCatalog-->>MarketplaceUI: combined refresh result
  MarketplaceUI->>MarketplaceStaleLine: render source states
  MarketplaceStaleLine-->>MarketplaceUI: show degraded or recovered state
Loading

Merge Risk: ⚪ Minimal · up to a1bea

The Marketplace recovery and local icon handling changes have no identified unresolved behavior risk and are ready to merge after normal validation.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 14 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive The reviewed changes address the core coding requirements in #644. GitHub archive requests now use the API media type. Error classification preserves safe diagnostics. Refresh handling reports only de… Provide reviewable evidence for the required updates in docs/qa/scenarios/ET-web-marketplace-landing-browse.md, docs/_memory/change-impact.md, packages/site/content/docs/marketplace/index.mdx, and packages/site/content/docs/marketplace/sour…
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changes stay within #644. They modify GitHub request media types, source error classification and recovery, Marketplace warning behavior, catalog icon resolution, related tests, and validation rou…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: marketplace source recovery and catalog logo rendering under CSP.
Full details: Linked Issues check

Explanation

The reviewed changes address the core coding requirements in #644. GitHub archive requests now use the API media type. Error classification preserves safe diagnostics. Refresh handling reports only degraded sources, preserves cached entries, and supports stale-warning recovery. Local icon resolution supports PNG, SVG, and WebP data URIs and bundled assets, while unsupported or missing icons use fallback rendering. Tests cover these paths, and the PR summary reports production-header browser coverage. CSP and outbound security remain unchanged. The required Marketplace QA documentation and cross-surface impact record cannot be verified because the relevant Markdown and MDX paths are excluded from review.

Resolution

Provide reviewable evidence for the required updates in docs/qa/scenarios/ET-web-marketplace-landing-browse.md, docs/_memory/change-impact.md, packages/site/content/docs/marketplace/index.mdx, and packages/site/content/docs/marketplace/sources.mdx, or otherwise confirm those coding-scope requirements are satisfied.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-644-marketplace-retry-images

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 24dfc27.

@greptile-apps

greptile-apps Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR repairs marketplace acquisition and recovery across the GitHub client, archive extraction, diagnostics, and browser UI.

  • Negotiates GitHub's API media type for repository source archives while retaining binary media for release assets.
  • Preserves safe HTTP, DNS, TLS, rate-limit, and outbound-policy failure classifications.
  • Accepts bounded Git global PAX metadata during archive extraction.
  • Names degraded marketplace sources and clears stale warnings after successful recovery.
  • Resolves shipped catalog logos to bundled assets compatible with the production CSP.
  • Adds unit, integration, browser, workflow, documentation, and affected-lane coverage.

Confidence Score: 5/5

The current changes appear safe to merge, with no actionable new defects or outstanding blocking failures identified.

The remediation preserves archive limits and extraction checks, uses the correct GitHub media type, keeps diagnostic details bounded, and restricts browser images to CSP-compatible bundled or inline sources. No accepted new findings remain.

Important Files Changed

Filename Overview
internal/registry/github/repository.go Changes pinned repository archive requests to use GitHub's required API media type.
internal/registry/github/http.go Keeps binary release assets and repository source archives on their respective media types.
internal/marketplace/pluginsource/github.go Maps transport and upstream failures to safe source-level diagnostic classes.
internal/registry/extract.go Allows consumed Git global PAX metadata without weakening decompressed-size or filesystem-entry protections.
web/src/systems/marketplace/lib/marketplace-icon.ts Resolves exact published catalog icon URLs to bundled assets and admits supported inline images only.
web/src/systems/marketplace/components/marketplace-results.tsx Attributes stale-catalog warnings and cached timestamps to degraded sources.
web/src/systems/marketplace/hooks/use-marketplace-page.ts Reports every failed source returned by refresh rather than only the first.
.github/workflows/marketplace-public.yml Adds an opt-in integration lane that exercises public document and pinned-snapshot acquisition.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Feed[Marketplace source] --> Fetch[Fetch document]
  Fetch --> Pin[Resolve pinned commit]
  Pin --> Archive[Request GitHub archive<br/>API media type]
  Archive --> Extract[Bounded archive extraction<br/>consume global PAX metadata]
  Extract --> Catalog[Authoritative catalog projection]
  Catalog --> Web[Marketplace UI]
  Web --> Status[Degraded-source warning and Retry]
  Web --> Icons[Bundled CSP-compatible logos]
  Status --> Fetch
Loading

Reviews (2): Last reviewed commit: "fix: consume Git archive metadata and ad..." | Re-trigger Greptile

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 15, 2026
@pedronauck

Copy link
Copy Markdown
Member Author

First-review dispositions

Collected all REST pages of reviews, inline comments and general comments, plus GraphQL review threads. Both reviewers completed coverage of a1bea406aa9323fb30ebd288368e2671df098272; there were no inline threads or formal-review findings. React Doctor completed with 100/100 and zero errors/warnings (run).

  • CodeRabbit comment 5674102727, Docstring Coverage warning: addressed the useful documentation request in 24dfc271c. Touched production entry points now explain safe diagnostics, API/archive negotiation, CSP resolution and source-specific stale state. Existing DownloadRevision and useMarketplacePage documentation remains in place. Test names and assertions own test intent; no generated boilerplate was added to inflate the bot's aggregate percentage. No second scoring/review run is requested.
  • Same comment, Linked Issues inconclusive because Markdown/MDX are excluded by repository review filters: the files are present in this PR: QA scenario, cross-surface audit, Marketplace guide, and source guide. They cover source recovery, diagnostic safety, bundled icon support, compatibility and the actual production-header browser journey. New CI evidence is explicitly pending until the corrected run finishes; historical QA status is not claimed as new verification.
  • Greptile comment 5674138652: completed review, no actionable findings.
  • React Doctor comment 5674117394: no new issues.

The real public-source CI probe additionally exposed Git global PAX metadata rejection after HTTP 415 was fixed. 24dfc271c corrects that production failure and adds canonical extraction coverage for successful metadata consumption and its byte budget. Current-head CI is in progress. This is the single consolidated first-review remediation round; final remediation commits are not claimed as reviewed, and no second review/reapproval is requested.

@pedronauck

Copy link
Copy Markdown
Member Author

Consolidated integration disposition

Squash merge: 5fa857dabd755e6de012660e6c0346361c00ba90. Integrated main: e7e4a7e329499a56fa11b364ed453a1e9d5447f7.

All seven unfinished worktree fixes were preserved in main repair 09648e0: errcheck/formatting, valid global PAX fixture metadata, unique E2E ID and corrected evidence upload glob. The source worktree remains unchanged with diff SHA256 0ae7b09d4044cc4a5a4d8a20a19c988dfb7dbe1d81fefa8852729020f838a8f9. The old lint and fixture failures were repaired without weakening assertions. First reviews produced no inline defects; generic documentation/filter notices have explicit dispositions. The public 52-entry acquisition and pinned-snapshot probe passed on 09648e0; registry and marketplace acquisition code is byte-identical at the final integration head.

All pages of general/inline reviews and review threads, including outdated and collapsed material, were collected. Existing test owners were retained. Blanket docstring quotas and invitations to change reviewer filters do not override repository conventions and were not treated as production defects. No reviewer configuration, branch protection or published main history was rewritten.

Validation: integrated-main CI — passed: 26 successful jobs, with only the PR-title job skipped because this is a main push. Heavy verification ran only in GitHub CI under the explicit user override. Authorship and verification are agent-based, not human approval.

React Doctor on integrated main: 69/100, zero errors, 178 baseline warnings, unchanged from preceding main. PR-diff analyses reported no new issues; this is not a zero-warning full scan.

Final-head marketplace browser artifact passed and was visually inspected: degraded-source cached state, recovery, desktop/mobile layout and logos under production CSP.

This branch was successfully deployed

1 active deployment
Preview — 24dfc271 Deployed Sep 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marketplace Retry stays degraded and catalog images violate the production CSP

1 participant