Repository navigation
[0.38] feat(marketplace): root apm.yml marketplaces: map and marketplace.allow policy - #4006
Merged
Daniel Meppiel (danielmeppiel) merged 9 commits intoNov 21, 2026
Merged
Conversation
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-turbo-pancake
branch
from
November 19, 2026 23:53
fe8e421 to
9e06f66
Compare
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-turbo-pancake
branch
2 times, most recently
from
November 20, 2026 00:16
5657f5b to
64b835c
Compare
This was referenced Nov 20, 2026
Closed
Merged
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-turbo-pancake
branch
8 times, most recently
from
November 20, 2026 07:49
9d4e0c3 to
7f5d4a1
Compare
This was referenced Nov 20, 2026
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-turbo-pancake
branch
2 times, most recently
from
November 21, 2026 08:33
55918b0 to
7cff8a9
Compare
…ow policy (#2903) A root project apm.yml may declare marketplaces: (name, source, optional ref; the user-manifest shape). marketplace: <name> entries resolve through that map first, with no local registration, so a cold clone or CI installs and apm update fetches the committed origin. The map is never written to the user's marketplace registry and its catalogs are cached by catalog identity, never by name. Inside the project the file wins over a same-named registration with one [i] line. When the root declares a map, a transitive marketplace: <name> must be root-declared, else install fails naming the entry to add. A dependency's marketplaces: is refused. Org policy marketplace.allow restricts the declared catalog origins (tighten-only through extends) and survives the policy cache round trip. Owner: marketplace/project_marketplaces.py, guarded by the marketplace-integrations-project-map architecture rule. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…-mf-029)
Adds Section 4.2.5 with two consumer MUSTs, conditional on resolving
marketplace references: the root manifest may declare marketplaces:,
declared names win over same-named registrations, are manifest-local,
lock the catalog origin and resolved commit, and are never persisted to
a user or machine registry; a dependency's marketplaces: is refused and
transitive references must name a root-declared entry. Statement count
149 -> 151. Conformance fixture, tests, requirements manifest and
CONFORMANCE.{json,md} updated; schema bytes unchanged. Renumbered from
0.1.69, which #4049 took in 0.37.
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…#2903) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ap or bypass marketplace.allow (#2903) A locked marketplace row replayed by {name, marketplace} and version only, so a lock written through a manual registration kept installing from that catalog after apm.yml declared another origin, and marketplace.allow only judged the origins written in apm.yml. - drift.locked_marketplace_row compares the row's source_url with the origin the bound map declares (no network). On mismatch the row is origin-changed: install and update re-resolve through the map with one [i] line; --frozen refuses with ProjectMarketplaceOriginConflictError. - catalog_origin.require_locked_catalog_origin lets the map own a declared name instead of raising the registration alias conflict. - marketplace.allow also judges the catalog origins of locked and freshly resolved marketplace dependencies, at the install gate and in apm audit --ci; a row with no recorded origin is refused. - Architecture guard marketplace-integrations-project-map covers the new owner calls. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…: map (#2903) Real CLI against Git catalogs behind HTTPS URLs, so source_url and the resolved commit are recorded: a lock written through a registration re-resolves through a committed map naming another origin (one [i] line) while install --frozen refuses; apm update fetches the committed origin with no registration; marketplace.allow refuses an install and audit --ci when only the locked source_url is disallowed, and a disallowed declared origin. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…used lock rows a working remedy (#2903) - apm install <plugin>@<name> keyed its catalog provenance by get_identity(), while the lock and the policy gate key by get_unique_key(). On a GHE default host (GITHUB_HOST) those differ, so the install was never judged by marketplace.allow and its lock row lost discovered_via/source_url, hiding it from audit --ci too. Key it by get_unique_key(). - A refused lock row told the user to run 'apm update', which never clears it: the lock carries catalog provenance forward on every write. The remedy is now to remove the apm.yml entry and run 'apm install' (pruning the row), then add the package back from an allowed catalog; the label names the lock key. - Lifecycle tests: the remedy unblocks install and audit --ci; a GHE add-path install is refused by install and audit --ci. Mutation case for the run_policy_checks guard. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The 0.37 hardening moved remediation text, manifest paths and test classification into owners. #2903 now goes through them: - core/remediation.py: retire marketplaces-outside-user-manifest and marketplace-register-manual (a root apm.yml may declare marketplaces:); add marketplace-project-origin-relock (the --frozen refusal of a lock row from another origin) and marketplace-allow-readd (the marketplace.allow remedy for a locked catalog origin). Both are COMPONENT_ONLY, with the installed-CLI lifecycle tests named. - project_marketplaces.read_project_marketplaces joins apm.yml through core.scope.manifest_file. - run_dependency_policy_checks keeps 0.37's installing= next to marketplace_origins=; it is grandfathered for PLR0913 in the Stage 2 baseline (ratchet clean), so ruff's Stage 1 limit is noqa'd. - Test taxonomy: P-OWN-marketplace-project-map promise; every new module carries one behavioral marker plus that promise; tests observe durable state; the registry cache is reset through its owner, never patched. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… map (#2903) main's update re-verifies locked marketplace provenance before planning (#4228) and resolved the alias through the registry only, so a project whose apm.yml declares the catalog failed with 'not registered'. Bind the root marketplaces: map around the re-verify; a row whose origin the map changed re-resolves through apm.yml instead (rebound_by_project_map). Shift the lifecycle generator's commands/install.py citations and regenerate the obligations. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-turbo-pancake
branch
from
November 21, 2026 09:10
7cff8a9 to
62ebbdc
Compare
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 21, 2026 09:50
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 21, 2026 09:50
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-turbo-pancake
branch
November 21, 2026 09:54
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Marketplace provenance gaps can retain unverified sources after catalog remapping and let incomplete lock rows bypass install and audit allow checks.
5 open issues
What changed in this PR
Adds project-local marketplace declarations to APM, allowing committed apm.yml files to resolve catalog names without manual registration. It also introduces marketplace.allow policy enforcement and proposes corresponding OpenAPM requirements.
Changes:
- Bind root marketplace declarations during installation, update and outdated checks, with precedence over registrations and conflicting locked origins.
- Enforce dependency declaration restrictions and organization policy over declared and resolved catalog origins.
- Add regression coverage, architecture guards, conformance records and usage documentation.
| File | Description |
|---|---|
tests/unit/scripts/test_architecture_runner.py |
Register the project-map guard in the expected inventory. |
tests/unit/policy/test_policy_serialization_properties.py |
Cover marketplace policy serialization properties. |
tests/unit/policy/test_inheritance.py |
Include marketplace rules in inheritance coverage. |
tests/unit/policy/test_cache_merged_effective.py |
Test marketplace-only policy cache preservation. |
tests/unit/policy/test_cache_merged_effective_logic.py |
Extend policy emptiness and serialization checks. |
tests/unit/marketplace/test_user_manifest_marketplaces.py |
Replace project rejection expectations with declaration parsing tests. |
tests/unit/marketplace/test_project_marketplaces.py |
Test project resolution, origin conflicts and policy checks. |
tests/unit/core/test_remediation_w2_marketplace_catalog.py |
Update remediation coverage records. |
tests/unit/commands/test_install_resolve_refs.py |
Align mocked provenance keys with lockfile keys. |
tests/spec_conformance/test_root_marketplaces_reqs.py |
Add coverage for the two proposed requirements. |
tests/quality/promise-catalog.json |
Register the project marketplace promise. |
tests/quality/lifecycle_obligations.json |
Refresh generated evidence locations and digest. |
tests/lifecycle/generator/rules.py |
Adjust install-command evidence line references. |
tests/integration/test_user_manifest_marketplaces_install.py |
Remove obsolete project-declaration rejection coverage. |
tests/integration/test_remediation_advice_lifecycle.py |
Remove the retired user-manifest migration scenario. |
tests/integration/test_project_marketplaces_origin_lifecycle.py |
Exercise remote origins, updates and policy through the CLI. |
tests/integration/test_project_marketplaces_install.py |
Cover local catalogs, reproducibility and dependency restrictions. |
tests/integration/test_architecture_owner_rule_mutations.py |
Add a project-map lookup bypass mutation. |
tests/integration/test_architecture_marketplace_project_map.py |
Test project-map guard enforcement. |
tests/fixtures/spec-conformance/manifest/valid-root-marketplaces.yml |
Provide a root marketplace declaration fixture. |
tests/fixtures/policy/golden/parsed-policies.json |
Include the default marketplace policy shape. |
src/apm_cli/policy/schema.py |
Define MarketplacePolicy.allow. |
src/apm_cli/policy/policy_checks.py |
Check declared and resolved catalog origins. |
src/apm_cli/policy/parser.py |
Parse and validate marketplace policy. |
src/apm_cli/policy/inheritance.py |
Intersect inherited marketplace allow lists. |
src/apm_cli/policy/discovery.py |
Preserve marketplace rules in policy caches. |
src/apm_cli/models/apm_package.py |
Store parsed marketplace declarations. |
src/apm_cli/marketplace/user_manifest.py |
Share declaration grammar across supported manifest scopes. |
src/apm_cli/marketplace/source_identity.py |
Normalize catalog origins and policy patterns. |
src/apm_cli/marketplace/registry.py |
Prefer project declarations and prevent their persistence. |
src/apm_cli/marketplace/registration.py |
Carry source origin through catalog probing. |
src/apm_cli/marketplace/project_marketplaces.py |
Own project bindings, resolution and origin precedence. |
src/apm_cli/marketplace/models.py |
Introduce the non-persisted project origin. |
src/apm_cli/marketplace/errors.py |
Add undeclared-name and frozen-origin conflict errors. |
src/apm_cli/marketplace/client.py |
Key project catalog caches by source identity. |
src/apm_cli/marketplace/catalog_origin.py |
Account for root-map rebinding during provenance checks. |
src/apm_cli/install/service.py |
Bind project marketplaces around installation pipelines. |
src/apm_cli/install/phases/policy_gate.py |
Supply catalog provenance to install policy checks. |
src/apm_cli/drift.py |
Detect declared-origin conflicts during lock replay. |
src/apm_cli/deps/apm_resolver.py |
Enforce transitive names and reject dependency maps. |
src/apm_cli/core/remediation.py |
Define relocking and policy remediation advice. |
src/apm_cli/commands/update.py |
Bind declarations during provenance re-verification. |
src/apm_cli/commands/outdated.py |
Use project declarations for marketplace checks. |
src/apm_cli/commands/install.py |
Resolve CLI additions through the root map. |
scripts/architecture_linter/checks/marketplace_project_map.py |
Define project-map ownership and routing guards. |
scripts/architecture_linter/checks/marketplace_integration_analyzers.py |
Register the new guard rules. |
packages/apm-guide/.apm/skills/apm-usage/governance.md |
Document marketplace origin policy and remediation. |
packages/apm-guide/.apm/skills/apm-usage/dependencies.md |
Explain root-map resolution and precedence. |
docs/src/content/docs/specs/openapm-v0.1.md |
Propose root marketplace requirements and update indexes. |
docs/src/content/docs/reference/policy-schema.md |
Document marketplace.allow. |
docs/src/content/docs/reference/manifest-schema.md |
Expand marketplace declarations to root projects. |
docs/src/content/docs/reference/cli/marketplace.md |
Link registration guidance to project declarations. |
docs/src/content/docs/enterprise/org-marketplace.mdx |
Explain committed marketplace configuration. |
docs/src/content/docs/consumer/installing-from-marketplaces.md |
Add project declaration guidance and examples. |
docs/public/specs/manifests/openapm-v0.1.requirements.yml |
Register the two proposed consumer requirements. |
CONFORMANCE.md |
Update requirement coverage and counts. |
CONFORMANCE.json |
Record machine-readable conformance coverage. |
CHANGELOG.md |
Announce project declarations and origin policy. |
.apm/architecture/owners/marketplace-plugins.json |
Register the project-map owner and guard. |
Review effort: Balanced
Comment on lines
+518
to
+520
| manifest and record, for every marketplace reference it resolves from a | ||
| remote catalog, the catalog origin (not the name) and the resolved | ||
| commit in the lockfile; and (d) never persist a declared entry to any |
Comment on lines
+347
to
+350
| if rebound_by_project_map(alias, dep.source_url): | ||
| # apm.yml now names another catalog: the update re-resolves this | ||
| # row through the map instead of re-verifying the lock's (#2903). | ||
| continue |
Comment on lines
+1328
to
+1329
| if via and plugin and (wanted is None or key in wanted): | ||
| origins[key] = (f"{plugin}@{via} ({key})", origin or "") |
Comment on lines
+144
to
+148
| if source.origin == ORIGIN_PROJECT: | ||
| # A project name is local to its apm.yml: key by catalog, never by | ||
| # name, so it cannot share a cache entry with a same-named registration. | ||
| identity = "\0".join((kind, source.url, source.ref, source.path)) | ||
| return f"project__{hashlib.sha256(identity.encode()).hexdigest()[:16]}" |
Comment on lines
+166
to
+170
| source, _manifest = probe_registration( | ||
| entry.name, | ||
| parsed.url, | ||
| parsed.ref, | ||
| is_direct_url=parsed.is_direct_url, |
This was referenced Nov 21, 2026
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
#4006/#4019 shifted the update command options by 8 lines, so test_every_rule_cites_code_that_still_says_it failed on the merge. Refs #4564 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
…ate.py by 8 lines Main's #4019/#4006 moved the update command's click decorators down 8 lines, so test_every_rule_cites_code_that_still_says_it failed on every PR to main (Lifecycle Smoke Shard 4). Point the five update.py anchors at the lines that now carry their needles. Co-authored-by: Copilot App <[email protected]>
5 of 10 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
* test(lifecycle): M-GATE matrix credits OP x PRIM x GATE cells A deterministic spine on the shared lifecycle world walks six gate levels (gate off, allowed, revoked after deploy, denied before deploy, unapproved, org dependency deny) and credits G1 machine ids through check_obligation after I1-I9 on every step. witnesses.py translates them anchored on GATE. Refs #4564 Refs #4565 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): assert the matrix spine leaves no deployed surface Refs #4564 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): tighten M-GATE matrix evidence per review Credit no bin cell (no spine step observes a bin outcome), keep .github/instructions unchanged under install --mcp, compare MCP servers against a set read before the command, hold prune under a dependency deny to never-widen, and require each resolving step to deploy exactly the model's observable set. Refs #4564 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): re-anchor update.py rule evidence after main moved it #4006/#4019 shifted the update command options by 8 lines, so test_every_rule_cites_code_that_still_says_it failed on the merge. Refs #4564 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): M-SOURCE context ids, native and bundle primitives (T-2 drain 1) M-SOURCE now credits context ids X|<op>|<form>|<FACTOR>=<value> at the real steps that ran in that state (scope, network, unchanged target set, gate, a clean prior deployment, --force/--update/--frozen/--target), and the generator reads each one as {OP, SRC, FACTOR}. Native plugins name the primitives they carry (skill, mcp, bin via p-native-claude-bin), the LSP bundle joins the bundle form, and compile/lock now act on a project holding a local bundle. One context pass (multi-target, force/update, frozen, bundle reinstall) adds 10 CLI steps to the spine. Baseline 1468 -> 1380 (T-2 496 -> 408); one strict known cell: X|install|pkg-registry|UPDATE=on (#4572, a git->registry source switch leaves a stale .apm-pin until install --update drops it). Also re-anchors the update.py evidence lines of the generator rules, which drifted on main (test_every_rule_cites_code_that_still_says_it). Refs #4564 Refs #4565 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): credit GATE=none only when no executables gate is configured GATE=none is GateLevel('none', authority=None): no executables gate. The lifecycle world configures executables.allow, so a skill-only package there has no gate level; its GATE=none cells move to the gate-off phase of the next batch. Refs #4564 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): credit only observed outcomes in the M-GATE matrix Per review on the corpus train: drop other-file credits (no compile-staged output is asserted for copilot) and MCP credits of install --mcp (the requested registry server is never gated). The U7 oracle now asserts the requested server is declared, locked and configured, that no other server appears, and that only servers the gate no longer allows may go, with a negative control for each defect. Refs #4564 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): keep the U7 oracle negative control in a unit module Refs #4564 Co-authored-by: Copilot App <[email protected]> * test(lifecycle): M-SOURCE review fixes (native surfaces, per-slot targets, bundle ops) - Native plugins are observed by the primitives they carry (skill, MCP) as well as the gated native unit, so an unapproved native deployment is an I4 violation the oracle sees. - TGT=*-unchanged is judged per slot: a step is "unchanged" for a form only when that form's last resolving step ran under the same targets. The context pass installs the bundle twice under the multi-target set. - compile and lock no longer act on a local bundle in this batch: an unapproved bundle deploys nothing, so those cells wait for the gate-off batch, where its artifacts are deployed and checked. Baseline 1468 -> 1390 (T-2 496 -> 418), 1 strict known (#4572). Refs #4564 Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: danielmeppiel <[email protected]> Co-authored-by: Copilot App <[email protected]>
Merged
3 of 10 tasks
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.


TL;DR
A root project
apm.ymlcan now declare the marketplaces itsmarketplace: <name>entries resolve through. A fresh clone or CI then installs, andapm updatefetches, with noapm marketplace add, and two machines with different manual registrations lock identical bytes. A dependency'smarketplaces:is refused, transitive names must be root-declared, and the new org policy keymarketplace.allowrestricts the declared catalog origins.Fixes #2903 (the D1 and D3 scope recorded in the approval comment; D2 and the other bundled asks are listed as not covered below).
Important
0.38, rebased onto main bfc0929 (after v0.37.0). The OpenAPM amendment is 0.1.73 (proposed), the next free slot: 0.1.69 went to #4049 in 0.37 and 0.37 also added 0.1.70-0.1.72.
Issue and approved scope
scripts/governance/eligibility.cjsreturnedrecord-presentwith review contact Daniel Meppiel (@danielmeppiel).catalog:key. Also not covered, because the record names D1 and D3 only: SHA catalog pins inapm marketplace check, and persisting object form onapm install plugin@catalog(the CLI still writes the resolved shorthand).marketplace.allowships as an implementation policy key, likeregistry_source,bin_deployandexecutables; promoting it into OpenAPM Section 6.3 is deferred to spec v0.1.1.Problem (WHY)
marketplace: contosomeans. Every machine and CI job had to runapm marketplace add, and a projectapm.ymlwithmarketplaces:failed to parse.contosoregistrations resolved different catalogs from the sameapm.yml.Approach (WHAT)
marketplaces:map (user-manifest shape) resolvesmarketplace: <name>first, with no registration, at install, update, lock,deps updateandoutdated.marketplaces.json, and project catalogs are cache-keyed by catalog identity, never by name.[i]line naming both catalogs.marketplace: <name>must be root-declared; otherwise install fails and prints the entry to add.marketplaces:is refused before activation.marketplace.allow(host/path globs, tighten-only throughextends) gates declared origins at the install policy gate and inapm audit --ci.Implementation (HOW)
marketplace/project_marketplaces.py(new)origin=project), emits the[i]shadow notice once, and enforces the transitive rule.marketplace/registry.pyget_marketplace_by_nameconsults the owner first._saverefuses any non-persisted origin, so the map can never be registered.marketplace/models.py,client.py,registration.pyORIGIN_PROJECT;from_dictdegrades it tomanual._cache_keyhashes kind, url, ref and path for project sources, andprobe_registrationcarries the origin.marketplace/user_manifest.py,models/apm_package.pyAPMPackage.marketplacesis parsed for any manifest; the old project-wide parse refusal is replaced bydependency_marketplaces_error, raised by the resolver.deps/apm_resolver.py_activate_validated_packagerefuses a dependency map._resolve_marketplace_dep(required_by=...)applies the transitive rule before lock replay.install/service.py,commands/install.py,commands/outdated.pypolicy/schema.py,parser.py,inheritance.py,policy_checks.py,install/phases/policy_gate.pyMarketplacePolicy.allow; a malformed list is a validation error (fail closed); intersect merge; newmarketplace-allowcheck.policy/discovery.py_is_policy_emptyinclude the key, so a cached policy cannot drop it (fail-open).scripts/architecture_linter/checks/marketplace_project_map.py+ owner recordmarketplace-integrations-project-map, registered in.apm/architecture/owners/marketplace-plugins.json.Diagrams
Legend: how a
marketplace: <name>reference resolves once this PR binds the root map; the red nodes are refusals.flowchart TD A["marketplace: name entry"] --> B{"declared by a dependency?"} B -->|"transitive"| C{"root declares marketplaces:?"} C -->|"yes, name missing"| X["fail: add entry to root apm.yml"] C -->|"yes, name declared"| D C -->|"no map"| D B -->|"root"| D{"lock row matches?"} D -->|"yes"| R["replay locked commit, no catalog I/O"] D -->|"no"| E{"name in root map?"} E -->|"yes"| F["project_marketplace: probe + fetch, origin=project"] E -->|"no"| G["registry lookup, legacy path"] F --> H["lock source_url = catalog origin + resolved commit"] G --> H P["dependency apm.yml declares marketplaces:"] --> Y["refused before activation"] style X fill:#fdd style Y fill:#fddTrade-offs
~/, so./catalogis not accepted yet. Kept identical per D3 ("the same shape as the user manifest").--frozen. This already fails on main for registered local catalogs; the lifecycle test proves the CI flow through lock replay with a plainapm install.Benefits
~/.apm/marketplaces.jsonwritten (asserted).acmeregistrations produce byte-identicalapm.lock.yamland deployed files (asserted).marketplace.allowsurvives the policy cache round trip, and guard tests fail on the unfixeddiscovery.py(mutation-checked).Validation
origin/main:ruff checkandruff format --check(src, tests, architecture linter) clean;pylint R080110.00/10;bash scripts/lint-architecture-boundaries.shexit 0;bash scripts/lint-auth-signals.shclean; the file-length, YAML andrelative_toguards are clean.python -m tests.spec_conformance.orphan_checkreports[+] orphan_check OK: 151 requirements aligned;gen_statementregeneratedCONFORMANCE.{json,md}; the spec-guardian mechanical linter (ASCII, forbidden tokens, anchor uniqueness, link resolution, fixture citation) passes.Targeted test runs
A full
tests/unitsweep in the sandbox also fails some git-transport, shell-installer and credential tests. These fail identically on a cleanmaincheckout in the same sandbox (environment: commit signing and git transport), and none touch marketplace or policy code.Scenario Evidence
tests/integration/test_project_marketplaces_install.py::test_cold_clone_and_ci_install_through_the_map_without_registration[i]line...::test_two_machines_with_different_registrations_lock_identical_bytes...::test_dependency_declared_marketplaces_map_is_refused,tests/spec_conformance/test_root_marketplaces_reqs.py(req-mf-029)...::test_transitive_dependency_with_undeclared_marketplace_fails_with_fixmarketplace.allowgates declared origins; fail-closed parse and cachetests/unit/marketplace/test_project_marketplaces.py::TestMarketplaceAllowPolicy,tests/unit/policy/test_cache_merged_effective.pySpec conformance (OpenAPM v0.1)
req-mf-028andreq-mf-029(consumer MUSTs, conditional on resolving marketplace references), plus updates to Sections 4.2, 4.9, 7.1 and 11.3.2, Appendix C and the 0.1.73 (proposed) row in Appendix D. Statement count goes from 149 to 151. Schema bytes are unchanged.docs/public/specs/manifests/openapm-v0.1.requirements.yml.tests/spec_conformance/test_root_marketplaces_reqs.pyand fixturetests/fixtures/spec-conformance/manifest/valid-root-marketplaces.yml.CONFORMANCE.{md,json}regenerated.Rebase onto 0.37 owners (decisions)
0.37 moved several decisions into owners, so the rebase routes #2903 through them:
contracts-tooling-remediation-advice):marketplaces-outside-user-manifestandmarketplace-register-manualare retired, because a rootapm.ymlmay now declaremarketplaces:. New entries:marketplace-project-origin-relock(--frozenrefusal: "Drop --frozen, then run 'apm install' to re-resolve it through the apm.yml marketplaces: map, then commit apm.lock.yaml.") andmarketplace-allow-readd(marketplace.allow on a locked origin). Both are COMPONENT_ONLY and name the installed-CLI lifecycle tests that reach them.registry_delegation.scope_manifest_path):read_project_marketplacesusescore.scope.manifest_file.marketplace(mapping) andmarketplace.allow(string list; malformed fails closed).--dry-runresolves through the map.run_dependency_policy_checks: main'sinstalling=sits next tomarketplace_origins=. The function is grandfathered for PLR0913 in the Stage 2 baseline, so the complexity ratchet stays clean; ruff's Stage 1 limit (15) is noqa'd rather than refactoring a shared owner's signature in this PR (decision per S15; a parameter-object refactor is a follow-up).P-OWN-marketplace-project-map; every new module has one behavioral marker plus that promise; component tests observe durable state; the registry cache is reset throughregistry._invalidate_cache()instead of being patched.Spec renumbering at merge
The amendment number (0.1.73) and the statement count (149 -> 151) are provisional. Other 0.38 spec PRs touch the same count sites (Section 1.3, the Appendix C trailer, Appendix D), so they will conflict textually; both are recomputed at merge, in merge order. The anchors
req-mf-028andreq-mf-029are reserved for this PR.Docs re-home after #3996
The docs changes are in the last commit (
docs: ...) and use main's current layout. After the 0.37 tag, that commit will be redone on #3996's layout:consumer/installing-from-marketplaces.mdreference/manifest-schema.mdmarketplacesscope: user manifest or root project; dependency refusedreference/policy-schema.mdmarketplacetop-level row and## marketplacesection## registry_source)reference/cli/marketplace.mdaddpackages/apm-guide/.apm/skills/apm-usage/dependencies.mdpackages/apm-guide/.apm/skills/apm-usage/governance.mdenterprise/policy-reference.mdis not edited because #3996 removes it.Type of change
Testing
main)Changelog
## [Unreleased]/### Added(bottom of the section).How to test
marketplace.jsonlisting pluginp->./p, then make a projectapm.ymlwithmarketplaces: [{name: acme, source: /abs/catalog}]anddependencies.apm: [{name: p, marketplace: acme}].apm install: it installs, and~/.apm/marketplaces.jsonis not created.apm marketplace add /other/catalog --name acme, deleteapm.lock.yamlandapm_modules/, then reinstall: one[i] Using marketplace 'acme' from apm.yml ...line, and the project catalog's content is deployed.apm.ymldeclaresmarketplaces:: install exits 1 withDependency '...' declares 'marketplaces'.apm audit --ci --no-fail-fast --policy p.ymlwithmarketplace: {allow: [github.com/contoso/*]}inp.yml:marketplace-allowfails for the local catalog.Co-authored-by: Copilot [email protected]