Skip to content

fix(node-type-registry): grant_privileges type is string[][] not string[]#928

Merged
pyramation merged 1 commit intomainfrom
devin/1774674900-fix-grant-privileges-type
Mar 28, 2026
Merged

fix(node-type-registry): grant_privileges type is string[][] not string[]#928
pyramation merged 1 commit intomainfrom
devin/1774674900-fix-grant-privileges-type

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Fixes the JSON schema for RelationManyToMany.grant_privileges which was missing its items definition, causing codegen to produce string[] instead of the correct string[][].

The actual runtime usage is an array of [verb, columns] tuples — e.g. [['select','*'],['insert','*']] — so the schema now specifies items: { type: "array", items: { type: "string" } }.

The regenerated blueprint-types.generated.ts also picks up cosmetic changes from recently merged PRs (#914, #915) that are now on main ($typepolicy_type on BlueprintPolicy, section comment updates, minor JSDoc tweaks on BlueprintIndex).

Review & Testing Checklist for Human

  • $typepolicy_type rename on BlueprintPolicy: The regenerated file renames this field. Verify that all consumers (agentic-db, constructive-db blueprints, construct_blueprint() SQL) already expect policy_type and not $type. If any consumer still uses $type, this is a breaking change.
  • grant_privileges correctness: Confirm that construct_blueprint() and secure_table_provision actually consume grant_privileges as a 2D array (array of [verb, columns] tuples). If the server flattens or interprets it differently, the type could still be wrong.

Notes

  • The source change is only in relation-many-to-many.ts (6 lines added to the JSON schema items definition). Everything in blueprint-types.generated.ts is regenerated output.
  • Discovered while updating agentic-db to node-type-registry@0.6.0 — the M2M relations with grant_privileges: [['select','*'], ...] failed type checking.

Link to Devin session: https://app.devin.ai/sessions/ce1b2dafd42341bea5d7793b0c05ba6c
Requested by: @pyramation

…ng[]

The JSON schema for RelationManyToMany.grant_privileges was missing items
definition, causing codegen to produce string[] instead of string[][].
The actual usage is array of [verb, columns] tuples, e.g.
[['select','*'],['insert','*']].
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit ae3861d into main Mar 28, 2026
43 checks passed
@pyramation pyramation deleted the devin/1774674900-fix-grant-privileges-type branch March 28, 2026 10:58
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