feat(app-showcase): ADR-0056 declarative private-OWD scenario + proof#2062
Merged
Conversation
…(ADR-0056) First execution increment of ADR-0056: demonstrate the declarative owner-private capability on the real showcase. `showcase_private_note` declares `sharingModel: 'private'` + an `owner_id` field and NOTHING else — no RLS, no predicate, no permission-set rule. The engine derives owner scoping from the OWD baseline + auto-stamped owner_id. Proof (`showcase-private-owd.dogfood.test.ts`, 5/5, real HTTP): two plain sign-ups each create notes; each lists only their own, cannot read/write another owner's by id, can write their own — owner_id auto-stamped, zero authored RLS. Full dogfood 11 files / 86 tests; showcase units 20. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVdnfUAx85amkerym26vdx
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 1 changed package(s). ✅ |
Sibling of the private-note scenario: showcase_announcement declares sharingModel: 'read' (everyone reads, only owner edits) — no RLS authored. Proof showcase-public-read-owd (3 tests) shows cross-owner READ allowed but cross-owner WRITE denied, contrasting the private note's hidden rows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVdnfUAx85amkerym26vdx
os-zhuang
marked this pull request as ready for review
June 20, 2026 07:26
This was referenced Jun 20, 2026
Merged
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.
What
First execution increment of ADR-0056 — demonstrate the headline declarative owner-private capability on the real showcase, with an end-to-end proof.
showcase_private_notedeclaressharingModel: 'private'+ anowner_idfield and nothing else — no RLS policy, no owner predicate, no permission-set rule. The engine derives owner scoping from the OWD baseline + the auto-stampedowner_id. This is the declarative counterpart to the invoice's hand-writtenowner = current_user.emailescape-hatch (PR #2054): for plain "my records are mine" ownership, an object declares one word and the platform enforces it.Proof (real HTTP stack)
showcase-private-owd.dogfood.test.ts— 5/5:owner_idis auto-stamped (no manual assignment, no predicate)Full dogfood 11 files / 86 tests; showcase units 20/20; showcase build clean.
Where this sits in ADR-0056
This is the demonstrable slice of the OWD work (the "declare
private, get isolation" thesis). It does not yet change any existing behavior — it adds a new object + proof. Remaining ADR-0056 decisions (D1public_read/public_read_writeenforcement + reject-unknown, D2 anonymous default-deny, D4 compiler authoring-validation, D7 default Profile, D8 experimental-tagging, D10 conformance matrix) follow as separate phased PRs, each with its own scenario + proof, per the ADR's "ratchet, not retrofit" mandate.🤖 Generated with Claude Code
Generated by Claude Code