Skip to content

[0.38] feat(marketplace): root apm.yml marketplaces: map and marketplace.allow policy - #4006

Merged
Daniel Meppiel (danielmeppiel) merged 9 commits into
mainfrom
danielmeppiel-turbo-pancake
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 9 commits into
mainfrom
danielmeppiel-turbo-pancake

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

A root project apm.yml can now declare the marketplaces its marketplace: <name> entries resolve through. A fresh clone or CI then installs, and apm update fetches, with no apm marketplace add, and two machines with different manual registrations lock identical bytes. A dependency's marketplaces: is refused, transitive names must be root-declared, and the new org policy key marketplace.allow restricts 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

Problem (WHY)

  • A project could not commit which catalog marketplace: contoso means. Every machine and CI job had to run apm marketplace add, and a project apm.yml with marketplaces: failed to parse.
  • An alias is machine-local, so two developers with different contoso registrations resolved different catalogs from the same apm.yml.
  • [!] A per-user registry keyed by name lets one repository's catalog leak into another project. Claude ran another repo's hook after a project switch (the spec's Section 8.5.11 editorial note).
  • [!] Orgs had no policy control over which catalog origins a committed manifest may use.

Approach (WHAT)

# Change
1 Root marketplaces: map (user-manifest shape) resolves marketplace: <name> first, with no registration, at install, update, lock, deps update and outdated.
2 The map lives in memory only. It is never written to marketplaces.json, and project catalogs are cache-keyed by catalog identity, never by name.
3 The file wins over a same-named registration, with exactly one [i] line naming both catalogs.
4 When the root declares a map, a transitive marketplace: <name> must be root-declared; otherwise install fails and prints the entry to add.
5 A dependency that declares marketplaces: is refused before activation.
6 Org policy marketplace.allow (host/path globs, tighten-only through extends) gates declared origins at the install policy gate and in apm audit --ci.

Implementation (HOW)

File Intent
marketplace/project_marketplaces.py (new) Canonical owner. Binds the map for one command, resolves a declared name (probe, then fetch with origin=project), emits the [i] shadow notice once, and enforces the transitive rule.
marketplace/registry.py get_marketplace_by_name consults the owner first. _save refuses any non-persisted origin, so the map can never be registered.
marketplace/models.py, client.py, registration.py New ORIGIN_PROJECT; from_dict degrades it to manual. _cache_key hashes kind, url, ref and path for project sources, and probe_registration carries the origin.
marketplace/user_manifest.py, models/apm_package.py The declaration grammar is shared. APMPackage.marketplaces is parsed for any manifest; the old project-wide parse refusal is replaced by dependency_marketplaces_error, raised by the resolver.
deps/apm_resolver.py _activate_validated_package refuses a dependency map. _resolve_marketplace_dep(required_by=...) applies the transitive rule before lock replay.
install/service.py, commands/install.py, commands/outdated.py Bind the map at project scope only; user scope still reconciles the user manifest into the registry.
policy/schema.py, parser.py, inheritance.py, policy_checks.py, install/phases/policy_gate.py MarketplacePolicy.allow; a malformed list is a validation error (fail closed); intersect merge; new marketplace-allow check.
policy/discovery.py Two hunks only, approved by the 0.38 program manager: cache serialization and _is_policy_empty include the key, so a cached policy cannot drop it (fail-open).
scripts/architecture_linter/checks/marketplace_project_map.py + owner record Static guard marketplace-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:#fdd
Loading

Trade-offs

  • Transitive rule applies only when the root declares a map. Without a map, transitive names still resolve through the registry, as in 0.37. Rejected: refusing every unmapped transitive name, which would break existing transitive marketplace dependencies with no opt-in.
  • Policy gates the declared origins, not every resolved marketplace row. This matches D1 ("restrict which origins are allowed" for committed origins). Registry-resolved rows stay governed by the dependency allow and deny lists.
  • Root map entries use the user-manifest validation as-is. Local paths must be absolute or start with ~/, so ./catalog is not accepted yet. Kept identical per D3 ("the same shape as the user manifest").
  • Local-path catalogs cannot replay under --frozen. This already fails on main for registered local catalogs; the lifecycle test proves the CI flow through lock replay with a plain apm install.
  • Shadow notice prints whenever a same-named registration exists, even if it names the same catalog. This keeps the behavior predictable; the notice prints only once per command.

Benefits

  1. A cold clone or CI installs through the map with zero registration and no ~/.apm/marketplaces.json written (asserted).
  2. Two machines with different manual acme registrations produce byte-identical apm.lock.yaml and deployed files (asserted).
  3. Packages can no longer add marketplaces ([FEATURE] Global marketplace directories for enterprise-wide discovery #3006 kept); refusal happens before activation.
  4. marketplace.allow survives the policy cache round trip, and guard tests fail on the unfixed discovery.py (mutation-checked).
  5. Three behavior mutations (owner lookup, dependency refusal, transitive rule) each break at least one new test; the static guard catches removed bindings.

Validation

  • Lint chain (CI mirror), merged with origin/main: ruff check and ruff format --check (src, tests, architecture linter) clean; pylint R0801 10.00/10; bash scripts/lint-architecture-boundaries.sh exit 0; bash scripts/lint-auth-signals.sh clean; the file-length, YAML and relative_to guards are clean.
  • Spec: python -m tests.spec_conformance.orphan_check reports [+] orphan_check OK: 151 requirements aligned; gen_statement regenerated CONFORMANCE.{json,md}; the spec-guardian mechanical linter (ASCII, forbidden tokens, anchor uniqueness, link resolution, fixture citation) passes.
Targeted test runs
tests/unit/marketplace tests/unit/policy tests/integration/test_user_manifest_marketplaces_install.py  -> 3500+ passed
tests/unit/marketplace/test_project_marketplaces.py                         -> 11 passed
tests/integration/test_project_marketplaces_install.py                      -> 5 passed
tests/spec_conformance/test_root_marketplaces_reqs.py                       -> 4 passed
tests/integration/test_architecture_marketplace_project_map.py + runner     -> 78 passed
tests/integration/test_architecture_owner_rule_mutations.py -k project_map  -> 3 passed
tests/unit/policy/test_cache_merged_effective.py -k marketplace_allow_only  -> 1 passed (2 subtests; fails if either discovery.py hunk is reverted)

A full tests/unit sweep in the sandbox also fails some git-transport, shell-installer and credential tests. These fail identically on a clean main checkout in the same sandbox (environment: commit signing and git transport), and none touch marketplace or policy code.

Scenario Evidence

User promise Test Principle
Cold clone and CI install through the committed map, never registering it tests/integration/test_project_marketplaces_install.py::test_cold_clone_and_ci_install_through_the_map_without_registration Reproducibility
Two machines, different registrations, identical locked bytes and one [i] line ...::test_two_machines_with_different_registrations_lock_identical_bytes Reproducibility / security
Dependency-declared map refused ...::test_dependency_declared_marketplaces_map_is_refused, tests/spec_conformance/test_root_marketplaces_reqs.py (req-mf-029) Security (#3006)
Transitive undeclared origin fails with the fix ...::test_transitive_dependency_with_undeclared_marketplace_fails_with_fix Governance
Org marketplace.allow gates declared origins; fail-closed parse and cache tests/unit/marketplace/test_project_marketplaces.py::TestMarketplaceAllowPolicy, tests/unit/policy/test_cache_merged_effective.py Governance

Spec conformance (OpenAPM v0.1)

  • Spec edit: new Section 4.2.5 with req-mf-028 and req-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.
  • Manifest edit: docs/public/specs/manifests/openapm-v0.1.requirements.yml.
  • Test edit: tests/spec_conformance/test_root_marketplaces_reqs.py and fixture tests/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:

  • Remediation catalog (contracts-tooling-remediation-advice): marketplaces-outside-user-manifest and marketplace-register-manual are retired, because a root apm.yml may now declare marketplaces:. New entries: marketplace-project-origin-relock (--frozen refusal: "Drop --frozen, then run 'apm install' to re-resolve it through the apm.yml marketplaces: map, then commit apm.lock.yaml.") and marketplace-allow-readd (marketplace.allow on a locked origin). Both are COMPONENT_ONLY and name the installed-CLI lifecycle tests that reach them.
  • Manifest paths (registry_delegation.scope_manifest_path): read_project_marketplaces uses core.scope.manifest_file.
  • Policy parser: main's table-driven validation carries marketplace (mapping) and marketplace.allow (string list; malformed fails closed).
  • Install service: main's new dry-run early return now runs inside the project-marketplace scope too, so --dry-run resolves through the map.
  • run_dependency_policy_checks: main's installing= sits next to marketplace_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).
  • Test taxonomy (tm006): new promise 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 through registry._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-028 and req-mf-029 are 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:

Page (current main) Change Target in #3996 layout
consumer/installing-from-marketplaces.md New section "Declare marketplaces in a project"; user-manifest closing note no longer says only the user manifest may declare same page, after "Declare marketplaces in your user manifest"
reference/manifest-schema.md Section 3.14 marketplaces scope: user manifest or root project; dependency refused same page
reference/policy-schema.md New marketplace top-level row and ## marketplace section same page (next to ## registry_source)
reference/cli/marketplace.md One-sentence pointer to project declarations under add same page
packages/apm-guide/.apm/skills/apm-usage/dependencies.md Marketplace section: root map semantics same file (also edited by #3996; rebase conflict expected)
packages/apm-guide/.apm/skills/apm-usage/governance.md New "Marketplace origin governance" section and policy-check list item same file

enterprise/policy-reference.md is not edited because #3996 removes it.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass (except the sandbox-only failures noted above; they reproduce on main)
  • Added tests for new functionality

Changelog

  • One line under ## [Unreleased] / ### Added (bottom of the section).

How to test

  • Make a catalog dir with marketplace.json listing plugin p -> ./p, then make a project apm.yml with marketplaces: [{name: acme, source: /abs/catalog}] and dependencies.apm: [{name: p, marketplace: acme}].
  • Run apm install: it installs, and ~/.apm/marketplaces.json is not created.
  • Run apm marketplace add /other/catalog --name acme, delete apm.lock.yaml and apm_modules/, then reinstall: one [i] Using marketplace 'acme' from apm.yml ... line, and the project catalog's content is deployed.
  • Add a local dependency whose apm.yml declares marketplaces:: install exits 1 with Dependency '...' declares 'marketplaces'.
  • Run apm audit --ci --no-fail-fast --policy p.yml with marketplace: {allow: [github.com/contoso/*]} in p.yml: marketplace-allow fails for the local catalog.

Co-authored-by: Copilot [email protected]

…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]>
…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]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) marked this pull request as ready for review November 21, 2026 09:50
Copilot AI balanced review requested due to automatic review settings November 21, 2026 09:50
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit e74759b into main Nov 21, 2026
46 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-turbo-pancake branch November 21, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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,
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]>
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]>
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.

[FEATURE] Persist marketplace object-form deps; accept SHA catalog pins

2 participants