Repository navigation
feat(availability): a curation hold decides without cached metadata where the proxy refuses from the path - #480
Merged
M0Rf30 merged 1 commit intoNov 13, 2026
Conversation
…here the proxy refuses from the path The batch answered unknown for a version of a package the proxy had not fetched, also when a curation rule hides it. For the formats that refuse a curated download from the request path, before they know the upstream has the version (composer and pypi in their own Serve, the formats with Hooks.Coordinates in Service.Serve), the 403 does not depend on the metadata. proxy.CuratesFromPath reports those formats (new Hooks.CurationFromPath for composer and pypi), and the batch decides such a version as held at that proxy without reading the cache; in a group the refusal decides even when a later member has the version. npm, helm and the other formats apply their rules once the version is found, so they stay unknown. Refs openartifact#471. Co-Authored-By: Claude Fable 5.2 <[email protected]>
M0Rf30
pushed a commit
that referenced
this pull request
Nov 13, 2026
…ndency in (#483) * feat(cli): oa check --fetch warms the proxies; show what pulls a dependency in On a fresh proxy every answer is unknown until the package manager has fetched each package once. --fetch requests each distinct package's metadata through the repository first (composer p2 documents, npm packuments), at most 8 at a time, so the proxies behind it, also through a group, fetch and cache it; a request that does not answer 200 is counted and reported, not fatal. The lockfile parsers record which locked packages require each dependency (composer "require", npm dependencies/optional/peer of the packages map with aliases resolved, lockfileVersion 1 "requires"). The table gets a REQUIRED BY column ((direct) when only the project requires it) and --format json a required_by list. The availability request now carries only package and version. The upgrade notes get a new Unreleased section: the #480 note had landed under 0.24.0, which it is not part of. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(cli): oa check review: "-" instead of (direct), --fetch warms ~dev documents - REQUIRED BY shows "-" when no locked package requires a dependency. A lockfile does not record the project's own requirements, so "(direct)" claimed more than it knows; the help and docs say a dependency listed with requirers may be direct as well. - --fetch requests p2/<name>~dev.json for a locked Composer branch (dev-main, 1.x-dev), the document that lists it, so it no longer stays unknown after warming. - npmV1 has its doc comment back; it had merged into npmV1Requirers'. - Tests: the request body is decoded and its keys checked instead of a substring match, the REQUIRED BY cell is read by column, and metadataPath has its own table test. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Areef <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up from the #473 review ("Curation hold on an uncached package: do it in a follow-up").
Problem
POST /availabilityansweredunknownfor a version of a package the proxy had never fetched, even when a curation rule hides it. For example,evil/backdoor 1.0.0against a proxy that blocksevil/*.What serving does
Formats check curation at two different points, and that decides what the batch may claim:
serveComposerDist), pypi (servePyPIFile), and the formats gated inService.ServethroughHooks.Coordinates(apk, conan, deb, ivy, maven, pacman, rpm, sbt). These answer403whether or not the upstream has the version.findNPMRelease), helm (findHelmFile) and the rest. A version the metadata doesn't list is a404, so for an uncached package nothing can be said.Change
Hooks.CurationFromPath: a new flag, set for composer and pypi, with a comment on what it promises.proxy.CuratesFromPath(format): true for those two and for any format withCoordinates. It's a hooks fact, not a list of format names.heldat that member, decided before the cached metadata is read. In a group this follows serving: the member's403ends the request even when a later member has the version. A later member's rule doesn't reach a version an earlier member serves.unknownfor an uncached package.One visible side effect: for these formats a curated version no longer carries
published_at, andmin_ageisunknownwhen the repository has a minimum age (offotherwise). That's because the cache isn't read; the reason andrule_idare unchanged. I can read the cache opportunistically to keeppublished_atif you prefer.Tests
403with the reason; neither the upstream nor the dist host is contacted.TestCuratesFromPathFormatspins the list of formats, so moving a format's curation check changes a test.held;held;unknown;evil/backdoor 1.0.0is nowheld("known malicious vendor"); it wasunknown. A never-fetched package without a rule staysunknown.Checks
golangci-lint run ./...passes.go test -short -racepasses forinternal/{api,proxy,mcp}.make docs-checkandmake deadcodepass; the-tags noai,nomcpbuild passes;vue-tsc --noEmitpasses.Docs:
hosted-proxy-group.md("Check many versions at once"), the OpenAPI description of the POST, and an Unreleased upgrade note.🤖 Generated with Claude Code