Skip to content

fix: honour additive_plugins in environments sync - #1138

Open
yaunj wants to merge 1 commit into
github-community-projects:main-enterprisefrom
yaunj:fix/environments-additive
Open

yaunj wants to merge 1 commit into
github-community-projects:main-enterprisefrom
yaunj:fix/environments-additive

Conversation

@yaunj

@yaunj yaunj commented Nov 9, 2026

Copy link
Copy Markdown

Fixes #1133

Why

Environments overrides sync() and calls remove() for every environment not in the config, without checking this.additive. With additive_plugins: [environments], undeclared environments are still deleted, and nop mode plans the deletion instead of reporting it as suppressed.

Approach

  • In Environments.sync(), skip remove() when this.additive is set.
  • In nop mode, emit the same "Additive mode active: N deletion(s) suppressed by additive_plugins" NopCommand as Diffable.sync().
  • Non-additive behaviour is unchanged.

Validation

  • 2 new tests in test/unit/lib/plugins/environments.test.js (both fail without the fix).
  • Unit suite: 1017 passed, 12 skipped.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

environments: additive_plugins is ignored, undeclared environments are deleted

1 participant