Repository navigation
fix(install): local bundle installs record deployment receipts (#4223) - #4302
Merged
Daniel Meppiel (danielmeppiel) merged 9 commits intoNov 21, 2026
Merged
Conversation
A bundle file has no locked source to render, so a local receipt is its only deletion evidence (req-lk-024). The bundle handler now records receipts for every file it deployed through the receipt owner. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
#4223) Installed-CLI lifecycle case: a packed bundle installed with --legacy-skill-paths records receipts; installing the converged layout removes the unedited legacy copy and its lock claim, and keeps an edited one. Bug-ledger row and changelog line. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 20, 2026 12:13
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 12:13
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Receipt handling can expose pre-existing adopted user files to deletion and leaves incorrectly owned, unbound receipts that can block later bundle replacements.
2 open issues
What changed in this PR
This PR addresses #4223 by recording local bundle deployment receipts, giving lockfile-driven cleanup evidence to remove unchanged bundle files that cannot be re-rendered from locked sources.
Changes:
- Adds receipt recording through the deployment ledger, excluding dry runs.
- Adds lifecycle coverage for skill-path migration, including preservation of user-edited files.
- Records the regression coverage and user-visible fix in the bug ledger and changelog.
| File | Description |
|---|---|
tests/integration/test_local_bundle_hooks_lifecycle.py |
Tests bundle skill migration for unchanged and edited legacy copies. |
tests/fixtures/lifecycle_bug_ledger.json |
Links #4223 to regression tests and ownership properties. |
src/apm_cli/install/local_bundle_handler.py |
Calls receipt recording after bundle deployment. |
src/apm_cli/core/deployment_ledger.py |
Adds the bundle receipt-recording helper. |
CHANGELOG.md |
Documents receipt-backed cleanup of legacy skill copies. |
Review effort: Balanced
…e local-bundle claim (#4223) Review fold: adopted identical hook scripts are no longer receipted (the hook integrator's take_rendered_writes names real writes), receipts use the canonical local-bundle owner, and they are recorded after the lock holds the bundle claims so each binds to the committed claim signature. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ndle-receipts # Conflicts: # CHANGELOG.md # tests/fixtures/lifecycle_bug_ledger.json
…ndle-receipts # Conflicts: # CHANGELOG.md # tests/fixtures/lifecycle_bug_ledger.json
This was referenced Nov 20, 2026
Co-authored-by: copilot-swe-agent[bot] <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
5 of 10 tasks
…itation (#4223) record_bundle_receipts returns early with nothing written (a dry run writes nothing), so the handler calls it unconditionally. The generator citation follows DeploymentLedgerCodec's new line. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
5 of 10 tasks
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-4223-bundle-receipts
branch
November 21, 2026 05:24
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
Local bundle installs (
apm install <bundle>) wrote files with no local deployment receipt, and a bundle can't be rendered from a locked source. Under req-lk-024, lockfile-driven cleanup and skill path migration therefore kept stale bundle files instead of deleting them.Slice 1 (this commit): the bundle handler records a receipt for every file it deployed, through the receipt owner (
core/deployment_ledger.record_bundle_receipts). Dry runs record nothing.Next slices: installed-CLI lifecycle tests (the agent_skills auto-migration pair and a bundle reinstall that drops a file), plus docs.
Issue and approved scope
Issue: Fixes #4223
Human scope-approval comment: #4223 was filed and assigned through the 0.37 Stream H lead (intake by the PM and steward).
Does this PR complete the issue, or what remains? It will, once the tests land.
Type of change
Testing
Changelog
Spec conformance (OpenAPM v0.1)