Skip to content

feat(node-type-registry): add DataLimitCounter, DataFeatureFlag, AuthzAppMembership#1060

Merged
pyramation merged 2 commits intomainfrom
feat/upstream-node-types
May 6, 2026
Merged

feat(node-type-registry): add DataLimitCounter, DataFeatureFlag, AuthzAppMembership#1060
pyramation merged 2 commits intomainfrom
feat/upstream-node-types

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented May 6, 2026

Summary

Upstreams 3 node type definitions currently defined locally in constructive-db, and removes the deprecated AuthzMembership:

  • DataLimitCounter — Declarative limit-tracking triggers (increment on INSERT, decrement on DELETE). Requires a provisioned limits_module.
  • DataFeatureFlag — Gates tables behind cap-based feature flags (max=0 disabled, max=1 enabled). Backed by limit_caps / limit_caps_defaults tables.
  • AuthzAppMembership — App-level membership check hardcoded to membership_type=1. Replaces the old AuthzMembership which has been removed.

Breaking change: AuthzMembership is removed from the package. All consumers should use AuthzAppMembership instead. The constructive-db RLS parser and generators already only accept AuthzAppMembership.

Once published as a new npm version, the local definitions in constructive-db/packages/node-type-registry/src/ can be removed — the dedup logic in generate.ts automatically drops local types that exist upstream.

Review & Testing Checklist for Human

  • Verify no downstream consumers still import AuthzMembership from this package
  • Verify the parameter_schema for each new type matches what constructive-db generators expect
  • After publishing, bump node-type-registry in constructive-db and remove the 3 local .ts files

Notes

Net change: 58 types (was 57). Added 3 new types, removed 1 old type (AuthzMembership). Build passes, blueprint types regenerated.

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

…zAppMembership

- DataLimitCounter: attaches limit-tracking triggers (increment on INSERT, decrement on DELETE)
- DataFeatureFlag: gates tables behind cap-based feature flags (max=0/1)
- AuthzAppMembership: app-level membership check (hardcoded membership_type=1), replaces AuthzMembership for clarity
@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

…pMembership

- Delete authz-membership-check.ts (the old AuthzMembership type)
- Remove export from authz/index.ts
- Regenerate blueprint-types with AuthzAppMembership in the union
@pyramation pyramation merged commit 36aabe0 into main May 6, 2026
53 checks passed
@pyramation pyramation deleted the feat/upstream-node-types branch May 6, 2026 07:01
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