Repository navigation
test(lifecycle): fix main's T3 lifecycle reds (user-scope lock park, E01 golden, #4353/#4356 cells) - #4361
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 20, 2026
Conversation
…r hook-approval-pins; strict cells #4353 #4356 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 15:03
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-t3-main-red-fix
branch
November 20, 2026 15:07
Merged
5 of 10 tasks
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical issues break binary concurrency synchronization, disable the hermetic network guard, and cause false lifecycle-oracle failures and a documentation expectation mismatch.
5 open issues
Update the documented check count with the runtime expectation · New Exempt newly created report ancestor directories · New Add a binary synchronization point for user-scope installs · New Preserve the network guard when composing the parking startup hook · New Match the requested report by its full resolved path · New
What changed in this PR
This PR repairs lifecycle test infrastructure and expectations after recent integrity and audit changes, without changing production behavior.
Changes:
- Adds an engine-driver lock barrier for concurrency tests.
- Tracks known integrity failures under #4353 and #4356, while restoring the fixed lock-edit audit case as a required witness.
- Refreshes E01 audit expectations and adjusts I7 to exclude explicitly requested reports.
| File | Description |
|---|---|
tests/quality/generated_obligations.json |
Updates required witnesses and tracked failing cells. |
tests/lifecycle/security/test_integrity.py |
Revises integrity expectations and strict expected failures. |
tests/lifecycle/scenarios/test_concurrency.py |
Adds lock-acquisition parking for the engine driver. |
tests/lifecycle/oracles.py |
Excludes requested report files from failure-state checks. |
tests/lifecycle/journeys/goldens/E01/03.txt |
Adds the hook-approval check and updates the passing count. |
tests/lifecycle/journeys/enterprise/E01-org-policy-rollout.yaml |
Updates audit output expectations and tracks the missing failure diagnostic. |
Review effort: Balanced
| - "| [!] | dependency-allowlist | 1 dependency(ies) not in allow list (enforcement: warn) |" | ||
| - "..." | ||
| - "12 check(s) passed; 1 reports violations under 'enforcement: warn' and fail once the policy switches to block." | ||
| - "13 check(s) passed; 1 reports violations under 'enforcement: warn' and fail once the policy switches to block." |
| for path in _changed_paths(before.artifacts, after.artifacts) | ||
| if path.split(":", 1)[1].rsplit("/", 1)[-1] not in {"apm.yml", "apm.lock.yaml"} | ||
| and not any(_bookkeeping(path.split(":", 1)[1], prefix) for prefix in _FAILURE_BOOKKEEPING) | ||
| and path.split(":", 1)[1] != report |
| self.ready = self.dir / "ready" | ||
| self.release = self.dir / "release" | ||
| self.started = self.dir / "contender-started" | ||
| park_in_git = driver.selected_driver() == "binary" |
Comment on lines
+174
to
+175
| world.env["PYTHONPATH"] = os.pathsep.join( | ||
| p for p in (str(hook), world.env.get("PYTHONPATH", "")) if p |
| for path in _changed_paths(before.artifacts, after.artifacts) | ||
| if path.split(":", 1)[1].rsplit("/", 1)[-1] not in {"apm.yml", "apm.lock.yaml"} | ||
| and not any(_bookkeeping(path.split(":", 1)[1], prefix) for prefix in _FAILURE_BOOKKEEPING) | ||
| and path.split(":", 1)[1] != report |
Merged
6 of 10 tasks
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
Fixes the lifecycle reds on main from the T3 tables. Each change follows the steward's rulings.
src/apm_cli/commands/install.py:1479passesacquire_lock=not dry_runandinstall/transaction.py:105callsacquire_lifecycle_lock()for every scope. The harness parked the holder on policy discovery'sgit remote get-url.core/scope.pypolicy_discovery_uses_git_remote()now returns False for a user-scope root, so at-gthe holder never parked. The barrier is now deterministic: with the engine driver, a one-shotsitecustomizewrapslocking.acquire_lifecycle_lock, and the first holder parks right after it acquires the lock until the test writes a release file. The binary driver keeps the git park.I|git-content_hash|install|lock-edited(and frozen lock-edited, install/frozen disk-or-cache). Install correctly fails closed but leaves fetched bytes inapm_modules. These are strict cells on new issue apm install leaves fetched bytes in apm_modules when it fails closed on a content hash mismatch #4353.I|git-content_hash|audit-ci|disk-or-cache.audit --cire-verifies from the locked source and exits 0, whileinstall --frozenrefuses the same edited cached copy. This is a strict cell on new issue audit --ci passes an edited cached package copy that install --frozen refuses #4356 (I3 parity).I|git-content_hash|audit-ci|lock-editednow passes (Trust and integrity consistency: audit --ci and install --frozen agree on locked content hashes #4271), so its pending xfail is dropped and it is a required witness.audit --ciprints the new passinghook-approval-pinscheck (Trust and integrity consistency: install --frozen and audit --ci agree on executable approvals #4272), so 12 checks become 13. I regenerated the golden; the diff is only that row and the count:With step 3 fixed, E01 step 4 (
audit --ci -o apm.sarif, exit 1) reached the family oracle. I7 no longer counts the report file a command was asked to write (-o/--output) as state a failure changed. Step 4's existing #4224 defect ("exits 1 without an error line") also gets its I7 cell, next to its O5 cell.Issue and approved scope
Issue: Refs #4107 (security tables), Refs #4110 (journeys), Refs #4106 (concurrency)
Human scope-approval comment: steward rulings relayed by the 0.37 Stream T lead (golden regeneration approved on the diff above; strict cell on #4353).
Does this PR complete the issue, or what remains? It is partial. Some non-smoke integrity rows on main remain red in the same classes and are being triaged separately.
Type of change
Testing
Results (local, off main 84060d7):
tests/quality/test_generated_obligations.py: 19 passed. The witness registry is regenerated (922 required, 106 known failing).test_lifecycle_driver,test_journey_indexandtest_test_taxonomy: 55 passed.Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)