You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(lifecycle): engine parity suite for the install fast paths - #4849
Landing gate for Lane C S0 (no-op engine) and S2 (diff-apply engine). This suite lands first. Engine cells stay strict-xfail until their engine module is on the branch, and from then on they are required to pass.
Lane C parity suite (S3): the landing gate for the install fast engines (stateless no-op, diff-apply). Each journey runs in two clones of one lifecycle world: the fast world with APM_INSTALL_FAST_PATH=trace and the full world with APM_INSTALL_FAST_PATH=0. After every step the cell compares the exit code, the normalized stdout/stderr, and the bytes of the project, HOME and lockfile (identity fields aside).
Each cell also names the decision it requires (no-op (...), applied a verified diff (<n> files), full run (<reason>)). Cells owned by an engine that is not yet on the branch are xfail(strict=True, raises=MissingDecision). They are red-first at main and become required as soon as apm_cli.install.noop_diff / desired_state / diff_apply exist. A parity break or a failed command still fails the cell at main.
Cells:
Journeys: no-op re-install, frozen no-op, install after uninstall, warm-locked diff, frozen CI on a warm store, branch-switch lockfile swap, deleted deployed file, and an update parity guard (green at main).
Doubt triggers (must decline to the full run): apm version changed, apm.yml changed, deployed file edited, non-default flag, policy changed, store miss, hidden-Unicode scanner finding, the external_scanners flag, and a local-path source.
Human scope-approval comment: Lane C build plan (perf org, slice S3), regent ruling; no product code changes.
Does this PR complete the issue, or what remains? No. It adds the parity gate; the engines land in their own PRs.
Type of change
Bug fix
New feature
Documentation
Maintenance / refactor
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
Local, targeted (engine driver, main 8710b95 + this file): pytest tests/lifecycle/scenarios/test_engine_parity.py::{update, policy-changed, reinstall-noop} -> 1 passed, 2 xfailed. Also pytest tests/quality/test_quality_baselines.py -n 2 -> 7 passed; ruff check/format, tm006 taxonomy, assertion-quality ratchet and lint-auth-signals are all clean.
Changelog
One fragment per section, changelog.d/<pr>.<section>.md, holding
one line: user-visible effect first, 25 words or fewer, ending with (#PR); breaking changes only under upgrade notes; no Highlights; no
new lines under ## [Unreleased]. See changelog.d/README.md and .github/instructions/changelog.instructions.md.
…first)
Differential twin: every journey runs in a fast world (APM_INSTALL_FAST_PATH=trace)
and a full world (=0), comparing exit code, normalized output, project/HOME
bytes and the lockfile. Cells requiring a no-op or diff-apply decision are
strict xfail (raises=MissingDecision) until that engine module exists.
Co-authored-by: Copilot App <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The parity tests can mask unexpected failures and substantive lockfile or receipt differences, while the policy scenario does not verify rediscovery at an unchanged origin.
Moves the change table and state oracle into tests/lifecycle/scenarios/_deploy_diff.py
(ported from W4's incremental-vs-fresh module) so both lane C suites share one
oracle. Adds W4's 10 changes as fast==full cells, cleanup on a hit (no byte
moves) and on a doubt, a lockfile that drops a deployed package, tampered
deploy-store entries, hidden-Unicode ASCII-guard cells and local/marketplace/
registry sources.
Co-authored-by: Copilot App <[email protected]>
The change table and the state oracle move to
tests/lifecycle/scenarios/_deploy_diff.py, carried verbatim from #4849
(f7b4f3b) so one oracle serves both the engine parity suite and this
module. The module keeps only the incremental-vs-fresh test, its #4852
Known marks and the user-state pre-placement.
Co-authored-by: Copilot App <[email protected]>
The change table and the state oracle move to
tests/lifecycle/scenarios/_deploy_diff.py, carried verbatim from #4849
(f7b4f3b) so one oracle serves both the engine parity suite and this
module. The module keeps only the incremental-vs-fresh test, its #4852
Known marks and the user-state pre-placement.
Co-authored-by: Copilot App <[email protected]>
…y output
- Engine-owned cells are KnownFailure(#4770, deferred-design) signed by the
missing-decision message, so the known-cell guard resolves their cite and any
other failure stays fatal.
- _normalized sorts each run of parallel '[>] Resolving' lines and strips the
policy cache age; HOME_CACHES skips ~/.apm/cache (marketplace fetch time).
- Marketplace sources converge through 'apm install <spec>'; ok() failures
carry both worlds' output.
Co-authored-by: Copilot App <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The parity tests can miss preservation and deployment-state regressions by omitting edited files, symlink-target checks, receipt payloads, and serialized metadata differences, while unconditional local-path fallbacks mask whether approval and policy changes correctly invalidate eligible fast paths.
Local-source fallback masks Git consent and policy invalidation
tests/lifecycle/scenarios/_deploy_diff.py:77
Every change-table cell includes the local KIT_SPEC dependency, including approval-revoked and policy-denies-executables. Since local-path projects must always decline to FULL, these cells can pass through that unrelated fallback even if the engines never invalidate eligible pinned-Git projects after a consent or policy change. Add Git-only gate variants that establish an eligible fast-path hit, then revoke approval or deny executables with the manifest and lock unchanged; require FULL and assert that the gated artifacts are removed.
- S4: a fresh checkout (no lockfile) on a warm cache must apply a verified diff
with byte-identical lockfile; store miss, tampered store, stricter policy,
local, marketplace and MCP-heavy sources must decline to FULL.
- Oracle (review): raw manifest/lockfile text and substantive receipt records
are compared; an absent key differs from null; change cells compare edited
and symlinked paths and assert the outside target is untouched; frozen keeps
lockfile bytes; doubt cells assert the full pipeline's exit code.
- Git-only trust baselines: a proven no-op hit, then a revoked approval or an
executables deny served at the same policy origin must decline.
Co-authored-by: Copilot App <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The parity tests have gaps that can hide stale MCP receipts, line-ending mismatches, unexpected install failures, and dependence on prior checkout ownership.
After the lockfile swap the full pipeline keeps the receipted bytes as a local
edit, so a diff decision is valid only when it lands the same bytes.
Co-authored-by: Copilot App <[email protected]>
…resh drops ownership
- lock/manifest text decoded from bytes (CRLF is a difference); receipts read
recursively (mcp/ receipts compared).
- A fresh checkout drops .apm-local and the HOME receipts, keeping the cache.
- Change cells assert the full pipeline's exit code (symlinked destination
refuses with 1); trust cells require a successful reinstall.
- Invariant cell: a declined fast path (APM_INSTALL_FAST_PATH=decide) writes
nothing before the full pipeline, for every S3 and fresh doubt.
Co-authored-by: Copilot App <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Receipt comparison discards ownership-critical directory paths, while engine-parity checks omit full HOME and APM_HOME permissions, allowing receipt-location and permission regressions to go undetected.
…covers HOME
- receipts() records each receipt directory (top or mcp/) and permission bits,
normalizing only the checkout-keyed file name.
- Every twin step compares full permission bits under the project, HOME and
APM_HOME (caches, logs and checkout identity aside), receipts per directory.
Co-authored-by: Copilot App <[email protected]>
Union: the #4849 oracle (receipt_history, receipt directory and mode, HOME mode
parity, s/m/h policy age, main merges) plus the W3c cells; one new seed entry.
Co-authored-by: Copilot App <[email protected]>
e634b5c)
The oracle compares receipt history only between same-history twins
(receipt_history=False by default), so an incremental install's prior-write
history no longer fails W4's incremental == fresh deploy cell.
Co-authored-by: Copilot App <[email protected]>
…C, v0.38 sweep)
Stacked on corpus train 6 (51e2e65, main f53aa79). 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.
- strict known cells for an MCP entry of a runtime no longer targeted (#4784)
and 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).
Ledger regenerated (baseline 3, known-failing 1, required 2419).
Co-authored-by: Copilot App <[email protected]>
…C, v0.38 sweep)
Stacked on corpus train 6 (2e8592d, main acb0423). 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.
- strict known cells for an MCP entry of a runtime no longer targeted (#4784)
and 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).
Ledger regenerated (baseline 3, known-failing 1, required 2419).
Co-authored-by: Copilot App <[email protected]>
…C, v0.38 sweep)
Stacked on corpus train 6 (2e8592d) 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).
Ledger regenerated (baseline 3, known-failing 1, required 2419).
Co-authored-by: Copilot App <[email protected]>
…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 and source-machine bundle identity oracles tightened.
Ledger regenerated (baseline 3, known-failing 1, required 2419).
Co-authored-by: Copilot App <[email protected]>
…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. 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]>
…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. 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]>
…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. 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]>
…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]>
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
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
Landing gate for Lane C S0 (no-op engine) and S2 (diff-apply engine). This suite lands first. Engine cells stay strict-xfail until their engine module is on the branch, and from then on they are required to pass.
Lane C parity suite (S3): the landing gate for the install fast engines (stateless no-op, diff-apply). Each journey runs in two clones of one lifecycle world: the fast world with
APM_INSTALL_FAST_PATH=traceand the full world withAPM_INSTALL_FAST_PATH=0. After every step the cell compares the exit code, the normalized stdout/stderr, and the bytes of the project, HOME and lockfile (identity fields aside).Each cell also names the decision it requires (
no-op (...),applied a verified diff (<n> files),full run (<reason>)). Cells owned by an engine that is not yet on the branch arexfail(strict=True, raises=MissingDecision). They are red-first at main and become required as soon asapm_cli.install.noop_diff/desired_state/diff_applyexist. A parity break or a failed command still fails the cell at main.Cells:
Issue and approved scope
Issue: Refs #4770
Human scope-approval comment: Lane C build plan (perf org, slice S3), regent ruling; no product code changes.
Does this PR complete the issue, or what remains? No. It adds the parity gate; the engines land in their own PRs.
Type of change
Testing
Local, targeted (engine driver, main 8710b95 + this file):
pytest tests/lifecycle/scenarios/test_engine_parity.py::{update, policy-changed, reinstall-noop}->1 passed, 2 xfailed. Alsopytest tests/quality/test_quality_baselines.py -n 2-> 7 passed; ruff check/format, tm006 taxonomy, assertion-quality ratchet and lint-auth-signals are all clean.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)