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] A duplicate top-level key in apm.yml makes apm install drop the first block and delete its deployed files #3691
After a bad merge, apm.yml can contain two dependencies: blocks. Bare apm install (also apm lock and apm compile) silently uses the last block, treats the first block's packages as removed and deletes their deployed files ("6 stale files cleaned"). apm install PKG and apm uninstall reject the same file with a raw DuplicateKeyError (with a yaml.dev link) followed by "Install interrupted".
To reproduce
apm.yml with two dependencies: keys, each listing a different package; both installed.
apm install
Expected behavior
One actionable error that names the duplicate key, before any file is removed.
Actual behavior
Silent last-wins and deletion of the first block's files.
Options
Reject duplicate keys in apm.yml only, in the manifest load path, with one actionable error.
Reject duplicate keys in the shared YAML loader (also affects frontmatter and lockfiles).
Warn only.
Found by the 0.36.0 pre-release lifecycle sweep, round 2 (#3649). Same behavior on v0.35.1, so this is not a 0.36 regression.
Decision (maintainer): duplicate top-level keys in apm.yml are rejected in the manifest load path with one actionable error that names the key, before any file is touched. The shared YAML loader is unchanged. Planned for 0.36.0 in the round-2 sweep PR (#3649).
Activity
danielmeppiel commentedon Nov 12, 2026
Decision (maintainer): duplicate top-level keys in
apm.ymlare rejected in the manifest load path with one actionable error that names the key, before any file is touched. The shared YAML loader is unchanged. Planned for 0.36.0 in the round-2 sweep PR (#3649).test(pack): stop appending a duplicate dependencies key after apm init (
fix(manifest): refuse duplicate top-level keys on the same line (#3691)
fix(manifest): refuse duplicate top-level keys in apm.yml before any …
test(pack): stop appending a duplicate dependencies key after apm init (
fix(manifest): refuse duplicate top-level keys on the same line (#3691)
fix: 0.36.0 red-team round 2 (MCP config safety, user-file collisions…