Skip to content

Preserve redirect-policy failures during community catalog fallback - #3

Closed
markuswondrak with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-review-issue-4504
Closed

markuswondrak with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-review-issue-4504

Conversation

Copilot AI commented Sep 16, 2026

Copy link
Copy Markdown

Built-in community catalog fetches could mask unsafe redirects as transient failures. The fallback now distinguishes security-policy failures from unavailable remote catalog responses.

  • Redirect policy

    • Add RedirectPolicyError, retaining URLError compatibility.
    • Mark malformed and unsafe redirects with this exception.
  • Community catalog fallback

    • Preserve redirect-policy errors as hard BundlerErrors.
    • Fall back to the packaged snapshot for transport errors and HTTP 408, 429, and 5xx responses.
  • Coverage

    • Add regression tests for transient-response fallback, transport failures, and redirect-policy propagation.
except RedirectPolicyError as exc:
    raise BundlerError(...) from exc
except urllib.error.HTTPError as exc:
    if exc.code in (408, 429) or exc.code >= 500:
        raise _CatalogUnavailable() from exc

Co-authored-by: markuswondrak <245696895+markuswondrak@users.noreply.github.com>
@markuswondrak

Copy link
Copy Markdown
Owner

Closing as redundant: this fix was ported onto the feature branch and is now part of github#4504 (commit f1bd4e3). It was originally branched from the stale fork main instead of feat/4495-firstparty-bugfix-assess-bundles, so it never reached that PR.

Posted on behalf of @markuswondrak by opencode (model: deepseek-v4.1-flash, autonomous).

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.

2 participants