Skip to content

fix(build): detect component name collisions during --plan#33

Merged
rldyourmnd merged 1 commit into
mainfrom
work/rvr-plan-collision
Jul 21, 2026
Merged

fix(build): detect component name collisions during --plan#33
rldyourmnd merged 1 commit into
mainfrom
work/rvr-plan-collision

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

What

The user-scope component collision guard only fired on a real apply (NDDEV_DRY_RUN=0). During a dry-run plan nddev::copy writes nothing, so the destination never materialized and the guard never tripped — a plan reported success for inputs the subsequent apply would reject.

nddev::assert_component_graph (new) is a source-side check run in copy_source_tree for both plan and apply. It rejects duplicate skill/command/agent destination basenames across the direct source tree and every installed plugin, with a diagnostic naming both colliding origins. Bash 3.2-safe (no associative arrays). The on-disk guard in flatten_plugin_components stays for the complementary case a plan cannot see: a projected component overwriting a file already present in the target (e.g. restored user runtime state) on apply.

Verification

  • ShellCheck 0.11.0 — PASS
  • Private harness lanes (zcode slice incl. new collision regression) — PASS

The user-scope component collision guard only fired on a real apply
(NDDEV_DRY_RUN=0). During a dry-run plan nddev::copy writes nothing, so the
destination never materialized and the guard never tripped -- a plan reported
success for inputs that the subsequent apply would reject.

Add nddev::assert_component_graph, a source-side check run in copy_source_tree
for both plan and apply, that rejects duplicate skill/command/agent destination
basenames across the direct source tree and every installed plugin, with a
diagnostic naming both colliding origins. Kept Bash 3.2-safe (no associative
arrays). The on-disk guard in flatten_plugin_components stays for the
complementary case a plan cannot see: a projected component overwriting a file
already present in the target (e.g. restored user runtime state) on apply.
@rldyourmnd
rldyourmnd merged commit 41b2d64 into main Jul 21, 2026
1 check passed
@rldyourmnd
rldyourmnd deleted the work/rvr-plan-collision branch July 21, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant