Repository navigation
test(lifecycle): corpus train 7 (policy promises, strict Known #4784/#2824/#4852, v0.38 sweep) - #4877
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved test gaps can hide security and deployment regressions, and the closed-issue snapshot conflicts with a remaining strict xfail, causing a consistency test to fail.
7 open issues
Require the org-policy denial diagnostic in the test · New Exclude DRYRUN writes from the home-record allowance · New Require the Claude hook to run before asserting Codex failure · New Verify fresh install refusal leaves deployed state unchanged · New Restrict signed xfails to exact known residue differences · New Use a hermetic recorder to verify all plaintext registry requests · New Resolve closed issue #4742 references in the same change · New
What changed in this PR
This stacked lifecycle-test train expands APM's promise-driven regression coverage for the v0.38 cycle and issues #4564/#4565. It builds on trains 5 and 6 without changing production behavior.
Changes:
- Adds lifecycle scenarios for deployment history, policy enforcement, hook approvals, registry URLs and write-free repeated installs.
- Extends test-world fixtures, machine coverage and generator rules, including strict known-failure cases.
- Refreshes replay expectations, CI duration estimates and quality-gate coverage.
| File | Description |
|---|---|
tests/quality/test_scenario_refusal_credit.py |
Accepts lockfile and owner-based refusal credits. |
tests/quality/test_oracle_compile_record.py |
Adds compile home-record allowance controls. |
tests/quality/known_cell_issue_states.json |
Refreshes issue states for known failures. |
tests/lifecycle/world/test_world.py |
Updates user-scope canvas expectations. |
tests/lifecycle/world/services.py |
Expands dependency-denial fixtures. |
tests/lifecycle/world/registry.py |
Publishes additional registry packages. |
tests/lifecycle/world/packages.py |
Adds mixed-content and native executable fixtures. |
tests/lifecycle/world/builder.py |
Serves and bundles the additional fixtures. |
tests/lifecycle/snapshot.py |
Adds file stamps to detect identical-byte rewrites. |
tests/lifecycle/security/test_registry_url_local_host.py |
Tests HTTP registry host restrictions. |
tests/lifecycle/security/test_incremental_deploy_differential.py |
Compares incremental and fresh deployments. |
tests/lifecycle/security/test_hook_bundle_approval_pin.py |
Tests approval invalidation after bundle changes. |
tests/lifecycle/scenarios/test_policy_pairs.py |
Expands lock-policy credits and shares source setup. |
tests/lifecycle/scenarios/test_pack_lock_states.py |
Tests packing with stale and newer-generator locks. |
tests/lifecycle/scenarios/test_ownership_siblings.py |
Adds closed-gate and inline-MCP dry-run coverage. |
tests/lifecycle/scenarios/test_mcp_write_receipts.py |
Adds the lockless runtime-retargeting known case. |
tests/lifecycle/scenarios/test_mcp_ownership_history.py |
Tests current and legacy MCP ownership histories. |
tests/lifecycle/scenarios/test_host_identity_pairs.py |
Checks host, port and proxy lock identities. |
tests/lifecycle/scenarios/test_hook_plugin_root.py |
Tests hook access to bundled plugin files. |
tests/lifecycle/scenarios/test_history_upgrade.py |
Strengthens successful target-history witnesses. |
tests/lifecycle/scenarios/test_file_routing.py |
Checks per-target routing and Claude compiled instructions. |
tests/lifecycle/scenarios/test_deployed_absent.py |
Covers missing deployments across lifecycle operations. |
tests/lifecycle/scenarios/test_converged_install_writes_nothing.py |
Detects writes during repeated converged installs. |
tests/lifecycle/scenarios/test_compile_source_files.py |
Checks remote file preservation during compilation. |
tests/lifecycle/scenarios/_sources.py |
Shares package-source scenario setup. |
tests/lifecycle/replay/rows/generated_cover-16-source-refusals.yaml |
Adds inline-MCP dry-run replay credits. |
tests/lifecycle/replay/rows/generated_cover-08-exec-git-single-deny-mcp.yaml |
Removes vacuous bin packing credit. |
tests/lifecycle/replay/rows/generated_cover-06-exec-git-single-approve-mcp.yaml |
Refreshes row ID and bin packing credits. |
tests/lifecycle/replay/rows/generated_cover-05-exec-lsp-git-single-deny-mcp.yaml |
Aligns the generated row ID. |
tests/lifecycle/replay/rows/generated_cover-03-skill-exec-git-multi-unapproved-mcp.yaml |
Removes vacuous bin operation credits. |
tests/lifecycle/replay/rows/generated_cover-02-skill-exec-canvas-local-multi-deny-mcp.yaml |
Removes bin audit and prune credits. |
tests/lifecycle/replay/rows/generated_cover-01-skill-exec-lsp-canvas-git-single-approve-mcp.yaml |
Removes unsupported bin audit and prune credits. |
tests/lifecycle/oracles.py |
Allows the compile-specific home record. |
tests/lifecycle/machines/test_m_gate.py |
Extends gate coverage and hook reapproval checks. |
tests/lifecycle/machines/_gate_matrix.py |
Strengthens gate-state and instruction-render evidence. |
tests/lifecycle/machines/_gate_bin.py |
Adds user-scope dependency-denial known cells. |
tests/lifecycle/journeys/enterprise/E03-proxy-only-air-gapped.yaml |
Updates the fixture marketplace count. |
tests/lifecycle/journeys/consumer/J09-switch-harness.yaml |
Updates target-switch cleanup expectations. |
tests/lifecycle/journeys/consumer/J08-uninstall-cleanup.yaml |
Updates instruction cleanup expectations. |
tests/lifecycle/generator/witnesses.py |
Prefers passing witnesses and registers new scenarios. |
tests/lifecycle/generator/test_rule_evidence_cli.py |
Adds live evidence for first-party MCP rules. |
tests/lifecycle/generator/test_generator_rules.py |
Tests exclusions, predicate pins and witness selection. |
tests/lifecycle/generator/rules.py |
Defines additional exclusions and MCP mappings. |
tests/lifecycle/generator/emit.py |
Corrects target-history routing and emits policy pins. |
tests/lifecycle/generator/covering.py |
Generates inline-MCP dry-run steps. |
tests/lifecycle/generator/bin_pin.py |
Generalizes predicate hashing for policy rules. |
tests/integration/test_compile_dependency_policy_lifecycle.py |
Adds run and preview dependency-policy coverage. |
.github/workflows/merge-train.yml |
Runs compile-record quality checks. |
.github/workflows/main-architecture-ratchets.yml |
Adds post-merge compile-record checks. |
.github/workflows/ci.yml |
Adds compile-record checks to CI. |
.github/ci-durations/linux-x86_64.json |
Updates lifecycle shard duration estimates. |
Review effort: Balanced
59eb488 to
81aaff4
Compare
There was a problem hiding this comment.
🟡 Changes recommended
A required content-types test expects the wrong diagnostic, while assertion gaps can hide unauthorized egress, hook regressions, and out-of-scope filesystem writes.
12 open issues
Expect the unverifiable-content diagnostic for the git dependency · New Limit the exception to the exact regular record file · New Test warning-mode hook deployment with the executable gate disabled · New Verify the specific missing-skill failure before marking it known · New Require the stale Cursor entry to be removed · New Resolve closed issue #4742 references in the same change Use a hermetic recorder to verify all plaintext registry requests Restrict signed xfails to exact known residue differences Verify fresh install refusal leaves deployed state unchanged Require the Claude hook to run before asserting Codex failure Exclude DRYRUN writes from the home-record allowance Require the org-policy denial diagnostic in the test
Review effort: Balanced
81aaff4 to
266d163
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The content-policy test expects the wrong diagnostic on the fail-closed path, while several controls and request-observation checks can miss regressions in the behavior they intend to verify.
13 open issues
Expect the unverifiable-content diagnostic for the git dependency Use the modeled bundle name for approval and deployment lookups · New Require the stale Cursor entry to be removed Verify the specific missing-skill failure before marking it known Test warning-mode hook deployment with the executable gate disabled Limit the exception to the exact regular record file Resolve closed issue #4742 references in the same change Use a hermetic recorder to verify all plaintext registry requests Restrict signed xfails to exact known residue differences Verify fresh install refusal leaves deployed state unchanged Require the Claude hook to run before asserting Codex failure Exclude DRYRUN writes from the home-record allowance Require the org-policy denial diagnostic in the test
Review effort: Balanced
266d163 to
80d22c5
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
A critical lifecycle assertion expects the wrong missing-content diagnostic, while egress checks, hook controls, and filesystem allowances can miss regressions.
13 open issues
Expect the unverifiable-content diagnostic for the git dependency Use the modeled bundle name for approval and deployment lookups Require the stale Cursor entry to be removed Verify the specific missing-skill failure before marking it known Test warning-mode hook deployment with the executable gate disabled Limit the exception to the exact regular record file Resolve closed issue #4742 references in the same change Use a hermetic recorder to verify all plaintext registry requests Restrict signed xfails to exact known residue differences Verify fresh install refusal leaves deployed state unchanged Require the Claude hook to run before asserting Codex failure Exclude DRYRUN writes from the home-record allowance Require the org-policy denial diagnostic in the test
Review effort: Balanced
80d22c5 to
740739c
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Tests can pass despite failed updates or missing policy warnings, and overly broad scope filtering removes reachable project-level bin obligations.
3 open issues
13 resolved since last review
Expect the unverifiable-content diagnostic for the git dependency Use the modeled bundle name for approval and deployment lookups Require the stale Cursor entry to be removed Verify the specific missing-skill failure before marking it known Test warning-mode hook deployment with the executable gate disabled Limit the exception to the exact regular record file Resolve closed issue #4742 references in the same change Use a hermetic recorder to verify all plaintext registry requests Restrict signed xfails to exact known residue differences Verify fresh install refusal leaves deployed state unchanged Require the Claude hook to run before asserting Codex failure Exclude DRYRUN writes from the home-record allowance Require the org-policy denial diagnostic in the test
Review effort: Balanced
740739c to
77c3783
Compare
77c3783 to
7f4e9ff
Compare
7f4e9ff to
18b564c
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The lifecycle tests can miss metadata-preserving overwrites, accept unsuccessful control exits, and pass refusal cases despite partial installs or overwritten handwritten files.
2 open issues
5 resolved since last review
Verify install refusal leaves manifest, lockfile, and deployed files unchanged Reject successful hooks that omit skill text Require update success before asserting the hook is parked Assert the self-defined policy warning and its p-inline subject Keep scope-free bin cells eligible for project-policy witnesses
Review effort: Balanced
…C, v0.38 sweep) Stacked on corpus train 6 (699e837) and merged with main fc1866b. Cars: - policy promise rows in test_policy_promises.py with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files, fail_on_drift, pinned constraint, explicit includes, transitive MCP trust, content types); the #4826 install refusal is required now that #4853 fixed it on main. - an MCP entry of a runtime no longer targeted (#4784) takes main's required row (its fix landed); a strict known cell for a codex hook copy that cannot read its plugin's skill (#2824). - lane C incremental deploy differential (kit from #4849). - v0.38.0 sweep: compile dependency-policy run and preview (#4734), a converged install writes nothing (#4790), hook bundle approval pin (#4688), a registry URL on a local host (#4521). - burndown: a denied local bundle is refused unwritten (#4646), present- provenance-unknown x denied-executable (#4767), audit --ci judges locked content with apm_modules gone, merged-hook entry detection end to end (#4798). Review folds: I5 admits the compile record only as a regular file and its newly created ancestor directories; run/preview, content-types, plugin-root hook, lane C fresh twin, source-machine bundle identity, self_defined warn and hook bundle update oracles tightened; the self_defined warn row is a real warn-mode policy now and is strict known on #5070; the #4826 refusal row checks rollback; no-write stamps add the POSIX change time. U-USER-SCOPE-ORG-POLICY removes explicit user-scope cells only: the four scope-free T1 bin x denied-dependency cells are required, witnessed by the project matrix refusals. Ledger regenerated (baseline 3, known-failing 1, required 2423). Co-authored-by: Copilot App <[email protected]>
18b564c to
11714dd
Compare
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…le corpus Regenerated against main (#4877, #4727, #5071); the #4981 named removals match the 123 bin cells the filter demotes (two new project gate-matrix cells: lock and mcp-install under a denied dependency). Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…#4784) The server stays declared, cursor leaves the targets and apm.lock.yaml is deleted: install must retire the cursor entry or keep and report it, and the report must persist through audit --ci and later installs. Today it keeps it silently. Adapted from microsoft#4877's strict Known cell. Co-authored-by: copilot-swe-agent[bot] <[email protected]>



Description
Corpus train 7. Train 6 (#4814) landed at 26a4025 and is merged in. It contains train 6's head 699e837 and main fc1866b and re-merges #4814's final head with one regenerate before it goes to the desk (H7). Until #4814 merges, this diff includes it.
test_policy_promises.py: org-policy promise rows with a control each (scripts deny, self_defined, max_depth, require_resolution, source_attribution, unmanaged_files (the #4826 install refusal is now required: #4853 fixed it on main), fail_on_drift, pinned constraint, explicit includes). Per the QL ruling, rows without a filed-issue cite stay off this train and land with their fix PRs (#4827, #4838).test_hook_plugin_root.py)test_incremental_deploy_differential.py; #4852 was fixed by #4862, so its Known is dropped, and the kit_deploy_diff.pycomes from main (#4849 landed)New cells in this train are scenario- and security-module promise rows outside the generated factor space, plus the four scope-free T1 bin x denied-dependency cells, now required through the project matrix refusal (U-USER-SCOPE-ORG-POLICY applies to explicit user-scope cells only). Baseline left: audit x bin x none, plus approve-deny and uninstall x bin x denied-dependency (named #3703 removals from #4814). Strict Known cells cite open issues only (checked live, L15; the full list is
tests/quality/known_cell_issue_states.json); new in this train: #5070 (install reports no finding for a self-defined MCP server undermcp.self_defined: warn).Review follow-up: a hermetic plain-http recorder for the registry URL rows is #5055.
Issue and approved scope
Issue: Refs #4564 (0.38 burn-down), Refs #4565 (epic)
Human scope-approval comment: #4564 (comment)
Does not complete the epic; it adds promise rows and strict Known cells the generated corpus has no factor for yet.
Type of change
Testing
CI verifies this head. Under host rule 17(g), local checks were ruff 0.15.12 on changed files and the guarded
python -m tests.lifecycle.generator --check,tests.lifecycle.witnessesandtests.quality.known_cell_issues --check-live, all clean. The car authors verified their rows on scratch lifecycle runs (45083674997, 45088453607, 45086039207). CI's Lint job is the lint mirror.Changelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.