Skip to content

TML-2503: plan complete Supabase contract + extension-aware contract infer#899

Open
wmadden-electric wants to merge 1 commit into
mainfrom
extension-supabase-infer-and-completeness
Open

TML-2503: plan complete Supabase contract + extension-aware contract infer#899
wmadden-electric wants to merge 1 commit into
mainfrom
extension-supabase-infer-and-completeness

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

Linked issue

Refs TML-2503. Planning-doc update for the extension-supabase project. Docs-only.

Summary

Records an operator scope decision: contract infer in a Supabase environment must write a meaningful contract.prisma that omits every element the Supabase extension owns. That makes brownfield adoption a launch requirement — and requires the extension to ship a complete, faithful contract as the source of truth for what it owns.

What changed

  • plan.md — mark Slice D done (TML-2503: Supabase-internal namespaces via a secondary db.supabase root (slice D) #845); add:
    • Slice F — Complete, faithful Supabase contract (all owned auth/storage tables + native enum types + roles, via introspection per C8). Gated on native enums (in flight) — Supabase's auth schema uses native Postgres enum types. It's the ownership source of truth for verify, the db.supabase admin surface, and Slice G.
    • Slice G — Extension-aware contract infer — writes an app-only contract.prisma omitting pack-owned elements. Gated on F + framework/CLI changes.
    • Slice E gate → B–G done.
  • decisions.mdC16: brownfield contract infer must omit extension-owned elements. Records that infer is not extension-aware today (no contract → introspects public, emits everything managed, blind to pack ownership), and that making it extension-aware (subtract the stack packs' owned set) is a launch requirement, not a follow-up.
  • deferred.md — un-defer "introspection-based emit" and "adopt --from-database" (now Slices F/G).

Reviewer notes

  • Pure planning docs; no code.
  • The two new slices carry a "shaping needed at pickup" note — the introspection→emit pipeline (F) and how contract infer learns the pack's owned set + the subtraction rule (G) are non-trivial framework/CLI design still to be shaped; this PR represents the deliverables + gates, not the mechanism.
  • Grounding for C16 (verified against the code): external verify suppresses extra tables/columns/drift and only fails on declaredMissing; the app's own public stays managed (per-contract defaultControlPolicy); contract infer sets no control policy and consults no extension pack.

Testing performed

n/a — documentation only.

Skill update

n/a — internal planning docs; no user-facing surface change.

Checklist

  • All commits are signed off (git commit -s).
  • I read CONTRIBUTING.md and the change is scoped to one logical concern.
  • Tests are updated (n/a — doc-only).
  • The PR title is in TML-NNNN: <title> form — Linear-prefixed below.
  • The Skill update section is filled in.

…Supabase)

Operator scope decision: `contract infer` in a Supabase environment must write a
meaningful contract.prisma that omits every element the Supabase extension owns.
That makes brownfield adoption a launch requirement and requires the extension to
ship a complete/faithful contract (the ownership source of truth).

- plan.md: mark Slice D done (#845); add Slice F (complete Supabase contract via
  introspection — gated on native enums) and Slice G (extension-aware contract
  infer — subtracts pack-owned elements; gated on F + CLI work); Slice E gate -> B-G.
- decisions.md: C16 (brownfield infer omits extension-owned elements; infer is not
  extension-aware today; ownership from the pack complete contract).
- deferred.md: un-defer introspection-emit + adopt-from-database (now Slices F/G).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
@wmadden-electric wmadden-electric requested a review from a team as a code owner July 2, 2026 06:22
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (3)
  • projects/extension-supabase/plan.md is excluded by !projects/**
  • projects/supabase-integration/decisions.md is excluded by !projects/**
  • projects/supabase-integration/deferred.md is excluded by !projects/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 382d9908-00ea-4d92-adee-488142a7e87e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch extension-supabase-infer-and-completeness

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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