Skip to content

fix: only flag same-level create/update conflicts#146

Merged
tfwright merged 1 commit into
mainfrom
fix/validate-conflicts-per-level
May 15, 2026
Merged

fix: only flag same-level create/update conflicts#146
tfwright merged 1 commit into
mainfrom
fix/validate-conflicts-per-level

Conversation

@tfwright
Copy link
Copy Markdown
Owner

Summary

The validation added in #144 rejected any configuration where create_with: false (or update_with: false) appeared at one config level while a custom :create (or :edit) component appeared at another. That's incompatible with the documented use case from #139: disable create globally, then re-enable it per-resource via a custom component.

Change

Walk each config level independently. Only raise when a single level contains both the disabling option and the custom component. Cross-level overrides resolve via normal precedence (resource > scope > app), with the more-specific level winning.

Tests

  • Kept the existing same-level (resource) test
  • Added same-level tests at scope and app levels
  • Flipped the two cross-level tests from "raises" to "returns :ok"

PR #144 raised whenever `create_with: false` appeared at any level
while a custom `:create` component appeared at any other level,
treating cross-level configurations as contradictory. That blocks
the pattern #139 describes: disable create globally, then re-enable
it per-resource via a custom component.

Walk each level independently. A configuration is only contradictory
when a single level sets both the disabling option and the custom
component; cross-level overrides resolve normally with the
more-specific level winning.
@tfwright tfwright merged commit e892371 into main May 15, 2026
6 checks passed
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.

1 participant