-
Notifications
You must be signed in to change notification settings - Fork 236
bug: apm marketplace check resolves sourceBase entries against github.com (exit 128) #1762
Copy link
Copy link
Open
Labels
area/marketplacemarketplace.json schema, federation, authoring suite, source parity.marketplace.json schema, federation, authoring suite, source parity.priority/highShips in current or next milestoneShips in current or next milestonestatus/in-flightA PR is open and progressing.A PR is open and progressing.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/bugSomething does not work as documented.Something does not work as documented.
Metadata
Metadata
Assignees
Labels
area/marketplacemarketplace.json schema, federation, authoring suite, source parity.marketplace.json schema, federation, authoring suite, source parity.priority/highShips in current or next milestoneShips in current or next milestonestatus/in-flightA PR is open and progressing.A PR is open and progressing.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/bugSomething does not work as documented.Something does not work as documented.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
In Progress
Summary
After #1736 (closes #1519) added
marketplace.sourceBase,apm packresolves a relative package source against the declared base correctly — butapm marketplace checkdoes not. For any entry whose effective host isn't the default (asourceBase-composed relative source, or the pre-existing #1288host.tld/owner/reposhorthand),checkrunsgit ls-remoteagainstgithub.comwith no token and fails with exit 128, even thoughpackagainst the sameapm.ymlsucceeds.apm marketplace checkis the CI gate the publishing guide recommends, so this blockssourceBaseauthors — the feature's headline audience — from validating their marketplace in CI.Environment
Agent Package Manager (APM) CLImain(0.20.0 line).check.pyis unchanged since the feat(marketplace): add sourceBase for package sources #1736 merge (6fa133fd) through the current tip, so this reproduces on latestmain.Reproduction
Deterministic confirmation of where
checkpoints (no network needed):Root cause
src/apm_cli/commands/marketplace/check.py:#1736 composes
sourceBaseat build time (MarketplaceBuilder._remote_source_coordinates), so the parsedPackageEntrykeepshost=Noneand the relativesource.checknever goes through the builder, so it neither composes the base nor selects a per-host token — it just probesgithub.com.packworks only because composition + the per-host resolver live on the builder path thatcheckdoesn't share.This was flagged on #1736 before merge but the routing fix didn't land with it.
Fix
PR #1763 makes
checkmirror the builder's routing: compose a host-less source ontosourceBase(via the sharedsplit_source_base), honour per-entry host overrides, resolve the host's token through a sharedmarketplace/auth_helpers.resolve_token_for_host, and short-circuit local./packages. Adds threecheckregressions (composed → base host + token; host-prefixed override → github; local → zero ls-remote). Verified end-to-end against a real self-managed GitLab.Related
host/owner/repo(deeply-nested GitLab subgroups, arbitrary git hosts) #1519 / feat(marketplace): add sourceBase for package sources #1736.apm install <pkg>@<marketplace>; this isapm marketplace check).