feat: sync entity_lookup + dynamic scope resolution from constructive-db#1231
Merged
Merged
Conversation
Syncs node-type-registry changes from constructive-db PRs #1361, #1368: - Add entity_lookup param to 10 generators (all limit + event generators) for FK-based entity_id resolution (e.g., channel_id → channels.entity_id) - Add scope param to enforce-aggregate, warning-aggregate, warning-rate (previously hardcoded to membership_type 2/1) - Remove enum constraint on scope — now supports any provisioned type (app, org, data_room, channel, team, etc.) via dynamic resolution - Regenerate blueprint-types.generated.ts with updated param shapes All Event*, Limit*, Process*, and Billing* node types now support: - entity_lookup for FK chain resolution - Dynamic scope for type 3+ membership types
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syncs node-type-registry changes from constructive-db PRs #1361 and #1368 into the constructive monorepo. These changes make all Limit*, Event*, Process*, and Billing* generators 100% entity-context-aware.
Changes to 10 limit + event generators:
channel_id → channels.entity_id) when the trigger table doesn't have entity_id directlyLimitEnforceAggregate,LimitWarningAggregate,LimitWarningRate(previously hardcoded to membership_type 2 or 1)LimitEnforceCounter,LimitEnforceFeature,LimitWarningCounter— now accepts any provisioned membership type prefix (app, org, data_room, channel, team, etc.) resolved dynamically viamemberships_moduleFiles changed: 8 limit generators + 2 event generators + 1 generated types file
Review & Testing Checklist for Human
blueprint-types.generated.tslooks correct — should haveentity_lookupwith{obj_table, obj_schema?, obj_field}shape on all Limit* and Event* param interfacesenum: ['app', 'org']constraint on counter/feature/warning-counter generatorsNotes
The job/trigger.ts and all process/* generators were already synced in a previous session — confirmed identical with constructive-db.
The
codegen/generate-types.tsandmodule-presets/b2b-storage.tshave a separatestorage_key → keyrename that is unrelated to this work and not included here.Link to Devin session: https://app.devin.ai/sessions/b289975a3ff3427783ec4910814658ee
Requested by: @pyramation