feat(node-type-registry): add table_provision to BlueprintMembershipType#988
Merged
pyramation merged 1 commit intomainfrom Apr 17, 2026
Merged
Conversation
Mirrors the table_provision override added in constructive-db PR #824. Introduces a BlueprintEntityTableProvision interface (policies[], nodes[], fields[], grant_privileges[], grant_roles[], use_rls) with the same vocabulary as BlueprintTable / secure_table_provision, and adds table_provision?: BlueprintEntityTableProvision to BlueprintMembershipType. Also refreshes JSDoc for is_visible (no-op when table_provision is supplied) and skip_entity_policies (escape hatch for zero policies). Regenerated blueprint-types.generated.ts via `pnpm generate: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
Mirrors the
table_provisionoverride added toentity_type_provisionin constructive-db PR #824 at the TypeScript-blueprint layer.BlueprintEntityTableProvisioninterface withuse_rls?,nodes?,fields?,grant_privileges?,grant_roles?,policies?— same vocabulary asBlueprintTable/secure_table_provision.table_provision?: BlueprintEntityTableProvisiontoBlueprintMembershipType.is_visible(now gates one of five default policies; no-op whentable_provisionis supplied) andskip_entity_policies(escape hatch for zero policies).graphql/node-type-registry/src/codegen/generate-types.ts(the AST-based generator); the checked-inblueprint-types.generated.tswas produced bypnpm generate:types.Client-side only — these types exist purely for autocomplete/typechecking when authoring blueprint JSON. Runtime validation lives in
metaschema_modules_public.validate_blueprint_definition()on the database side.Review & Testing Checklist for Human
policies[],nodes[],fields[],grant_privileges[],grant_roles[],use_rlson thetable_provisionobject. Confirm the TS types don't drift (note:grant_privileges, notgrants— this differs fromBlueprintTable, which usesgrants).table_provision=NULL→ 5 defaults (gated byis_visible);table_provisionobject → caller'spolicies[]only,is_visibleno-op;skip_entity_policies=true+ NULL → 0 policies.pnpm --filter node-type-registry generate:typeson your machine produces the same output (no drift vs. the committed.generated.ts).Test plan
cd graphql/node-type-registry && pnpm generate:types— should be a no-op diff.pnpm buildat repo root — passed locally; expect green in CI.BlueprintMembershipTypehas the newtable_provision?: BlueprintEntityTableProvisionand thatBlueprintEntityTableProvisionreferencesBlueprintNode,BlueprintField, andBlueprintPolicyfrom the same file.Notes
grant_privilegesis typed asunknown[]to match the existinggrants: unknown[]convention onBlueprintTable. A tuple type ([string, string | string[]]) would be stricter but inconsistent with the rest of the blueprint surface; happy to tighten if you want.table_provisionis optional, so existing blueprints continue to typecheck unchanged.Link to Devin session: https://app.devin.ai/sessions/6aad642053f844439cbdbb0ce928bc08
Requested by: @pyramation