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): T-2 HOSTID pairs and offline-source cells (stacked on train 5) - #4789
T-2 corpus lane (#4096): credits the HOSTID pairs and the T-2 offline-source cells left in the baseline after train 5.
Stacked on train 5 (#4758, ql/corpus-train-5 @ e1e9faf). Until #4758 merges, this PR's diff includes train 5; after it merges, only the files below remain. Whichever of #4758, #4769 and this PR lands later must re-merge main and regenerate.
Own changes vs train 5:
tests/lifecycle/scenarios/test_host_identity_pairs.py (new). For each host identity (bare-default, proxy-logical, qualified-host-port), real CLI:
audit replays the exact lock row;
a newer-generator lock is refused with the lock bytes unchanged;
a git-marketplace plugin records its host identity.
tests/lifecycle/scenarios/test_compile_source_files.py (new): compile over an instruction package served from git and from a git catalog, and over a native Claude plugin with an agent (each a scenario-local served repo). compile leaves the lock bytes and every marked deployed file unchanged; the instruction stays under copilot's instruction root with its text and in the lock. Credits T3|OP=compile|SRC={git, marketplace-git, native-plugin}|PRIM=other-file (split with W1: b9 earns the other 12 T-2 triples).
Both new modules carry lifecycle_smoke, so Lifecycle Smoke (Linux) runs them on this PR. Without it they would run only in the main-only nightly.
tests/lifecycle/scenarios/_kit.py: adds T-2 to SCENARIO_LANES. Declares the three pair|LOCK=newer-generator|HOSTID=* refusals; a refusal never discharges a success cell.
tests/lifecycle/generator/witnesses.py: registers the module.
Human scope-approval comment: QL VP assignment of the T-2 corpus lane (#4096, accepted lifecycle corpus epic). Test-only.
Does this PR complete the issue, or what remains? Partial: the 13 T-2 cells above remain, owned by W1's b9 and W2b.
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: ruff check / format --check (0.15.12), python -m tests.lifecycle.generator --check, scripts/check_test_assertions.py, scripts/check_exact_test_duplicates.py, and tests.quality.taxonomy --changed all pass. The scenario modules run in CI (Integration dispatched on this branch) rather than locally, per the host-capacity rule.
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.
… now required
Merge main (keep U11 and U-FIRST-PARTY-MCP), drop the #4636 strict cells and
the uninstall output cell, credit every uninstall history row, regenerate.
Refs #4100, #4565
Co-authored-by: Copilot App <[email protected]>
…les and marketplaces
Seven first-command-after-a-target-change rows x four TGT changes, and fix
the history row CREDITS keys (pytest ids are row-tgt; 48 credits named
nodes that never ran). New quality guard: every scenario credit names a
collected node (negative control: the old keys fail it). T-6a 101 -> 165
required.
Refs #4100, #4565
Co-authored-by: Copilot App <[email protected]>
Three MCP owners (current .mcp.json, legacy .github/mcp.json receipts,
removed-vscode .vscode/mcp.json) from the 0.36.0 fixtures, one command per
row: heal on install/update/stale-lock install, keep the retired file on
uninstall/prune/install --mcp/lockless install; a newer-generator lock is
refused for every owner. U-MCPOWN-USER (lead ruling) removes user-scope x
retired owner, bound to split_mcp_claims(user_scope=True) with a negative
control. T-6a 165 -> 196 required (6 left, unchanged-TGT cells T-6e covers).
Refs #4100, #4565
Co-authored-by: Copilot App <[email protected]>
… cells)
The user-scope bin spine gains a denied-dependency segment: the org
policy denies the plugin, the user has approved it, and a user-scope
command discovers no org policy (#3703), so install, install --frozen,
install --mcp, lock and update keep bin/ the deny should retire
(strict known I4 cells, KNOWN_DD). approve, compile and uninstall under
the deny hold every law and earn their ids.
Refs #4095#4565
Co-authored-by: Copilot App <[email protected]>
U-BIN-OPS (definition rule, OP x PRIM x GATE only): bin/ deploys only for a
marketplace plugin at user scope (exec_gate.plugin_bin_deployable); audit,
prune, pack and marketplace have no user-scope form and a local bundle is
never a marketplace plugin, so a gate level of bin/ under them is vacuous
(the #4575 review: an absence U-BIN guarantees proves nothing about the
gate). It removes 9 baseline cells and 11 required T1 cells whose covering
receipts only proved bin/ absent (T-1 required -11 by design). An org-policy
level stays its own cell (U2 no-collapse); OP x SRC x PRIM and OP x PRIM
cells keep their absence witnesses. A tripwire binds the rule to the live
CLI (no --global on audit, prune, pack, marketplace), the U-BIN predicate
pin and the closed-world bin/ writer pin.
U-FIRST-PARTY-MCP now also maps OP=mcp-install x PRIM=mcp at the executable
gate levels: install --mcp declares the server in the root apm.yml, so it
is first-party and never gated.
Refs #4095#4565
Co-authored-by: Copilot App <[email protected]>
…wn cells
- p-skill joins the pack set (plain file ships at every gate level)
- a canvas-only pack project; its three parked levels are strict R
known cells tracking #4714 (pack refuses a gate-parked canvas)
- the world serves p-canvas from git for pack only (GIT_PACK_ONLY)
- the pack side door also credits the OP x PRIM pair
Co-authored-by: Copilot App <[email protected]>
…y levels
The deny-all-deps world policy also denies every MCP server (**), so at
the denied-dependency level install --mcp of the registry server is a
refusal that preserves state; with the gate off the requested server is
declared, locked and configured. Both levels now credit PRIM=mcp.
Co-authored-by: Copilot App <[email protected]>
…--force-instructions
compile deduplicates an instruction .github/instructions/ already holds,
so the matrix observes compile x other-file through a forced render: at
the gate-off and revoked-after-deploy levels, where the gate keeps the
plain files, AGENTS.md must carry the instruction body. The render also
credits the OP x PRIM pair.
Co-authored-by: Copilot App <[email protected]>
- route the T-3 lane through scenario credits (SCENARIO_LANES); machine
witnesses still win
- new tests/lifecycle/scenarios/test_user_scope.py: first install from
every source, install --mcp, approved executables, plugin bin/, target
changes, modifiers, offline and the deployed states, all under HOME
- package-source helpers move to scenarios/_sources.py (scope-aware;
marketplace registration at user scope is a global input)
Co-authored-by: Copilot App <[email protected]>
The M-SOURCE spine now drives two more ops through the real CLI:
- audit_pass: `apm audit --dry-run` then `apm audit` on each converged
remote-skill state and after the registry exec pass; read-only for every
declared form, local bundles included.
- decide_pass: `apm approve --all` pins every installed package with
executables; a local bundle is approved by the content key `approve
--pending` prints and installed again as that hint says; `apm deny` of a
catalog plugin and the `apm install` its hint names retire its
executables (I4); the gate is then restored. The model now carries the
executables decisions, so the deploy oracle checks approved state.
The p-lsp bundle stays parked: its LSP server shares the local p-lsp's name,
and once the bundle owns it the manifest install is refused by design.
R5 (Q&L ruling): approve-deny x {mcp-registry, inline-mcp} maps onto
U-FIRST-PARTY-MCP; approve decides only installed packages
(scan_installed_executable_packages), witnessed by a live-scan test.
Ledger vs #4711: baseline 531 -> 452 (75 T-2 cells required, 4 mapped by
R5); T-2 baseline 220 -> 141.
Refs #4564
Refs #4565
Co-authored-by: Copilot App <[email protected]>
…ck lock cells
- new scenarios/test_deployed_absent.py: gate levels over an absent
deployment, offline and target-change redeploys, uninstall and
marketplace with nothing deployed, an approved local bundle at both
scopes (runs the approval hint the parked install prints)
- new scenarios/test_pack_lock_states.py: pack builds from a stale lock;
pack refuses a lock a newer APM wrote (declared NEWER_LOCK refusal)
- user-scope canvas row; the kit observes user-scope lsp and canvas
surfaces; the world table records the user-scope canvas path
- pair|DEPLOYED=absent|GATE=denied-dependency joins POLICY_REFUSALS
Co-authored-by: Copilot App <[email protected]>
…pendency deny
The local-bundle spine packs a canvas into p-bmix and installs both bundles under an org dependency deny (the install refuses and changes nothing); the pack spine packs under the same deny (pack refuses and ships nothing). Bundle installs that deploy credit the local-bundle source cells they act on.
Co-authored-by: Copilot App <[email protected]>
…t-only one
machine_witnesses took the first spine by node id; when that spine held only strict known cells (the user-scope bin spine under a dependency deny, #3703) the project matrix's passing receipts were hidden and five pairs read known-failing.
Co-authored-by: Copilot App <[email protected]>
…remote LSP)
Restores the b5 M-SOURCE code the b5 squash left unstaged (audit_pass,
decide_pass, the parked p-lsp bundle) and adds b6:
- decide_pass drives every package with executables through allowed,
denied-executable and revoked-after-deploy, with an install (and a
marketplace update) at each level; local bundles are approved by the
content key approve --pending prints, after the deny (the p-exec
bundle's hook file shares the p-exec package's name).
- lsp_source_pass declares the git-published p-lsp as a git shorthand and
from the world's git catalog, through install/update/prune/compile/lock,
audit, approve and a withdrawn approval, and uninstall.
- prune_pending: install keeps a departed dependency's apm_modules checkout
and prune removes it (install.md), so prune after such a change is not a
converged byte no-op.
Ledger vs train 5 @9e909beb: baseline 385 -> 351; T-2 baseline 94 left.
Refs #4564
Refs #4565
Co-authored-by: Copilot App <[email protected]>
The U-MCPOWN-USER reader test also checks the ledger records exactly the retired-owner removals; the DEPLOYED=absent uninstall test reads the lockfile on disk.
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]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The HOSTID witnesses are excluded from PR validation, and audit cells can receive credit without successful replay because they lack strict CI auditing and an explicit clean-drift check.
Expands APM’s lifecycle test coverage for host identity and offline sources in T-2 (#4096). The current diff also includes train 5 (#4758); the additional T-2 work credits 14 cells beyond that train without changing production behavior.
Changes:
Adds host-identity scenarios for audit, newer-lock refusal, and marketplace installs.
Extends lifecycle scenarios, machine coverage, and deployment assertions carried by train 5.
Updates witness selection, obligation rules, generated replay rows, and CI duration estimates.
…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]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The native-plugin scenario uses a scope that prevents the required lock record, while the host-identity audit assertions can pass even when replay fails or is skipped.
… 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]>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The lifecycle test can award HOSTID credit for failed or skipped audit replay, and its misplaced ref installs the default branch instead of the intended tag.
The ref is ignored in this catalog shape: parse_plugin_entry retains the source object, and _source_pin reads ref from that object, not the surrounding plugin entry. This therefore installs the ported repository's default branch rather than v1.0.0; identical branch/tag contents hide the mistake. Move the pin inside source so the fixture exercises the intended pinned dependency.
…SOURCE instruction
#4005 routes Claude '**' instructions to AGENTS.md through compile, so the M-SOURCE instruction uses a file-type glob (as test_file_routing does on main) and keeps a per-file rule on every deployed target the other-file oracle checks. The user-scope native-plugin row reports ~/.claude and the install output when Claude settings are missing.
Co-authored-by: Copilot App <[email protected]>
…ts approval
p-native-claude ships an MCP server, so a first user-scope install parks the whole plugin (exit 0, no Claude settings) until it is approved; that is the gate working. The row now installs, approves and installs again; only that install earns SRC=native-plugin, and it must leave a user lock row and an enabled ~/.claude/settings.json entry.
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 HOSTID audit test can pass when drift replay fails or is skipped because it accepts a successful exit code and rereads an unchanged lock row instead of verifying that replay ran and completed cleanly.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The HOSTID tests can falsely credit dependency replay because audit may exit successfully when replay fails or is skipped, and unchanged lock rows do not prove replay ran and succeeded.
Superseded by train 6 #4814, which carries this PR's commits with a single regenerate (generated-file-coupled PRs land serially). Closing to avoid a duplicate landing.
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
full-integrationRun the full integration suite (ci-integration.yml) on this PR before merge
2 participants
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
T-2 corpus lane (#4096): credits the HOSTID pairs and the T-2 offline-source cells left in the baseline after train 5.
Stacked on train 5 (#4758,
ql/corpus-train-5@ e1e9faf). Until #4758 merges, this PR's diff includes train 5; after it merges, only the files below remain. Whichever of #4758, #4769 and this PR lands later must re-merge main and regenerate.Own changes vs train 5:
tests/lifecycle/scenarios/test_host_identity_pairs.py(new). For each host identity (bare-default, proxy-logical, qualified-host-port), real CLI:auditreplays the exact lock row;tests/lifecycle/scenarios/test_compile_source_files.py(new):compileover an instruction package served from git and from a git catalog, and over a native Claude plugin with an agent (each a scenario-local served repo). compile leaves the lock bytes and every marked deployed file unchanged; the instruction stays under copilot's instruction root with its text and in the lock. CreditsT3|OP=compile|SRC={git, marketplace-git, native-plugin}|PRIM=other-file(split with W1: b9 earns the other 12 T-2 triples).lifecycle_smoke, so Lifecycle Smoke (Linux) runs them on this PR. Without it they would run only in the main-only nightly.tests/lifecycle/scenarios/_kit.py: adds T-2 toSCENARIO_LANES. Declares the threepair|LOCK=newer-generator|HOSTID=*refusals; a refusal never discharges a success cell.tests/lifecycle/generator/witnesses.py: registers the module.tests/quality/lifecycle_obligations.json: regenerated.Effect vs train 5: 17 cells move baseline -> required (10 HOSTID; 4 offline registry/MCP/bundle cells already witnessed by
test_network_offline, now counted once T-2 is a scenario lane). 3 compile x other-file triples. Baseline 37 -> 20.I dropped my earlier
test_local_bundle_commands.py: train 5'stest_m_source(b8) already witnesses lock/compile x local-bundle, so it added no credit.Left in T-2 baseline (13): W1's b9 earns 12 triples;
T5|OP=mcp-install|SRC=inline-mcp|DRYRUN=onis W2b's.Issue and approved scope
Issue: Refs #4096
Human scope-approval comment: QL VP assignment of the T-2 corpus lane (#4096, accepted lifecycle corpus epic). Test-only.
Does this PR complete the issue, or what remains? Partial: the 13 T-2 cells above remain, owned by W1's b9 and W2b.
Type of change
Testing
Local:
ruff check/format --check(0.15.12),python -m tests.lifecycle.generator --check,scripts/check_test_assertions.py,scripts/check_exact_test_duplicates.py, andtests.quality.taxonomy --changedall pass. The scenario modules run in CI (Integration dispatched on this branch) rather than locally, per the host-capacity rule.Changelog
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]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
CONFORMANCE.{md,json}regenerated