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
[BUG] apm init re-init rewrites target: agents to an invalid targets: [agents] #3857
area/multi-targetMulti-target deploy spec, target directory creation, agent surface routing.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/bugSomething does not work as documented.
Describe the bug
Re-running apm init --yes on a project whose apm.yml has target: agents rewrites the manifest to targets: [agents]. APM then rejects that manifest, because agents is not accepted under targets:. The OpenAPM spec (sec. 4.2.1) says a rewrite MUST normalise agents to copilot.
To Reproduce
apm.yml with target: agents.
apm init --yes (re-init prefill).
apm install fails with an unknown-target error.
Expected behavior
Every manifest rewrite path, including the init re-init prefill, uses the same alias map as apm manifest migrate (agents -> copilot, vscode preserved). The rewritten manifest also parses before it is written.
Additional context
Found by the apm-spec-guardian panel on #3801 (finding oci-rec-r1-2): #3801 (comment)
Decision: approve
Area: project
Scope: Route every apm.yml target rewrite path, including the apm init re-init prefill, through the single manifest-target rewrite mapping used by apm manifest migrate (agents to copilot, vscode preserved, agy to antigravity, unmappable tokens refused), and validate the rewritten manifest parses before writing it.
Done when: apm init --yes over target: agents writes targets: [copilot] and the project installs; no rewrite path can write a manifest that APM then rejects; a static guard keeps target rewrites in the one owner; unit and real-binary lifecycle tests fail before and pass after; CHANGELOG updated.
Out of scope: Changing the migrate mapping itself; the deferred spec items in #3859.
Review contact: Daniel Meppiel (@danielmeppiel)
area/multi-targetMulti-target deploy spec, target directory creation, agent surface routing.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/bugSomething does not work as documented.
Activity
danielmeppiel commentedon Nov 18, 2026
Decision: approve
Area: project
Scope: Route every apm.yml target rewrite path, including the apm init re-init prefill, through the single manifest-target rewrite mapping used by apm manifest migrate (agents to copilot, vscode preserved, agy to antigravity, unmappable tokens refused), and validate the rewritten manifest parses before writing it.
Done when: apm init --yes over target: agents writes targets: [copilot] and the project installs; no rewrite path can write a manifest that APM then rejects; a static guard keeps target rewrites in the one owner; unit and real-binary lifecycle tests fail before and pass after; CHANGELOG updated.
Out of scope: Changing the migrate mapping itself; the deferred spec items in #3859.
Review contact: Daniel Meppiel (@danielmeppiel)
danielmeppiel commentedon Nov 18, 2026
Context: Daniel Meppiel (@danielmeppiel) asked for this 0.37 defect to be fixed in 0.37 rather than carried (follow-up of the #3801 spec-guardian review, #3851/#3864).
docs(changelog): note #3857/#3858 fixes (#3867)
fix(manifest): route init re-init target rewrites through the declara…