Repository navigation
test(lifecycle): corpus train 6 (T-1 closure, HOSTID/offline, b9; baseline -> 4) - #4814
Conversation
…evel; pack refusal covers bin/ A deny that arrives in apm.yml after the lockfile is lost retires the receipted hook like a revoke does; credit LOCK=absent at each closed gate level. An org dependency deny refuses pack for every primitive a package ships, bin/ included. Co-authored-by: Copilot App <[email protected]> (cherry picked from commit a9c953b)
…ndition (AQ003) Co-authored-by: Copilot App <[email protected]> (cherry picked from commit b1e325b)
…ve, bundle ops) - route the T-2 lane through scenario credits; existing T-6e credits now witness 5 DEPLOYED=clean / GATE=allowed pairs - new scenarios/test_source_pairs.py: canvas from git and a git marketplace, canvas and LSP from the package registry, a native plugin's hook and LSP server, compile and lock over a local bundle (scenario-local publications; no shared world change) - _sources.py serves any package from each source Co-authored-by: Copilot App <[email protected]>
…nario rows Co-authored-by: Copilot App <[email protected]>
…lace hosts New scenarios/test_host_identity_pairs.py: the lock row records the exact host (bare github.com, a GHES host with a port, the registry proxy) and audit replays it; a newer-generator lock is refused for each (declared NEWER_LOCK keys); a git marketplace plugin records the proxy or a ported host it was fetched from. Co-authored-by: Copilot App <[email protected]>
…y witnesses Train 5's M-SOURCE b7 earns canvas/LSP from git, catalog and registry and the native plugin's hook and LSP, so the scenario copies go; the module keeps compile and lock over a local bundle (test_local_bundle_commands.py). Co-authored-by: Copilot App <[email protected]>
…ready witnesses test_m_source (T-2 b8) already proves lock and compile keep every local bundle's records, so this module credited no new cell. Regenerated on train 5 (e1e9faf): 14 cells flip (10 HOSTID, 4 offline sources), baseline 37 -> 23. Co-authored-by: Copilot App <[email protected]>
…primitive (T-2)
The world's remote packages ship skills only, so each row serves its own
package from a scenario-local git repository: an instruction package from
git and from a git catalog, and a native Claude plugin with an agent. compile
leaves the lock bytes and every marked deployed file unchanged, and the
instruction stays under copilot's instruction root and in the lock.
Credits T3|OP=compile|SRC={git, marketplace-git, native-plugin}|PRIM=other-file.
Both T-2 scenario modules join Lifecycle Smoke so PR CI runs them.
Co-authored-by: Copilot App <[email protected]>
… not registered claude_plugins/admission.py registers a plugin natively only at user scope; at project scope the plugin's agents/ deploy under .claude/agents and are recorded in the lock like any primitive. The native-plugin row now asserts that deployed agent instead of a native_plugin lock record. Co-authored-by: Copilot App <[email protected]>
…ill, hook, canvas, LSP, instruction) World: p-kit is published to the package registry and p-pack is packed as a local bundle (distinct names: an installed bundle owns its LSP server name). M-SOURCE declares both; the model tracks p-pack's surfaces (_MODELED_BUNDLES): its skill deploys on the bundle install, its executables only with an approval of that exact bundle content. preview_names reads the paths a local-bundle dry run lists. Spine green on the real CLI (55 min under load); obligation gates 92 passed. Ledger vs b8: baseline 37 -> 25 (12 T-2 T3). Refs #4564 Refs #4565 Co-authored-by: Copilot App <[email protected]>
… deny cells Org policy does not govern user-scope (-g) installs (#3703, a 0.39 design gap, documented in enterprise/apm-policy.mdx:18, enterprise/security.md:99 and reference/cli/policy.md:56). The rule removes the user-scope GATE=denied-dependency cells under install, lock, update and install --mcp (5 known-failing cells) and pins core/scope.policy_discovery_uses_git_remote: when #3703 changes that decision the cells return as must-cover and the tripwire test fails. Refs #4564 Refs #4565 Co-authored-by: Copilot App <[email protected]>
…dency - Gate matrix: a declared refusal under the org deny (exit 1, nothing changed, AGENTS.md included) credits every primitive the denied packages ship, p-exec's bin/ and p-mixed's instruction too. - Bundle spine: under the org deny, a p-bmix copy that ships bin/ and no integrity manifest is refused on policy (integrity is skipped with a warning), crediting bundle-install x bin x denied-dependency. - U-BIN-OPS records the Q&L ruling: prune and marketplace x bin at the org-policy level stay baseline (vacuous absence witness). Co-authored-by: Copilot App <[email protected]>
…rain6-v2 # Conflicts: # tests/lifecycle/scenarios/test_ownership_siblings.py
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…-USER-SCOPE-ORG-POLICY Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…4005) A '**' instruction under targets: [claude] never becomes a .claude rule; install asks for apm compile, which writes it to AGENTS.md beside a CLAUDE.md importing @AGENTS.md (P-OWN-claude-agents-md-instruction-routing). Co-authored-by: Copilot App <[email protected]>
…ne-mcp DRYRUN) Co-authored-by: Copilot App <[email protected]>
…r (T5 DRYRUN) cover-16 runs apm install --mcp p-inline --dry-run -- <inert> --stdio before declaring the inline server; it credits T5|OP=mcp-install|SRC=inline-mcp|DRYRUN=on (M-SOURCE credits install --mcp as OP=install, so no machine reaches it). Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The gate-bundle test opens a generated ZIP archive as gzip-tar, causing a ReadError before the denied-dependency check can run.
3 open issues
What changed in this PR
Expands APM's lifecycle test corpus for the 0.38 baseline burn-down, building on train 5. The changes add command-and-state coverage without modifying production behavior.
Changes:
- Adds scenarios for host identity, user scope, lock states, target changes, and package sources.
- Extends gate machines and deployment checks for bundles, executables, and policy refusals.
- Updates obligation rules, witness selection, generated replay rows, and CI duration estimates.
| File | Description |
|---|---|
tests/quality/test_scenario_refusal_credit.py |
Accepts lock-state and owner-law refusal credits. |
tests/lifecycle/world/test_world.py |
Checks user-scope canvas deployment. |
tests/lifecycle/world/services.py |
Extends dependency and MCP denial fixtures. |
tests/lifecycle/world/registry.py |
Publishes additional test packages. |
tests/lifecycle/world/packages.py |
Adds mixed-primitive and native executable fixtures. |
tests/lifecycle/world/builder.py |
Builds new bundles and publishes canvas sources. |
tests/lifecycle/scenarios/test_user_scope.py |
Adds user-scope lifecycle coverage. |
tests/lifecycle/scenarios/test_target_history_sources.py |
Exercises target changes across sources and gates. |
tests/lifecycle/scenarios/test_policy_pairs.py |
Adds 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 |
Extends closed-gate coverage and updates defect tracking. |
tests/lifecycle/scenarios/test_mcp_ownership_history.py |
Tests current and retired MCP ownership states. |
tests/lifecycle/scenarios/test_lock_states.py |
Exercises lock states across lifecycle factors. |
tests/lifecycle/scenarios/test_host_identity_pairs.py |
Tests host identity recording, audit, and refusals. |
tests/lifecycle/scenarios/test_history_upgrade.py |
Adds successful audit and pack history witnesses. |
tests/lifecycle/scenarios/test_file_routing.py |
Checks instruction routing to current and dropped targets. |
tests/lifecycle/scenarios/test_deployed_absent.py |
Covers missing deployments and restoration. |
tests/lifecycle/scenarios/test_compile_source_files.py |
Checks compile preserves remote file primitives. |
tests/lifecycle/scenarios/_sources.py |
Centralizes scenario source setup. |
tests/lifecycle/scenarios/_kit.py |
Extends deployment checks, scenario lanes, and refusals. |
tests/lifecycle/replay/rows/generated_cover-08-exec-git-single-deny-mcp.yaml |
Removes a vacuous bin gate credit. |
tests/lifecycle/replay/rows/generated_cover-06-exec-git-single-approve-mcp.yaml |
Updates row identity and removes a bin credit. |
tests/lifecycle/replay/rows/generated_cover-05-exec-lsp-git-single-deny-mcp.yaml |
Updates generated row identity. |
tests/lifecycle/replay/rows/generated_cover-03-skill-exec-git-multi-unapproved-mcp.yaml |
Removes vacuous audit, pack, and prune bin credits. |
tests/lifecycle/replay/rows/generated_cover-02-skill-exec-canvas-local-multi-deny-mcp.yaml |
Removes vacuous audit and prune bin credits. |
tests/lifecycle/replay/rows/generated_cover-01-skill-exec-lsp-canvas-git-single-approve-mcp.yaml |
Removes vacuous audit and prune bin credits. |
tests/lifecycle/machines/test_m_gate.py |
Extends gate coverage and hook approval regression checks. |
tests/lifecycle/machines/_gate_matrix.py |
Adds instruction rendering and policy-refusal coverage. |
tests/lifecycle/machines/_gate_bundle.py |
Extends bundle and pack gate sequences. |
tests/lifecycle/machines/_gate_bin.py |
Models user-scope org-policy limitations. |
tests/lifecycle/journeys/enterprise/E03-proxy-only-air-gapped.yaml |
Updates the expected marketplace plugin count. |
tests/lifecycle/generator/witnesses.py |
Prefers passing witnesses and registers new scenarios. |
tests/lifecycle/generator/test_generator_rules.py |
Adds rule, pin, and witness-selection checks. |
tests/lifecycle/generator/rules.py |
Defines exclusions and first-party MCP mappings. |
tests/lifecycle/generator/emit.py |
Corrects target-history routing and emits the policy pin. |
tests/lifecycle/generator/bin_pin.py |
Adds a user-scope policy predicate digest. |
.github/ci-durations/linux-x86_64.json |
Adds lifecycle duration estimates for shard balancing. |
Review effort: Balanced
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The oracle incorrectly permits compile-record writes during dry runs, witness accounting credits denials that were never evaluated, and filesystem tests are misclassified as unit tests.
12 open issues
Exclude DRYRUN operations from record-write allowance Trust and verify native plugin skills in both installs Assert native plugin agent deployment after approval and compile Require matching active settings hooks before restoring ownership Restore gate cells reachable through native plugin deployment Open the generated ZIP bundle with zipfile instead of tarfile Exclude unreachable user-scope probes from deny-witness credits · New Mark filesystem tests as component tests Do not issue org-denial receipts for ungoverned compile steps Obtain approval for security and journey table changes Require the server name under lspServers Use audit --ci to fail on replay errors and drift
1 resolved since last review
Review effort: Balanced
# Conflicts: # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The oracle permits dry-run compile record writes under default operation construction, and routing ledger credits claim deployment coverage that the test does not verify or exercise.
14 open issues
Exclude DRYRUN operations from record-write allowance Trust and verify native plugin skills in both installs Assert native plugin agent deployment after approval and compile Require matching active settings hooks before restoring ownership Restore gate cells reachable through native plugin deployment Open the generated ZIP bundle with zipfile instead of tarfile Remove the unsupported deployed other-file route credit · New Verify the skill is deployed before crediting skill routing · New Exclude unreachable user-scope probes from deny-witness credits Mark filesystem tests as component tests Do not issue org-denial receipts for ungoverned compile steps Obtain approval for security and journey table changes Require the server name under lspServers Use audit --ci to fail on replay errors and drift
Review effort: Balanced
…rned #3703 credits - user-scope bin spine: steps under the org deny that no strict known cell tracks are still checked but earn no denied-dependency credit (user scope discovers no org policy, #3703); the project matrix refusals witness compile, lock, mcp-install, approve and uninstall pairs. approve-deny and uninstall x bin x denied-dependency get a named #3703 removal; pair SCOPE=user goes known-failing. Regression test pins both. - I5: a compile --dry-run gets no home-record allowance (DRYRUN modifier). - compile record test is a component test. - HOSTID audit rows run audit --ci so drift or a failed replay fails. - Claude always-on routing row: assert the skill and a path-scoped instruction under .claude/rules before and after compile. - compile of a native plugin and target-history whole plugin: assert the enabled registration and the native_plugin lock record. Co-authored-by: Copilot App <[email protected]>
bin_pin: main's element_tokens refactor plus train 6's user_org_policy_digest on it (pins unchanged). Ledger 3/1/2419: audit x bin x none and the two named #3703 removals. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
A critical scope-filtering defect removes four project-scoped T1 obligations before their witnesses can be selected, requiring an explicit user-scope exclusion and updated descriptions, tests, and ledger.
1 open issue
14 resolved since last review
Exclude DRYRUN operations from record-write allowance Trust and verify native plugin skills in both installs Assert native plugin agent deployment after approval and compile Require matching active settings hooks before restoring ownership Restore gate cells reachable through native plugin deployment Open the generated ZIP bundle with zipfile instead of tarfile Verify the skill is deployed before crediting skill routing Remove the unsupported deployed other-file route credit Exclude unreachable user-scope probes from deny-witness credits Mark filesystem tests as component tests Do not issue org-denial receipts for ungoverned compile steps Obtain approval for security and journey table changes Require the server name under lspServers Use audit --ci to fail on replay errors and drift
Review effort: Balanced
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The generator drops reachable project-scope bin policy obligations, while the oracle’s prefix-based allowlist incorrectly permits extra HOME files beneath the exempt record path.
1 open issue
1 resolved since last review
Review effort: Balanced
… judges A component test must assert durable state (AQ003): each control asserts the record is on disk before judging the verdict, so an empty verdict cannot come from a missing write. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…N-OPS text matches #4894 The compile home-record allowance admits the record and its ancestor directories, never a path below it; a negative control writes below the record. U-BIN-OPS no longer calls the marketplace org-policy level a vacuous baseline: the plugin bin spine witnesses it (#4894). Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The scope-free bin exclusion removes four reachable project-scope T1 obligations despite existing refusal witnesses, so it must be limited to explicit user scope and the tests and ledger updated.
No open issues 🎉
2 resolved since last review
Review effort: Balanced



