Repository navigation
#3701 (2/2) cleanup deletes only with deployment evidence, never a lockfile hash alone - #4049
Merged
Daniel Meppiel (danielmeppiel) merged 15 commits intoNov 20, 2026
Merged
Conversation
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-3701-enforcement
branch
3 times, most recently
from
November 20, 2026 05:46
8e26f25 to
3f98387
Compare
12 of 19 tasks
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-3701-enforcement
branch
2 times, most recently
from
November 20, 2026 08:23
d240acc to
5fa179a
Compare
Merged
6 of 10 tasks
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-3701-enforcement
branch
from
November 20, 2026 08:41
5fa179a to
7517b21
Compare
… size budget Move the three best-effort cache pin marker syncs out of LockfileBuilder into install/phases/lockfile_cache_pins.py, owned with install/cache_pin.py (locked-copy-validity). No behavior change; phases/lockfile.py drops from 1017 to 940 lines, back under the 1000-line install module budget. Part of #3701 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
3 of 9 tasks
… hash alone (#3701) remove_stale_deployed_files now requires a DeploymentEvidence (keyword, no default): a matching local deployment receipt, or byte equality with the drift replay of the pre-transition lock (the locked render). Files that differ are kept as edited; files without evidence are kept with a warning naming them and the manual fix. cowork:// rows lose their exemption. Integrator sync (base, hooks, skills), the deferred skill directory pass, skill path migration, install, update, uninstall and prune all route through this owner; uninstall and prune render before removing package sources. Managed final symlinks keep their rule. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…en files inline (#3701) Committed-output clones with fresh HOME/APM_HOME and no receipts cover install orphan cleanup, update stale cleanup, uninstall (modules present, source only, neither) and prune: locked-render bytes go, a forged row's user file and an edited file stay. The deploying machine uninstalls every primitive through receipts with the source gone. cowork:// rows go only with a matching receipt. Install and update now name kept unproven files inline, as they do user edits. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ment evidence (#3701) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
#3701) Proposed amendment 0.1.76 (provisional number; counts recomputed at merge). Adds req-lk-024 (Section 5.2, consumer MUST): a lockfile-driven deletion of a deployed file needs a matching local deployment record or byte equality with the locked version's render; a lockfile hash alone never authorizes it; unproven or differing files are kept and named; the render is established before the source is removed. Updates Sections 1.3, 5.7, 10.7, 10.11, 11.3.2, Appendix C/D, the requirements manifest, a req-lk-024 conformance test and CONFORMANCE.{md,json}. Isolated so it can be dropped if the editor keeps the rule implementation-only. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…vidence (#3701) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…kill dirs (#3701) Unit tests now state their evidence explicitly: receipted files on the deploying machine, or none on a clone. Tests whose point was that a lockfile row alone must not delete keep that intent. Legacy deployed_skills migrations record skill directories with a trailing slash; the cleanup owner now recognizes them instead of refusing the entry. Documents the pipeline.py and manifest_reconcile.py LOC budgets the required evidence argument costs. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…follow the evidence rule (#3701) Uninstall target cleanup now names each file kept for lack of evidence, as install does. Hook sidecars an older APM wrote carry only a lockfile hash, so their lifecycle contract now expects them kept and named, with the manual fix (delete, then rerun) restoring the contract. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…fallback (#3701) Review folds (c9b13584 on babed8a): - A stale receipt no longer blocks the render comparison: a file adopted from a newer render after a pull is removed when it equals the locked render (EDITED only when no evidence matches). - The locked render also covers targets the lock recorded, so a target dropped from apm.yml stays provable on a clone without receipts. - When the whole-lock render fails, each owning package renders alone, so one unmaterializable package loses only its own evidence; the failure is named per package. - Kept files are named once: uninstall flushes its diagnostics before it stops and with its outcome, apm update renders install diagnostics, and the duplicate inline lines are gone. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…decars (#3701) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
#3701) DeploymentEvidence is scope-bound, so remove_synced_files passes its user_scope through: user-scope uninstall syncs validate user roots and retire receipts in the user store instead of the project one. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…r recorded targets (#3701) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Install, update, uninstall and prune references, the enterprise security cleanup-authority paragraph and the apm-usage commands resource now say a lockfile hash alone never authorizes deleting a deployed file. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-3701-enforcement
branch
from
November 20, 2026 08:58
7517b21 to
16d4b10
Compare
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 20, 2026 09:20
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 09:20
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-3701-enforcement
branch
November 20, 2026 09:25
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Cleanup can delete user files using unverified replay content or obsolete migration receipts, requiring verified locked-image evidence and proper receipt retirement.
5 open issues
Verify locked image before using replay output as deletion evidence · New Retire old-path receipts after successful migration removal · New Guard the cleanup owner call and test bypass mutations · New Use source root for replay and deployment root for receipts · New Isolate disabled targets from unrelated package replay · New
What changed in this PR
This completes the enforcement portion of #3701, building on the deployment receipts added in #4023. Cleanup now requires a matching local receipt or locked-render evidence rather than trusting a lockfile hash alone.
Changes:
- Pass deployment evidence through install, update, uninstall, prune, integrator sync, and skill migration.
- Extend replay to recorded targets and report files retained without sufficient evidence.
- Update regression tests, user documentation, architecture guards, and conformance records for proposed requirement
req-lk-024.
| File | Description |
|---|---|
tests/utils/deployment_evidence.py |
Adds receipt and no-evidence test helpers. |
tests/unit/test_uninstall_reintegration.py |
Supplies evidence to uninstall sync tests. |
tests/unit/test_surviving_deps_reintegration.py |
Updates survivor cleanup evidence inputs. |
tests/unit/test_prune_command.py |
Models receipts and subsequent user edits. |
tests/unit/test_deployment_materialization_receipts.py |
Updates receipt retirement and failure checks. |
tests/unit/integration/test_windsurf_uninstall_skills.py |
Tests evidence-backed skill member removal. |
tests/unit/integration/test_skill_integrator.py |
Updates managed skill cleanup expectations. |
tests/unit/integration/test_skill_integrator_cowork.py |
Tests Cowork evidence and retained entries. |
tests/unit/integration/test_scope_install_uninstall.py |
Supplies evidence across target and scope cases. |
tests/unit/integration/test_kiro_target.py |
Adds evidence to Kiro cleanup tests. |
tests/unit/integration/test_instruction_integrator.py |
Uses evidence-aware target sync. |
tests/unit/integration/test_hook_integrator.py |
Adds receipts to hook removal tests. |
tests/unit/integration/test_hook_integrator_defect_regression.py |
Supplies evidence for stale hook cleanup. |
tests/unit/integration/test_deployed_files_manifest.py |
Updates managed-file cleanup fixtures and counts. |
tests/unit/integration/test_data_driven_dispatch.py |
Adds evidence for synthetic-target cleanup. |
tests/unit/integration/test_command_integrator.py |
Supplies command deletion evidence. |
tests/unit/integration/test_cleanup_skill_dirs.py |
Tests receipt-backed removal and edit preservation. |
tests/unit/integration/test_cleanup_helper.py |
Covers forged hashes and scope-correct retirement. |
tests/unit/integration/test_canvas_integrator.py |
Supplies evidence for canvas cleanup. |
tests/unit/integration/test_base_integrator.py |
Tests evidence gating and cleanup diagnostics. |
tests/unit/install/test_target_contraction_logging.py |
Adds evidence to target contraction cases. |
tests/unit/install/test_skill_path_migration.py |
Tests migration refusal without evidence. |
tests/unit/install/test_install_target_copilot_cowork_e2e.py |
Updates Cowork deletion and retention expectations. |
tests/unit/install/test_architecture_invariants.py |
Adjusts module-size allowances. |
tests/unit/install/test_absent_dependency_claim_reconciliation.py |
Supplies reconciliation evidence fixtures. |
tests/unit/install/phases/test_lockfile_union.py |
Models receipts before cleanup and edits. |
tests/unit/install/phases/test_lockfile_orphan_prune.py |
Updates patches for extracted cache-pin helpers. |
tests/unit/install/phases/test_lockfile_cross_package_reconcile.py |
Uses explicit no-evidence fixtures. |
tests/unit/install/phases/test_cleanup_phase.py |
Supplies evidence to cleanup phase tests. |
tests/spec_conformance/test_lockfile_reqs.py |
Updates existing conformance tests for evidence. |
tests/spec_conformance/test_deletion_evidence_reqs.py |
Adds proposed deletion-evidence conformance checks. |
tests/integration/test_stale_cleanup_hash_authority_lifecycle.py |
Updates hash-authority expectations and diagnostics. |
tests/integration/test_hook_js_sidecar_lifecycle_contract.py |
Tests legacy sidecar retention and manual recovery. |
tests/integration/test_architecture_materialization_receipts.py |
Adds evidence-routing mutation traps. |
src/apm_cli/integration/targets.py |
Optionally includes lock-recorded replay targets. |
src/apm_cli/integration/skill_integrator.py |
Routes managed cleanup through the shared owner. |
src/apm_cli/integration/prompt_integrator.py |
Threads evidence into prompt sync. |
src/apm_cli/integration/instruction_integrator.py |
Threads evidence into instruction sync. |
src/apm_cli/integration/hook_integrator.py |
Uses shared evidence-aware hook cleanup. |
src/apm_cli/integration/command_integrator.py |
Threads evidence into command sync. |
src/apm_cli/integration/canvas_integrator.py |
Threads evidence into canvas sync. |
src/apm_cli/integration/base_integrator.py |
Centralizes managed sync deletion. |
src/apm_cli/integration/agent_integrator.py |
Threads evidence into agent sync. |
src/apm_cli/install/skill_path_migration.py |
Gates legacy-path deletion on evidence. |
src/apm_cli/install/pipeline.py |
Supplies migration evidence from install context. |
src/apm_cli/install/phases/post_deps_local.py |
Adds evidence to local-output reconciliation. |
src/apm_cli/install/phases/lockfile.py |
Supplies cleanup evidence and delegates cache-pin sync. |
src/apm_cli/install/phases/lockfile_cache_pins.py |
Extracts cache-pin synchronization helpers. |
src/apm_cli/install/phases/cleanup.py |
Collects shared pre-transition deletion evidence. |
src/apm_cli/install/manifest_reconcile.py |
Requires evidence throughout deployment reconciliation. |
src/apm_cli/install/local_bundle_handler.py |
Collects evidence before bundle claim changes. |
src/apm_cli/install/drift.py |
Adds recorded-target replay configuration. |
src/apm_cli/core/deployment_ledger.py |
Exposes receipt hashes by physical path. |
src/apm_cli/commands/update.py |
Renders collected install diagnostics after update. |
src/apm_cli/commands/uninstall/engine.py |
Passes evidence through integration cleanup. |
src/apm_cli/commands/uninstall/cli.py |
Prepares evidence before source removal and reports retention. |
src/apm_cli/commands/prune.py |
Prepares evidence before pruning package sources. |
scripts/architecture_linter/checks/install_base_integrator_and_contraction.py |
Extends deletion-evidence routing guards. |
packages/apm-guide/.apm/skills/apm-usage/commands.md |
Documents evidence requirements and uninstall refusal. |
docs/src/content/docs/reference/cli/update.md |
Describes evidence-based stale-file cleanup. |
docs/src/content/docs/reference/cli/uninstall.md |
Documents evidence preparation and retained files. |
docs/src/content/docs/reference/cli/prune.md |
Documents evidence-backed deployment removal. |
docs/src/content/docs/reference/cli/install.md |
Updates stale-file cleanup guarantees. |
docs/src/content/docs/enterprise/security.md |
Documents protection against forged cleanup claims. |
docs/public/specs/manifests/openapm-v0.1.requirements.yml |
Registers proposed requirement req-lk-024. |
CONFORMANCE.md |
Adds deletion-evidence coverage and totals. |
CONFORMANCE.json |
Records new conformance test bindings. |
CHANGELOG.md |
Adds cleanup behavior and upgrade guidance. |
.apm/architecture/owners/install-deployment.json |
Registers the extracted cache-pin module. |
Review effort: Balanced
Comment on lines
+111
to
+112
| # Cleanup evidence (#3701) also renders targets the lock recorded. | ||
| include_recorded_targets: bool = False |
| try: | ||
| # B1: containment guard before any disk mutation. | ||
| ensure_path_within(abs_path, project_root) | ||
| if not evidence.authorizes(plan.src_path, abs_path, rendered_as=plan.dst_path): |
Comment on lines
+1482
to
+1484
| _BASE_INTEGRATOR_OWNER: ( | ||
| "from apm_cli.integration.cleanup import remove_synced_files", | ||
| ), |
| ctx.project_root, | ||
| user_scope=is_user_scope(getattr(ctx, "scope", None)), | ||
| lockfile=ctx.existing_lockfile, | ||
| lockfile_root=ctx.apm_dir, |
Comment on lines
+1857
to
+1858
| if include_recorded and manifest_target and recorded: | ||
| manifest_target = sorted({*manifest_target, *recorded}) |
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
6 of 12 tasks
Collaborator
Author
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Copilot App <[email protected]>
4 of 9 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
remove_stale_deployed_files requires evidence since #4049 (req-lk-024). The hash-format oracle now models the deploying machine's receipts with the digests the bundle install recorded, and asserts that a lockfile hash alone keeps every file. Part of #3701 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
This was referenced Nov 20, 2026
Takeshi Masukawa (takeaship)
pushed a commit
to takeaship/apm
that referenced
this pull request
Nov 20, 2026
microsoft#4049 (req-lk-024) requires deployment evidence for every lockfile-driven deletion. Eight integration tests still drove cleanup with stale doubles: - skipped-integration ctx gains apm_dir (evidence reads the lock root); - the hermetic skill-sync fake target gains a string prefix; - wave6 hook and skill syncs supply receipts, and the skill lockfile claim lists its member as real installs record it; - the uninstall hook-cleanup fixture seeds the local deployment receipt the installing machine holds, with no render of the unfetchable locked package. Part of microsoft#3701 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
This was referenced Nov 20, 2026
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…gration-receipts test: agent-skills migration fixture holds the legacy deployment receipt (#4049)
4 tasks done
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…nce (#4360) - Claude/Cursor/Gemini commands are transformed: the adopt check now compares the rendered text, so render-equal commands on a clone adopt instead of being falsely refused (J02/J03 frozen exit 0 again). - A local bundle's freshly deployed bytes are its render: a receipt-less legacy .github/skills copy equal to them migrates; an edited one is kept, named and exits 1 (#4049 residual). - --frozen no longer prints 'Deployed files verified' after failing. - Frozen replay of 0.35.1 renders keeps those files (steward-approved); goldens J01/06, J02/02, J03/02 re-recorded; J02 known cell -> #4183. - Generator citation re-anchored; obligations regenerated; upgrade note. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
…-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]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
…-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]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
…-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]>
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
Draft, PR 2 of 2 for #3701 (enforcement and render fallback). Base
main; #4023 (receipt plumbing) has merged.A lockfile hash alone no longer authorizes deleting a deployed file. Every lockfile-driven deletion now needs evidence that APM deployed the current bytes. That covers install and update orphan and stale cleanup, target contraction, uninstall (Step 3 and Phase 1), prune, the deferred skill-directory pass, integrator sync and skill path migration. The evidence is one of:
install/drift.run_replay, the existing package-image owner) renders the pre-transition lock into a private scratch tree, with the targets the lock recorded as well as the manifest's, so a just-dropped target stays provable. It runs only when some candidate has no matching receipt, fetches the locked commit when the checkout is gone, and falls back to rendering each owning package alone when the whole-lock render fails, so one unmaterializable package loses only its own evidence.A stale receipt does not block the render comparison: receipt OR render. A file adopted from a newer render after a pull is still removable.
Without evidence the file is kept, and a warning names it and the manual fix. A file that differs from its evidence is kept as user-edited.
cowork://rows lose their exemption. Managed final symlinks keep their current unlink rule. Uninstall still stops, keeping the declaration, when a target file is retained.One owner, closed-world
integration/cleanup.pyownsDeploymentEvidence(receipts plus the lazy locked render) andremove_stale_deployed_files(..., evidence=...).evidenceis keyword-only with no default, so no caller can fail open.remove_synced_filesis the only path for integrator sync deletions. Hook and skillsync_integrationandBaseIntegrator.sync_remove_filesused tounlink/rmtreewith no check.install/phases/cleanup.deployment_evidence(ctx)builds one evidence per install, fromctx.existing_lockfile.DeploymentEvidence.preparebefore removing package sources.install-deployment-provenance-statenow requires these routes, with mutation traps.Known limitations and consequences
copilot-cowork.package.jsonan older APM wrote carries only a lockfile hash, and today's locked render does not produce it. Install and update now keep it and name it, and uninstall stops naming it. The manual fix is to delete it and rerun.test_hook_js_sidecar_lifecycle_contract.pynow asserts this flow.Decision for Daniel
spec(normative, pending Daniel)) addsreq-lk-024(Section 5.2, consumer MUST): a lockfile-driven deletion needs a matching local deployment record, or byte equality with the locked version's render. A lockfile hash alone never authorizes it. Unproven or differing files are kept and named.apm-spec-waiver:with an informative note in Section 10.7.Spec renumbering at merge
Renumbered from the provisional 0.1.76 to 0.1.69, the next free slot after main's 0.1.68 (confirmed by the 0.37 Stream H lead; #4006 renumbers instead). The statement count is 149 (144 MUST, 5 SHOULD), and CONFORMANCE.{md,json} is regenerated. Recheck the slot only if another amendment lands first.
Docs re-home after #3996
mainlayout)enterprise/security.md, "Lockfile cleanup authority" paragraphenterprise/security.md(or under "Drift and integrity" inreference/lockfile-spec.md).reference/cli/install.md, "Stale-file cleanup" bulletreference/cli/update.md, receipt-less update paragraphreference/cli/uninstall.md, retained-paths paragraphreference/cli/prune.md, cleanup paragraphpackages/apm-guide/.apm/skills/apm-usage/commands.mdReview folds (c9b13584 on babed8a)
verdictfalls through to the render on a receipt mismatchtest_adopted_after_pull_then_uninstall_uses_the_locked_renderresolve_audit_targets(include_recorded=True)viaReplayConfig.include_recorded_targets); duplicate inline lines removed;apm updaterenders install diagnosticstest_dropped_target_is_proven_by_the_render_of_recorded_targets; update test asserts the kept file is named oncetest_render_evidence_is_per_package[other-package],[removed-package]DeploymentEvidenceis scope-bound;remove_synced_filespasses itsuser_scopetest_synced_removal_retires_receipts_in_the_evidence_scopePre-merge
mainafter #3701 (1/2) record deployment receipts for every file primitive #4023 merged; rebased onto main (including plan/apply P1: one orphan removal owner (#4011) #4021). CI runs on this base.git merge-tree --write-tree), PR2 head vsorigin/main: 0 conflicts. Vsorigin/danielmeppiel-native-hook-delivery: 5, all generated or append-only (CHANGELOG.md, CONFORMANCE.json, CONFORMANCE.md,specs/openapm-v0.1.mdAppendix C/D, andenterprise/security.mdfrom the docs: zero-based redesign around the agent supply chain #3996 rewrite).Issue and approved scope
Issue: Fixes #3701
Human scope-approval comment: #3701 (comment) (apm-scope:v1, record-present via
scripts/governance/eligibility.cjs)Does this PR complete the issue? Yes, together with #4023 (already merged).
Type of change
Testing
Local CI-mirror evidence. CI does not run on this stacked PR, and the sandbox has 2 CPUs.
uv run --extra dev ruff checkandruff format --checkonsrc/ tests/ scripts/...pylint --enable=R0801 --min-similarity-lines=10bash scripts/lint-architecture-boundaries.sh;tests/integration/test_architecture_materialization_receipts.pybash scripts/lint-auth-signals.shpytest tests/unit -n 3(excluding the sandbox-environment files that also fail onmain)APM_BINARY_PATH=.venv/bin/apm pytest tests/integration/test_cleanup_deployment_evidence_lifecycle.pyAPM_E2E_TESTS=1 pytest -m 'lifecycle_smoke and not lifecycle_merge_group' tests/integrationorigin/mainin this sandbox (9test_marketplace_explicit_refresh_lifecycle, 10test_unix_installer_path_integration, 1test_hook_event_native_lifecycle::test_claude_project_hook_runs_from_external_cwd). The other 4 were real and are fixed (test_hook_js_sidecar_lifecycle_contractx3,test_stale_cleanup_hash_authority_lifecyclex1): rerun 6 passed.pytest tests/spec_conformance;python -m tests.spec_conformance.orphan_checkThe new lifecycle tests run on committed-output clones with a fresh HOME and APM_HOME, and assert that no receipts exist before each command. They cover:
apm_modulespresent (source unreachable), with only the source reachable, and with neither (exits 1 naming the files, declaration kept);APM_COPILOT_COWORK_SKILLS_DIRfixture: a receipt removes the file; receipt-less or edited files are kept and named).Changelog
## [Unreleased]/ Breaking changes and upgrade notes, ending(closes #3701, #4049).Spec conformance (OpenAPM v0.1)
req-lk-024anchor, prose and Appendix C row (proposed 0.1.69).openapm-v0.1.requirements.yml.tests/spec_conformance/test_deletion_evidence_reqs.py(@pytest.mark.req("req-lk-024")).