Skip to content

Reshape the feature gate into a feature-centric FeatureFlags abstraction - #432

Merged
em3s merged 1 commit into
mainfrom
refactor/feature-flags
Jul 20, 2026
Merged

em3s merged 1 commit into
mainfrom
refactor/feature-flags

Conversation

@em3s

@em3s em3s commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Reworks #430's database-keyed feature gate into a feature-centric, scope-targeted config backed by a general FeatureFlags. Infrastructure only — INSERT_MERGE is reserved but not consumed yet.

actionbase:
  feature-flags:
    - feature: INSERT_MERGE
      scope:
        databases: [fanin]

Changes

  • Feature (sealed) + MutationFeature (renamed from TableFeature): a feature is named by its nature, not its target
  • FeatureFlags (core): folds the baseline once into an immutable database -> features map; has(scope, feature) is allocation-free on the hot path
  • ServerProperties: bind actionbase.feature-flags with the scope.databases shape; boot fails on unknown or duplicate feature
  • GraphConfig / Graph: thread the baseline; Graph exposes featureFlags

How to Test

./gradlew :core:test --tests "*FeatureFlagsTest" :server:test --tests "*ServerPropertiesTest"

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code (Opus 4.8, 1M context)

Rework #430's database-keyed config into a feature-centric, scope-targeted
shape backed by a general FeatureFlags. Infrastructure only — INSERT_MERGE is
reserved but not consumed yet.

- Feature (sealed) + MutationFeature (renamed from TableFeature): a feature is
  named by its nature, not its target
- FeatureFlags (core): folds the baseline once into an immutable
  database -> features map; has(scope, feature) is allocation-free
- ServerProperties: bind actionbase.feature-flags with the scope.databases
  shape; boot fails on unknown or duplicate feature
- GraphConfig / Graph: thread the baseline; Graph exposes featureFlags

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@em3s
em3s force-pushed the refactor/feature-flags branch from 599e94a to 6a8b454 Compare July 20, 2026 01:03
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 20, 2026
@em3s

em3s commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Optimistic

@em3s
em3s merged commit 1519fbd into main Jul 20, 2026
2 of 4 checks passed
@em3s
em3s deleted the refactor/feature-flags branch July 20, 2026 01:21
@em3s em3s self-assigned this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant