Skip to content

feat(app-showcase): ADR-0056 declarative private-OWD scenario + proof#2062

Merged
os-zhuang merged 2 commits into
mainfrom
claude/adr-0056-p1-private-owd
Jun 20, 2026
Merged

feat(app-showcase): ADR-0056 declarative private-OWD scenario + proof#2062
os-zhuang merged 2 commits into
mainfrom
claude/adr-0056-p1-private-owd

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

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_note declares sharingModel: 'private' + an owner_id field and nothing else — no RLS policy, no owner predicate, no permission-set rule. The engine derives owner scoping from the OWD baseline + the auto-stamped owner_id. This is the declarative counterpart to the invoice's hand-written owner = current_user.email escape-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.ts5/5:

  • owner_id is auto-stamped (no manual assignment, no predicate)
  • a member lists only the notes they own
  • a member cannot read another owner's note by id
  • a member cannot write another owner's note, can write their own
  • the other member is symmetric

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 (D1 public_read/public_read_write enforcement + 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

…(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
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 20, 2026 7:10am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling labels Jun 20, 2026
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

No 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants