Repository navigation
fix(frozen): frozen and audit fail on a stale exec_status (#4053) - #4065
Merged
Daniel Meppiel (danielmeppiel) merged 505 commits intoNov 21, 2026
Merged
Daniel Meppiel (danielmeppiel) merged 505 commits into
Daniel Meppiel (danielmeppiel) merged 505 commits into
Conversation
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-stale-exec-status-4053
branch
3 times, most recently
from
November 20, 2026 04:23
0e9f6c4 to
2514e1d
Compare
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-retired-hook-4043
branch
from
November 20, 2026 08:03
e96841b to
d6f545f
Compare
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-stale-exec-status-4053
branch
from
November 20, 2026 08:04
2514e1d to
2c8bae2
Compare
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-retired-hook-4043
branch
from
November 20, 2026 08:15
d6f545f to
51e6e34
Compare
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-stale-exec-status-4053
branch
from
November 20, 2026 08:15
2c8bae2 to
dc561d1
Compare
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-retired-hook-4043
branch
from
November 20, 2026 08:24
51e6e34 to
fa87f1b
Compare
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-stale-exec-status-4053
branch
from
November 20, 2026 08:25
dc561d1 to
264e7a6
Compare
This was referenced Nov 20, 2026
Merged
Trust and integrity consistency: install --frozen and audit --ci agree on executable approvals
#4188
Closed
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-frozen-retired-hook-4043
branch
3 times, most recently
from
November 20, 2026 11:01
a9679af to
4c0cf56
Compare
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 20, 2026 11:46
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 11:46
# Conflicts: # .apm/architecture/owners/transport-auth-platform.json # docs/src/content/docs/enterprise/registry-proxy.md # docs/src/content/docs/reference/environment-variables.md # tests/unit/test_artifactory_support.py
…ll-evidence-refusal
Package validation now counts dependencies.lsp like apm and mcp when it accepts an apm.yml without .apm/ as a dependency-only package. Uninstalling another package no longer fails its survivor preflight on an LSP-only package (gated and approved, ungated, or denied), and an LSP-only package installs from git as it does from a local path. Fixes #4161 Fixes #4214 Fixes #4215 Fixes #4257 Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Main replaced security.executables.project_manifest_path with the scope owner's scope_manifest_path (1cfd9ac). Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ns and goldens H2 moved code the generator rules cite, so their line citations follow it. A reinstall adopts rendered commands, so the J01/J02/J03 transcripts say adopted and no longer repeat the dropped-key warnings; the strict cells H2 fixes go (#4182 frozen step, #4197), and the step-2 unpinned notice is tracked under #4183. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
The frozen replay now asserts the printed recovery for kept files: move them aside, then 'apm install' (or --force). Steward audit. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…loyment evidence (#4360) Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/quality/lifecycle_obligations.json
…plugin files before writing Co-authored-by: Copilot App <[email protected]>
…cept path Co-authored-by: Copilot App <[email protected]>
…included (#4053) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…kup line and frozen trust notice print once (#4242, #4244, #4256) Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/conftest.py # tests/fixtures/lifecycle_bug_ledger.json # tests/utils/lifecycle_evidence.py
…er match without a local receipt; cleanup retains files the install kept Co-authored-by: Copilot App <[email protected]>
…ns; name every credential tried Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
…cripts notice once per command Co-authored-by: Copilot App <[email protected]>
…4370 Co-authored-by: Copilot App <[email protected]>
#4258 makes kept a required keyword (explicit kept=() at non-install callers); #4394's frozen_withdrawal caller predates that and relied on the old default. Co-authored-by: Copilot App <[email protected]>
python -m tests.lifecycle.witnesses --write (collection only): 8 journey cells move from known-failing to required now that their fixes are in. Co-authored-by: Copilot App <[email protected]>
python -m tests.lifecycle.witnesses --write (collection only): journey cells whose fixes are in move from known-failing to required. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/quality/generated_obligations.json
…ead of re-recording it Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…e refusing (#4309) Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…_status (#4053) Co-authored-by: Copilot App <[email protected]>
At user scope the install gate discovers org policy from APM_HOME, never from the HOME repository's remote (#4087). The frozen stale-decision check and the retired-hook naming discovered from the deploy root (HOME), so a HOME remote's org-deny made --frozen refuse a hook the gate still deployed (GATE user spine). Both now discover from manifest_root, as the gate does. E01 step 4's check count follows exec-status-current. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…_status (#4053) Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…3 checks) #4065 pinned the exact ordered baseline; #4493 adds native-mcp-ownership after config-consistency. Interaction fix, no check dropped. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-frozen-stale-exec-status-4053
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
TL;DR. When
apm denyor an org policy tightening changes the executables gate's decision for a locked package after the last plain install,apm install --frozenandapm audit --ciboth exited 0 with a staleexec_status. On merged-config targets (Claudesettings.json) no recorded file goes missing, so the #4054 presence check cannot see it. Both commands now exit 1, naming the package with its recorded and current status and the repair. Both route through the existing staleness owner ininstall/exec_gate.py, the oneapm updatealready uses.Important
Stacked on #4054 (base
danielmeppiel-frozen-retired-hook-4043). CI does not run on a non-mainbase, so the evidence below is the local CI mirror.Problem.
lock_exec_decisions_stale(used byapm update) knew a recorded decision was stale but only returned a bool, and neither frozen nor audit asked it.settings.jsonpresent with no drift, so both passed.Approach.
install/exec_gate.py: newstale_exec_decisions()returns(StaleExecDecision[], indeterminate);lock_exec_decisions_staleis now a thin bool over it (first_only=True), soapm updatekeeps its exact answersapm update's policy-outcome handling moves into the owner asexec_policy_from_discovery()/discovered_exec_policy(deploy_root). Frozen reuses it; audit wraps its single per-run discovery with itInstallService._enforce_frozen_no_rewrite: claims -> missing files (#4043) -> stale exec_status -> hashesexec-status-current(afterdeployed-files-present), fed the audit run's single policy fetchPOLICY_RESOLUTION_FAILURE_OUTCOMES, e.g.cache_miss_fetch_fail) raisesExecPolicyUnavailable, so the answer is indeterminate and is reported as "not verified" rather than failed. The same applies to an unreadable package.apm updatestill treats indeterminate as stale--no-policyexec-status-currentis not evaluated (reported "not verified") when--no-policyis given without--policy, because the gate's decision depends on org policy that audit was told not to read. frozen: evaluated with no org policy, matching the gate this same--no-policyinstall just ran, so it judges what was actually deployed<package>: recorded deployed, now deniedplusrun 'apm install' without --frozen ... then commit apm.lock.yamlDeny still wins (retirement proceeds as today) and frozen never writes
apm.lock.yaml(req-lk-006).Implementation
install/exec_gate.pyStaleExecDecision,discovered_exec_policy,stale_exec_decisions;lock_exec_decisions_staledelegatescommands/update.pydiscovered_exec_policy(logic unchanged)install/service.py_frozen_stale_exec_decisions(); shared_FROZEN_LOCK_REPAIR_TIPpolicy/ci_checks.py,commands/audit.py_check_exec_status_current;run_baseline_checks(policy_provider=...)scripts/architecture_linter/checks/install_frozen_and_audit.pystale_exec_decisionsand audit's provider to useexec_policy_from_discovery, and rejectsrecorded_exec_status_is_stale(/current_exec_decision(/exec_trust_context_for_project(in eitherscripts/architecture_linter/checks/install_lsp_plugin.pystale_exec_decisionstest_frozen_stale_exec_status_lifecycle.py(incl.--no-policyand no-cache-unreachable cases);req-lk-006conformance case; 4 mutation cases; baseline check counts 9->10 / 10->11exec-status-current), deny retirement noteTrade-offs
apm audit --cireports 11 checks instead of 10; three tests that pinned the count were updated.replay_policy, which returnsNoneboth under--no-policyand when discovery fails without a cache. That decided as if no org policy existed, so after an orgdeny_allaudit failed with a repair that never converges, and a tightened but unreachable policy passed silently. Audit now skips the check under--no-policyand reports a resolution failure as indeterminate. I chose skip over a partial local-only judgment because org policy is not tighten-only (recommendis default-allow), so a local-only decision can be wrong in either direction.apm updateand the next plain install.apm deny --userlayers in audit,apm updatereconciliation,exec_statusvocabulary, spec amendments.Benefits
install --frozen,audit --ciandapm updateshare one staleness test (stale_exec_decisions).Validation
New lifecycle test on
main67936cd (CLI version line0.36.1 (67936cd7d)): both revocations fail at the frozen step, and the controls pass:The two review cases (
--no-policy; discovery failing with no cache) fail on0e9f6c43dwithexec-status-current ... recorded denied, now deployed, and pass here.On this branch (head
2514e1d89):APM_BINARY_PATH=.venv/bin/apm pytest tests/integration/test_frozen_stale_exec_status_lifecycle.py tests/integration/test_executables_deny_retires_hooks_lifecycle.pytests/unit/policy,tests/unit/commands,test_frozen.py,test_replay_exec_allow_map.py,test_audit_policy_command.py,test_lockfile_reqs.py)pytest tests/integration/test_architecture_owner_rule_mutations.py -k frozen_and_audit_sharepytest tests/unit tests/spec_conformance tests/integration -k "frozen or audit or deny or executables or gate or update or approve or policy or exec"test_executables.pycases are order-flaky and pass in isolationlint-auth-signals.sh,lint-architecture-boundaries.shorphan_check,gen_statement(committed), Mode B vsmainand vs stack baseScenario evidence
apm deny/ orgdeny_all: frozen exits 1 naming the package, recorded and current status and the repair; hook gone fromsettings.json; lock bytes unchanged; audit exits 1test_stale_exec_status_fails_frozen_and_audit_until_install[deny|org-tightening]denied; frozen and audit both exit 0test_unchanged_exec_decision_keeps_frozen_and_audit_greendeny_allrecorded, thenaudit --ci --no-policy --no-drift: not evaluated, exit 0test_no_policy_audit_does_not_judge_org_derived_decisionsdeny_allrecorded, cache removed, policy source unreachable: not staletest_unreachable_policy_without_cache_is_not_a_stale_decisiontest_frozen_fails_when_a_gated_hook_retires_but_the_lock_still_claims_ittest_frozen_fails_rather_than_keep_a_stale_executables_decision(req-lk-006)How to test
APM_BINARY_PATH=$PWD/.venv/bin/apm uv run --extra dev pytest tests/integration/test_frozen_stale_exec_status_lifecycle.pyinstall/service.pyreplacestale_exec_decisions(with any local helper;bash scripts/lint-architecture-boundaries.shfails.Pre-merge
mainafter plan/apply P3: frozen flag read only by its owner (#4012) #4016 and fix(frozen): frozen fails when a gated hook was retired but the lock still claims it (#4043) #4054 merge._enforce_frozen_no_rewrite); keep the order claims -> missing files -> stale exec_status -> hashes.Issue and approved scope
Issue: Fixes #4053
Human scope-approval comment: #4053 (comment)
Does this PR complete the issue, or what remains? Completes it.
Type of change
Testing
Changelog
## [Unreleased]->### Fixed.Spec conformance (OpenAPM v0.1)
@pytest.mark.req("req-lk-006")test added undertests/spec_conformance/.CONFORMANCE.{md,json}regenerated and committed.Co-authored-by: Copilot [email protected]