Description
Corpus train 6, stacked: it lands after #4702 (merged) and #4758 (corpus train 5). Train 6 contains train 5's head (66da26f) and re-merges #4758's final head with one regenerate before it goes to the desk (H7). It opens now so the ci.yml Lifecycle Smoke lane, which runs only on PRs into main, validates the T-1 spine credits. Until #4758 merges, this diff includes train 5.
test_host_identity_pairs.py), offline source cells (T-2 joins SCENARIO_LANES)Baseline left: prune x bin {none, unapproved-exec, denied-dependency} and marketplace x bin x denied-dependency (#4894 lane, witnessed by #4975), audit x bin x none, plus approve-deny and uninstall x bin x denied-dependency, which carry a named #3703 removal (
tests/quality/obligation_removals.json): user scope discovers no org policy, so the user-scope bin spine no longer credits those ungoverned steps (review threads on_gate_bin.pyandwitnesses.py). The compile, lock, mcp-install, approve and uninstall denied-dependency pairs are witnessed by the project matrix refusals. This head is re-merged with main once #4975 lands, with one regeneration.Scope (review thread on generated_obligations.json): this PR does not change
tests/quality/generated_obligations.jsonor any security/journey table; the file equals main. Deferred, needs its own scope approval: any promotion in the security and journey tables.Known cells (L15, checked live): #4626, #4744, #4759 are OPEN.
Integration notes:
core/scope.py::policy_discovery_uses_git_remote,policy/discovery.py::_auto_discoverand docs headings. Every Ev resolves._gate_bundle.GatePack.packcombines W3b's_SHIPS_ALSOkinds under the dependency deny with train 5's per-package plain-file labels.generator --check, witnesses, ruff, AQ, duplicates and taxonomy are clean. CI and Integration run the suites (no local pytest under the host rule).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 takes the lifecycle baseline to 5.
Type of change
Testing
CI and Integration verify this head; no local pytest under the host rule.
python -m tests.lifecycle.generator --checkandpython -m tests.lifecycle.witnessesare up to date. The obligation-status ratchet, assertion-quality ratchet, duplicate ratchet, complexity ratchet, R0801,tests.quality.taxonomy --changed, the auth-signal lint and[email protected] check/formatare clean. CI and Integration run the full suites.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.
Re-merge (train 5 @ 26a253e + main @ 2b4e751): #4895 landed, so the #4874 narrowed-target cell is required; every remaining strict known cell is discharged or retired here, so known-failing is 0.
Re-merge after train 5 landed (main aea3f96): the five remaining baseline cells are the
T1|PRIM=bingate levels #4894 tracks (prune none/unapproved-exec/denied-dependency, audit none, marketplace denied-dependency).