Repository navigation
fix(update): restore a marketplace row to its declared alias when the origin matches - #4475
Merged
Merged
Conversation
…when its origin matches A lock row whose discovered_via names another alias, while it records the origin the user registered for the declared alias, is restored to the declared alias and reported, as install does. A stripped row or one that records another origin is still refused. The origin cell for an edited lock row under update is required now. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 18:56
Co-authored-by: Copilot App <[email protected]>
…ored Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…ared alias when the origin matches Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/lifecycle/security/test_origin_and_credentials.py
Co-authored-by: Copilot App <[email protected]>
…-only apm update --dry-run reads catalogs to re-verify locked marketplace provenance without persisting them: the marketplace client gains a read-only scope that skips cache writes and cache-directory creation, and update opens it on dry runs. Fixes #4484 Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 20, 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
apm updatenow restores a marketplace lock row whosediscovered_vianames a different alias than the oneapm.ymldeclares, as long as the row records the origin the user registered for the declared alias. The restoration is reported. A stripped row, or a row that records a different origin, is still refused with no write.This PR is stacked on #4338 (base
danielmeppiel-bug-sweep-037-p4). It also needs #4416 (theenforce_ref_pinskeyword), which precedes it in the train.#4484:
apm update --dry-runre-verified provenance through catalog reads that persisted the marketplace cache (~/.apm/cache/marketplace/<market>.meta.json). The marketplace client now has a read-only scope (catalog_cache_read_only) that skips cache writes and cache-directory creation, and update opens it on dry runs. Test:tests/lifecycle/world/test_world.py::test_marketplace_update_dry_run_writes_nothing_under_apm_home(red before: meta.json rewritten; green after).Strict cell flipped:
tests/lifecycle/security/test_origin_and_credentials.py::test_origin_row[M|update|lock-row-edited]("update restores the recorded marketplace provenance") is required now.Issue and approved scope
Issue: Fixes #4228 (scope record: #4228 (comment))
Issue: Fixes #4484 (scope record: #4484 (comment))
Human scope-approval comment: #4228 (comment)
Does this PR complete the issue, or what remains? It completes #4228 together with the re-verification already in #4338.
Type of change
Testing
Run locally on a scratch merge of this branch with #4416, through the host test guard:
pytest tests/lifecycle/security/test_origin_and_credentials.py -k origin-> 47 passed (M|update|lock-row-editedfailed before this change: update exited 1).pytest tests/integration/test_marketplace_update_provenance_lifecycle.py tests/quality/test_lifecycle_bug_ledger.py tests/integration/test_marketplace_explicit_refresh_lifecycle.py::test_update_follows_changed_pins_and_respects_selection tests/integration/test_approval_identity_lifecycle.py::test_deny_by_install_spec_stays_retired_through_update_and_frozen-> 19 passed.python scripts/lint_architecture_boundaries.py --root .-> clean;python scripts/check_complexity_ratchet.py --base-ref 692027b5-> clean; ruff check and format -> clean.Changelog
## [Unreleased]inCHANGELOG.md:user-visible effect first, 25 words or fewer, ending with
(#PR);breaking changes only under upgrade notes; no Highlights; see
.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)