Repository navigation
feat(init)!: remove apm init --plugin and --marketplace (Fixes #4073) - #4074
Conversation
…nit gains metadata flags (#4073) Both flags (deprecated since 0.14) are hidden stubs that write nothing, exit 2 and name the replacement command. apm plugin init accepts --version, --author and --description so it fully replaces apm init --plugin; the dead marketplace-block path leaves _perform_init. Help, reference docs and the apm-usage skill drop the old flags. BREAKING CHANGE: apm init --plugin / --marketplace now exit 2. apm-spec-waiver: removes deprecated CLI flags; no OpenAPM requirement covers them Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
init.md still documented the removed flag in the --version row, the Behavior list and a copy-paste example that now exits 2, missing the #4073 Done-when. The migration text was also written three times; the init.md "Removed flags" section is now the single source, and it says that --name has no plugin init equivalent. The CHANGELOG line moves to Breaking changes per changelog.instructions.md (must-act removal). Addresses panel follow-ups from doc-writer and devx-ux-expert. Co-authored-by: Copilot App <[email protected]>
'apm init my-skill --plugin --yes --target claude' printed only 'Run: apm plugin init', and pasting that scaffolds interactively in the current directory. The refusal now rebuilds the plugin init command with the project name, --yes, --target and metadata flags, and prints both steps when --plugin and --marketplace were passed together. Adds a unit test for the prompt-seeded plugin init metadata path, which no test covered. Mutation-break verified for all new tests. Addresses panel follow-ups from devx-ux-expert and test-coverage-expert. apm-spec-waiver: CLI refusal wording for removed init flags; no OpenAPM req covers these flags Co-authored-by: Copilot App <[email protected]>
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| DevX UX Expert | 0 | 3 | 0 | Exit-2 stubs and the new plugin init flags are right. Two doc lines and one example still used apm init --plugin, the refusal dropped the user's args, and --name has no replacement. |
| Test Coverage Expert | 0 | 1 | 0 | Removed-flag refusal and plugin init metadata under --yes are covered at unit and installed-CLI tier. One gap: prompt-seeded (non --yes) plugin init metadata was untested. |
| Doc Writer | 1 | 2 | 0 | init.md still documented the removed --plugin flag in 3 places, including a runnable example that exits 2. Move the CHANGELOG line to Breaking. Remove duplicate migration text. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Doc Writer] (blocking-severity) Remove the remaining
--pluginmentions from reference/cli/init.md (the--versionrow, the Behavior list and the example that exits 2), plus the 'same as legacy --plugin' docstring at init.py:272. -- Misses the approved Done-when; a copy-paste example that exits 2 breaks the rule that every example must work. - [DevX UX Expert] Have the refusal rebuild the user's full
apm plugin init ...command, and print both steps when--pluginand--marketplacewere passed together. -- A bareapm plugin initdrops name, target and version and falls back to an interactive scaffold. - [Doc Writer] Move the CHANGELOG entry to
### Breaking changes and upgrade noteswith**BREAKING:**, 25 words or fewer, and note the scope-wording reading in the PR body. -- The repo changelog rule routes must-act removals only to Breaking. - [Test Coverage Expert] Add a unit test for
apm plugin init --version/--author/--descriptionwithout--yes. -- If forwarding broke on the interactive path, or the 0.1.0 override fired outside--yes, no test would fail. - [DevX UX Expert] State that
--namehas no equivalent instead of claiming a full replacement; open a follow-up issue to add--nametoapm plugin init. -- Fixing the doc claim is in scope; adding a fourth flag is not.
Recommendation
The behavior and tests are right, so the PR does not need rework. Merge after fixing the init.md drift, moving the CHANGELOG entry to Breaking, rebuilding the user's full command in the refusal, adding the interactive-path test and softening the full-replacement claim. Track adding --name to apm plugin init as the only follow-up issue.
Folded in this run
- (panel) init.md: removed the
--pluginmentions in the--versionrow, the Behavior list and the exit-2 example; exit-code line no longer cites a plugin name; init.py:272 docstring cleaned -- resolved in e6c8726, beaa0df. - (panel) Refusal prints the full replacement command (
Run: apm plugin init my-skill --yes --target claude --version 2.0.0 --author 'Ada L') and both steps when both flags are passed -- resolved in beaa0df. - (panel) CHANGELOG line moved to
### Breaking changes and upgrade noteswith**BREAKING:**, under 25 words; PR body discloses the scope-wording reading -- resolved in e6c8726. - (panel) Unit test for prompt-seeded
apm plugin initmetadata, including the 1.0.0 default outside--yes-- resolved in beaa0df. - (panel) init.md "Removed flags" is the single migration source and says
--namehas no equivalent; plugin.md migration section is a one-line link -- resolved in e6c8726.
Copilot signals reviewed
- No
copilot-pull-request-reviewer[bot]reviews or inline threads on this PR after 2 fetch rounds; 0 review threads, 0 unresolved.
Deferred (out-of-scope follow-ups)
- (panel) Add
--nametoapm plugin initfor in-place plugin scaffolds -- scope boundary: the approved Remove deprecated apm init --plugin and --marketplace in 0.37 #4073 scope enumerates exactly three new plugin init options; a fourth CLI option needs a scope amendment; suggested follow-up: new issue.
Regression-trap evidence (mutation-break gate)
TestRemovedInitFlags::test_removed_plugin_flag_prints_the_full_replacement_command-- replaced the rebuilt command with a bareRun: apm plugin init; test FAILED as expected; guard restored.TestRemovedInitFlags::test_both_removed_flags_print_both_replacement_steps-- suppressed the marketplace step when both flags are set; test FAILED as expected; guard restored.TestRemovedInitFlags::test_plugin_init_metadata_flags_seed_interactive_prompts-- dropped--versionforwarding in plugin/init.py, and separately let the 0.1.0 plugin default fire outside--yes; the matching case FAILED each time; guards restored.
Lint contract
ruff check and ruff format --check (ruff 0.15.12) over src/ tests/ plus the architecture linter sources: silent. pylint R0801: 10.00/10. scripts/lint-auth-signals.sh: exit 0. scripts/lint-architecture-boundaries.sh: exit 0.
CI
PR checks at beaa0df: build SUCCESS, license/cla SUCCESS, deploy SKIPPED (0 CI fix iterations). ci.yml runs only on PRs to main, so the full CI matrix for this stacked PR is proven by the Lane L release train. Local evidence: 372 targeted init/plugin/marketplace/producer-journey tests passed; installed-CLI tests/integration/test_init_removed_flags_lifecycle.py 3 passed; discovery owner tests (unit onboarding + installed-CLI brownfield) passed.
Mergeability status
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #4074 | beaa0df | ship_with_followups | 1 | 5 | 1 | 2 | green | MERGEABLE | CLEAN | stacked on #4072; ci.yml proven by Lane L train |
Full per-persona findings
DevX UX Expert
- [recommended] init.md still documents the removed --plugin flag in the --version row, the Behavior list and a copy-paste example that now exits 2 at
docs/src/content/docs/reference/cli/init.md:97
Done-when says help and docs no longer mention the old flags; lines 50, 93-102 and 145 still did, and the example now exits 2. - [recommended] The refusal names a bare replacement command and drops the user's own arguments, so recovery takes more than one paste at
src/apm_cli/commands/init.py:212
All those args are accepted by apm plugin init, so the stub can rebuild the exact command. With both flags, only the first was reported. - [recommended] The docs claim apm plugin init fully replaces apm init --plugin, but --name for in-place init has no replacement at
src/apm_cli/commands/plugin/init.py:51
Scope named only three flags, so adding --name is a follow-up; the doc claim should be honest now.
Test Coverage Expert
- [recommended] apm plugin init --version/--author/--description without --yes (prompt-seeded path) had no test at
tests/unit/test_init_command.py
Every test of the new flags used --yes. plugin.json author is asserted in the unit test; 0.1.0-with-yes and explicit-version-wins are covered.
Proof (missing at):tests/unit/test_init_command.py-- proves: a plugin author running apm plugin init interactively with metadata flags gets them written to apm.yml and plugin.json.
Doc Writer
- [blocking] init.md still documents the removed
--pluginflag in 3 places, including a runnable example that now exits 2 atdocs/src/content/docs/reference/cli/init.md:97
Misses the approved Done-when and breaks the rule that every example must work. - [recommended] The CHANGELOG entry is a removal users must act on, so the repo rule puts it under Breaking with BREAKING:, not Removed at
CHANGELOG.md
changelog.instructions.md routes must-act changes only to Breaking changes and upgrade notes; the entry was also over 25 words. - [recommended] The migration path was written out 3 times at
docs/src/content/docs/reference/cli/plugin.md:53
State once, link elsewhere: init.md Removed flags is the single source.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
…pe, one #4074 line) Co-authored-by: Copilot App <[email protected]>
Description
Removes the deprecated
apm init --pluginandapm init --marketplaceflags in 0.37, as the #4073 scope record sets out. The flags were deprecated in 0.14 and their removal was already announced.apm init --pluginandapm init --marketplaceare now hidden stubs. They write nothing, exit2, and print the full replacement command on stderr, keeping the project name,--yes,--targetand metadata flags (for exampleRun: apm plugin init my-skill --yes --target claude). With both flags, both steps are printed.apm plugin initgains--version,--authorand--description, written to bothapm.ymlandplugin.json, so it fully replacesapm init --plugin.--marketplacereached is removed from_perform_init.apm marketplace initkeeps usingrender_marketplace_block.reference/cli/init.md,reference/cli/plugin.mdand the apm-usage skill (commands.md,package-authoring.md) no longer offer the old flags. The init page's "Deprecations" section becomes "Removed flags" and points to the replacements. README never mentioned the flags.Issue and approved scope
Issue: Fixes #4073
Human scope-approval comment: #4073 (comment)
Does this PR complete the issue, or what remains? It completes it.
Type of change
Testing
New tests:
tests/integration/test_init_removed_flags_lifecycle.py:apm init --help;apm plugin init --version/--author/--descriptionwrites all three fields.TestRemovedInitFlagsintests/unit/commands/test_plugin_init_command.py: the same contract via CliRunner.Migrated tests:
apm init --pluginnow callapm plugin init.test_apm_init_consumer_surfaces_namespace_hintswas already failing on the base, because fix(0.37): product fixes found while rebuilding the docs [PR D of #3994] #4004 stopped advertisingapm run. It is aligned here because it is in a file this PR edits.Local evidence at the head:
-n 2over the init, plugin, marketplace and producer-journey files plus the new lifecycle file: 2542 passed.uvx [email protected] checkandformat --check: clean.scripts/lint-auth-signals.sh: clean.scripts/lint-architecture-boundaries.sh: exit 0.Changelog
## [Unreleased]/### Breaking changes and upgrade notes, prefixed**BREAKING:**, ending(closes #4073, #4074). The scope record says "under Removed";changelog.instructions.mdroutes must-act removals only to Breaking, so the line lives there (same intent: record the removal with its migration).Spec conformance (OpenAPM v0.1)
No
req-XXXcovers these flags.