Repository navigation
fix(install): dry-run reports the req-tg-011 skip of an excluded Agent Plugin - #5784
Merged
Daniel Meppiel (danielmeppiel) merged 7 commits intoDec 2, 2026
Merged
Conversation
…#5781) Red-first cells for two non-host targets (claude, codex): the dry-run preview must show the Agent Plugins dependency as skipped with the real install's single diagnostic and the ordinary dependency as installed, mutating nothing; the real install then makes the same decision. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…t Plugin The dry-run preflight already asked the deployment-boundary owner about each selected dependency, but swallowed a target exclusion, so the preview listed the excluded Agent Plugin as an install. It now returns each skip with the diagnostic a real install records (one message builder for both), and the preview shows the dependency as skipped, prints that diagnostic once and counts only what it would install. Fixes #5781 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… decision Behavioral conformance for the req-tg-011 dry-run clause (section 8.5.5) on two non-host targets; CONFORMANCE regenerated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Dry-run exclusions can miss transitive plugins or incorrectly skip ordinary dependencies, while summary counts still include excluded updates.
4 open issues
What changed in this PR
Addresses #5781 by making the shared install dry-run planner report target-excluded Agent Plugins as skipped, matching real-install diagnostics without mutating state.
Changes:
- Records exclusions and removes skipped packages from preview install counts.
- Shares recovery messages between preview and real installation.
- Adds regression coverage and updates conformance records.
| File | Description |
|---|---|
tests/unit/scripts/test_architecture_skills_root_guard.py |
Updates the allowlisted helper name. |
tests/unit/install/test_agent_plugin_deployment_boundary.py |
Expects skip rows and diagnostics. |
tests/spec_conformance/test_copilot_plugins_reqs.py |
Adds req-tg-011 preview checks. |
tests/integration/test_agent_plugin_dry_run_target_skip_lifecycle.py |
Tests preview/install agreement and unchanged state. |
tests/fixtures/lifecycle_bug_ledger/bugs/5781.json |
Records regression evidence. |
src/apm_cli/install/template.py |
Collects exclusions and shares diagnostic construction. |
src/apm_cli/install/presentation/dry_run.py |
Renders skips and recovery diagnostics. |
src/apm_cli/install/dry_run_plan.py |
Stores skips and adjusts install counts. |
src/apm_cli/commands/install.py |
Applies exclusions to the preview plan. |
scripts/architecture_linter/checks/install_skills_root_derivation.py |
Follows the renamed message helper. |
CONFORMANCE.md |
Updates requirement coverage totals. |
CONFORMANCE.json |
Registers new conformance cases. |
changelog.d/5784.fixed.md |
Documents the user-visible fix. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…te count Review follow-ups for the req-tg-011 dry-run skip (#5781): - skips are keyed by the dependency's unique key, so a plugin and an ordinary package sharing a display identity keep their own decisions - a relative transitive Agent Plugin is located at the resolver's anchored path, so its exclusion is not missed - the preview's update count leaves out skipped packages - docs: --dry-run reports the skip and its diagnostic Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The plan and preflight cells assert return values; they are unit tests, not component tests (assertion-quality AQ003 ratchet). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel)
deleted the
fix-5781-dry-run-agent-plugin-skip
branch
December 2, 2026 19:27
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Dec 2, 2026
Restacked as one commit onto main 4e733b0 (#5775, #5778, #5743 and #5784 landed). This is the net Pi delta of danielmeppiel-pi-target at 0871e7d7 over the stack it carried, applied with no conflicts: - the pi target (registry profile, catalog capability, .pi detection, skills in .agents/skills, commands in .pi/prompts, PI_CODING_AGENT_DIR user root, read verbatim), trust hint, init picker from the registry, unsupported primitive warning once, governance_dirs for unmanaged_files; - project cleanup removes only roots that do not signal their target, and only roots that do are created before a write (materializes_root); an auto_create target's merged hook config is created with its root; - the trust hint also fires for project-only .apm content; - harness conformance: Pi cells all required (zero baseline), HC-PLUGIN-01 .dryrun promoted (26 rows formerly #5781) with an exact-line oracle; main's required cells kept (the carried ratchet had them in baseline), known_failing merged into the promise engine, PI_CODING_AGENT_DIR scrubbed in tests/conftest.py, Pi journey variants, Pi receipts; - real-harness Pi 1.6.0 lane with the cross-spawn and minimatch overrides. apm-spec-waiver: adds the pi target as registry data on the shared target layer; no change to an OpenAPM v0.1 requirement apm-spec-waiver: policy default scan dirs now come from registry data; the existing list is byte-identical and pi adds .pi Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
6 of 10 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Dec 2, 2026
Restacked as one commit onto main 4e733b0 (#5775, #5778, #5743 and #5784 landed). This is the net Pi delta of danielmeppiel-pi-target at 0871e7d7 over the stack it carried, applied with no conflicts: - the pi target (registry profile, catalog capability, .pi detection, skills in .agents/skills, commands in .pi/prompts, PI_CODING_AGENT_DIR user root, read verbatim), trust hint, init picker from the registry, unsupported primitive warning once, governance_dirs for unmanaged_files; - project cleanup removes only roots that do not signal their target, and only roots that do are created before a write (materializes_root); an auto_create target's merged hook config is created with its root; - the trust hint also fires for project-only .apm content; - harness conformance: Pi cells all required (zero baseline), HC-PLUGIN-01 .dryrun promoted (26 rows formerly #5781) with an exact-line oracle; main's required cells kept (the carried ratchet had them in baseline), known_failing merged into the promise engine, PI_CODING_AGENT_DIR scrubbed in tests/conftest.py, Pi journey variants, Pi receipts; - real-harness Pi 1.6.0 lane with the cross-spawn and minimatch overrides. apm-spec-waiver: adds the pi target as registry data on the shared target layer; no change to an OpenAPM v0.1 requirement apm-spec-waiver: policy default scan dirs now come from registry data; the existing list is byte-identical and pi adds .pi Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Dec 3, 2026
Restacked as one commit onto main 4e733b0 (#5775, #5778, #5743 and #5784 landed). This is the net Pi delta of danielmeppiel-pi-target at 0871e7d7 over the stack it carried, applied with no conflicts: - the pi target (registry profile, catalog capability, .pi detection, skills in .agents/skills, commands in .pi/prompts, PI_CODING_AGENT_DIR user root, read verbatim), trust hint, init picker from the registry, unsupported primitive warning once, governance_dirs for unmanaged_files; - project cleanup removes only roots that do not signal their target, and only roots that do are created before a write (materializes_root); an auto_create target's merged hook config is created with its root; - the trust hint also fires for project-only .apm content; - harness conformance: Pi cells all required (zero baseline), HC-PLUGIN-01 .dryrun promoted (26 rows formerly #5781) with an exact-line oracle; main's required cells kept (the carried ratchet had them in baseline), known_failing merged into the promise engine, PI_CODING_AGENT_DIR scrubbed in tests/conftest.py, Pi journey variants, Pi receipts; - real-harness Pi 1.6.0 lane with the cross-spawn and minimatch overrides. apm-spec-waiver: adds the pi target as registry data on the shared target layer; no change to an OpenAPM v0.1 requirement apm-spec-waiver: policy default scan dirs now come from registry data; the existing list is byte-identical and pi adds .pi Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.


Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
a0a5502dd45afd10a79d7b872d15f99bf63f6eb3↑ Review follow-ups (unique-key skips, anchored transitive path, update count) each have a cell that is red before the fix and goes red again under mutation.
↑ tests/unit/install, tests/unit/copilot_plugins, the spec module and the lifecycle cells: 4599+ passed locally.
↓ PR CI and Integration at this head are pending; earlier runs were disrupted by a GitHub Actions incident.
preflight_agent_plugin_dry_runalready askedenforce_agent_plugin_deployment_boundaryabout each dependency but swallowedAgentPluginTargetExcludedError, so the renderer still printed-> install.targets: [claude]) reproduces "-> install" / "would install 2" on main, and shows-> skipwith the install's diagnostic after the fix.Description
apm install --dry-runlisted an Agent Plugins v1 dependency that the selected targets exclude (req-tg-011, section 8.5.5) as-> installand counted it in "would install N", while a real install skips it with one[!]diagnostic. The spec requires the dry-run to report the same per-dependency deployment decision without mutating state.The fix stays in the shared dry-run planner and keeps one decision owner:
preflight_agent_plugin_dry_run(install/template.py) already evaluatedenforce_agent_plugin_deployment_boundaryfor each selected dependency but discarded the exclusion. It now returns each skip with the same diagnostic a real install records.agent_plugin_target_skip_message, serves both the install's_record_agent_plugin_target_skipand the preview, so the text cannot drift.ProspectiveInstallPlan.with_agent_plugin_skipsrecords the skips, keyed by each dependency's unique key, so packages that share a display identity keep separate decisions. The renderer shows-> skipand prints the diagnostic once.apm_dependency_countandupdated_apm_dependency_countcount only what the preview would install or update.anchored_local_path._record_agent_plugin_target_skiptakes its package key from the sameagent_plugin_skip_package_keyowner.reference/cli/install.mdand the apm-usagecommands.mddescribe the dry-run skip.The real install's behaviour is unchanged. Out of scope: which targets host Agent Plugins.
Two existing tests encoded the old behaviour and are updated:
test_dry_run_target_exclusion_is_non_fatal_previewasserted that the preview prints no diagnostic. It now asserts one diagnostic and-> skipper excluded package.install-deployment-skills-root-derivationallowlist entry follows the message builder to its new public name; the reason is unchanged.KnownFailure rows: #5771 (Pi target) is still open and its current diff carries no #5781 KnownFailure cell, so nothing flips here. If #5771 lands with one first, it flips on rebase.
Issue and approved scope
Issue: Fixes #5781
Human scope-approval comment: #5781 (comment) (
scripts/governance/eligibility.cjsat main ef53e98: record-present, review contact danielmeppiel).This PR completes the issue. The record's "KnownFailure cells added by #5771 flip" clause depends on #5771, which has not landed yet.
Type of change
Testing
All runs went through the host guard
local-test.sh, sequentially:APM_BINARY_PATH=.venv/bin/apm pytest tests/integration/test_agent_plugin_dry_run_target_skip_lifecycle.py tests/spec_conformance/test_copilot_plugins_reqs.py tests/unit/scripts/test_architecture_skills_root_guard.py tests/unit/install tests/unit/copilot_plugins: 4595 passed, 11 skippedpytest tests/integration/test_architecture_owner_rule_mutations.py -k "dry-run or skills-root": 9 passedtest_install_dry_run_e2e,test_coverage_gaps_phase4w2, the agent-plugin cells oftest_required_lifecycle_state_machine): 101 passed.tests/lifecycle/machines/test_m_source.pyfails locally on a git https helper (git: 'remote-https' is not a git command) and reproduces on another tree, so it is environmental.--collect-only, thengen_statement.commands/install.pyat 2099) andrelative_toguards, symlinks, auth signals, architecture boundaries, complexity, taxonomy and obligation ratchets, and tm006: 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)
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.
(The req-tg-011 text is unchanged; the implementation now meets its dry-run clause.)