Repository navigation
fix(install): --frozen replays plugins from a local marketplace (#4639) - #4655
Merged
Daniel Meppiel (danielmeppiel) merged 4 commits intoNov 21, 2026
Merged
Conversation
…ce (#4639) Co-authored-by: Copilot App <[email protected]>
…ozen (#4639) Lock local catalog rows by content in the marketplace-locked-selection owner, re-read the catalog on install, refuse a changed selection under --frozen, and apply the local-content verdict to local catalog plugins so frozen and audit --ci refuse changed content before any write. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 21, 2026 17:36
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 21, 2026 17:36
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Frozen installs can run scripts or deploy changed content before refusing, and nested local-catalog plugins bypass content checks, leaving audit drift detection incomplete.
2 open issues
What changed in this PR
This PR addresses #4639 by allowing frozen installs to accept unchanged local-path plugins from local marketplaces, using content hashes rather than commit evidence.
Changes:
- Adds local-catalog replay handling and rejects changed selections during frozen resolution.
- Extends the shared frozen-install and audit content check to root-level local marketplace plugins.
- Adds regression coverage, documentation, and a changelog entry.
| File | Description |
|---|---|
tests/unit/marketplace/test_locked_selection_evidence.py |
Tests content-backed lock evidence and catalog selection changes. |
tests/integration/test_marketplace_local_catalog_frozen_lifecycle.py |
Exercises frozen replay and refusal for directory and file catalogs. |
tests/fixtures/lifecycle_bug_ledger/bugs/4639.json |
Records the bug and regression tests. |
src/apm_cli/install/local_content_verdict.py |
Includes root-level local marketplace plugins in content verification. |
src/apm_cli/drift.py |
Owns local-catalog lock evidence and selection refusal. |
src/apm_cli/deps/apm_resolver.py |
Applies local-catalog selection refusal during frozen resolution. |
docs/src/content/docs/consumer/installing-from-marketplaces.md |
Documents local-catalog replay behavior. |
changelog.d/4655.fixed.md |
Announces the frozen-install and audit fix. |
.apm/architecture/owners/marketplace-plugins.json |
Updates the locked-selection owner description. |
Review effort: Balanced
…verify nested local-catalog plugins (#4639) - InstallService checks local-catalog selections under --frozen inside the marketplace scope before pre-install scripts fire (local_catalog_selection_reasons, an origin-checked, admission-checked entry point registered in marketplace_locked_evidence); the resolver check stays as a safeguard - local_content_reasons enqueues a verified local package's marketplace children that resolved through a local catalog apm-spec-waiver: frozen-install refusal ordering for local marketplace catalogs; no OpenAPM-observable change Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-p1-4639-local-mkt-frozen
branch
November 21, 2026 20:29
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
…green on main 488a4b1) Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 21, 2026
Merged
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.


Description
A plugin installed from a local marketplace (a catalog directory or a direct
marketplace.jsonfile) converged underapm install, butapm install --frozenexited 1 on the same project ("declared source, ref, host provider, or transport differs from apm.lock.yaml"), andapm audit --cidisagreed with the converged state too.Root cause: the lock row already records the marketplace identity (
discovered_via,marketplace_plugin_name), but the owner of the locked-selection comparison,drift.marketplace_ref_mismatch, demanded a full locked commit. A local catalog row has no commit, so every consumer (frozen plan, audit ref-consistency, lock-first replay) treated it as under-evidenced.Fix, in the owners (single-owner rule):
drift.py(ownermarketplace-locked-selection): a local-source marketplace row is locked by its content (local_path+content_hash), not a commit; a manifest version or ref still fails, since a local catalog selects none.locked_marketplace_replayreturns a newlocal-catalogdecision for such rows, so plainapm installkeeps reading the catalog from disk (catalog edits still apply, no behavior change), andlocal_catalog_refusalmakes--frozenrefuse when the catalog no longer selects the locked plugin directory.deps/apm_resolver.py: consumes the decision (applies the refusal under--frozenonly).install/local_content_verdict.py(the one local-content verdict): also checks local catalog plugins, so a changed plugin content fails--frozenbefore any write and failsaudit --cialike (without it, frozen deployed the changed files and only withheld the lock write).No new lockfile fields and no change in meaning of existing ones; rows for other sources are byte-identical. Local catalogs still record no
source_url/source_digest(machine-specific paths, as documented in lockfile-spec).Dependency order: none. Note for Q&L: the M-SOURCE strict cells
X|install|local-mkt|FROZEN=onandX|install|file-mkt|FROZEN=onare not on main yet (they live in the unpublishedql-w1-t2-drain-4-wipbranch, no known cell recorded). If this lands first, the T-2 drain-4 batch records them as required instead of strict-known.Lifecycle evidence:
Issue and approved scope
Issue: Fixes #4639
Human scope-approval comment: #4639 (comment)
Does this PR complete the issue, or what remains? Completes it. Controls from the record: git-backed marketplace, git and local-path dependencies keep passing frozen (existing suites green); a changed local catalog entry still fails frozen ("declared source differs from apm.lock.yaml: the local catalog now selects X, but apm.lock.yaml pins Y. Run 'apm install' to lock the marketplace dependency, then commit apm.lock.yaml."), now writing nothing; other sources' lock rows unchanged.
Type of change
Testing
Results (local, host-guarded, sequential):
env -u GIT_EXEC_PATH "PATH=/usr/bin:/bin:$PATH" APM_E2E_TESTS=1 APM_BINARY_PATH=$PWD/.venv/bin/apm .venv/bin/python -m pytest tests/integration/test_marketplace_local_catalog_frozen_lifecycle.py -n 0 -q-> before fix: 2 failed (frozen exit 1); after: 2 passed.venv/bin/python -m pytest tests/unit/marketplace tests/unit/test_drift_detection.py tests/unit/test_drift_registry.py tests/unit/install tests/unit/deps tests/unit/policy tests/integration/test_architecture_marketplace_locked_evidence.py tests/quality/test_lifecycle_bug_ledger.py -n 2 -q-> 8573 passed, 1 skipped.venv/bin/python -m pytest tests/unit/scripts/test_architecture_runner.py tests/integration/test_architecture_marketplace_locked_evidence.py tests/quality/test_lifecycle_bug_ledger.py tests/unit/marketplace/test_locked_selection_evidence.py -n 0 -q-> 161 passeduvx [email protected] check/format --check-> clean; pylint R0801 -> 10.00/10;bash scripts/lint-auth-signals.sh-> clean;python scripts/check_complexity_ratchet.py --base-ref origin/main-> clean;python -m tests.quality.taxonomy --changed-> clean;python scripts/check_test_assertions.py-> clean;python scripts/lint_architecture_boundaries.py --root .-> exit 0install --frozen-> exit 0, lock bytes unchanged;audit --ci-> 15 checks passedChangelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.