Skip to content

docs(security): document scope-depth (ADR-0057 D1) + open/paid boundary (ADR-0016) - #2118

Merged
xuyushun441-sys merged 1 commit into
mainfrom
docs/scope-depth-openpaid
Jun 21, 2026
Merged

xuyushun441-sys merged 1 commit into
mainfrom
docs/scope-depth-openpaid

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Collaborator

Audit follow-up after cloud #401 (security-enterprise / hierarchy rollup landed): scope-depth + the open/paid boundary were undocumented in both the objectstack-data skill and the security guide.

Why it matters

readScope/writeScope (own / own_and_reports / unit / unit_and_below / org) is the core declarative ERP authz axis (ADR-0057 D1). Undocumented, an AI author:

  • doesn't know it exists → falls back to hand-written RLS (exactly what ADR-0057 removes);
  • doesn't know the open/paid boundary → uses unit in open-source, where it silently fails closed to own.

What

  • skills/objectstack-data: new "Access depth (scope-depth)" section before RLS — the 5-value table, a usage example, and the ADR-0016 open-core boundary (hierarchy-relative scopes need the paid @objectstack/security-enterprise; fail closed to own without it; defineStack requires ['hierarchy-security']).
  • guides/security.mdx: matching scope-depth section under Object Permission Levels.

Doc/skill-only · check:skill-docs in sync · docs build green (1113 pages).

showcase deliberately NOT touched — it's open-source, so a unit scope there would fail-closed to own and mislead; the showcase-scope-depth dogfood already proves the capability with a reference resolver.

🤖 Generated with Claude Code

…ry (ADR-0016)

scope-depth (readScope/writeScope = own/own_and_reports/unit/unit_and_below/org)
is the core declarative ERP authz axis, but it was undocumented in both the
objectstack-data skill and the security guide — so an AI author wouldn't know it
exists (and would fall back to hand-written RLS, exactly what ADR-0057 removes),
and wouldn't know the open/paid boundary (using `unit` in open-source silently
fails closed to `own`).

- skills/objectstack-data: new "Access depth (scope-depth)" section before RLS —
  the 5-value table + a usage example + the ADR-0016 open-core boundary
  (hierarchy-relative scopes need @objectstack/security-enterprise; fail closed to
  `own` without it; defineStack requires ['hierarchy-security']).
- guides/security.mdx: matching scope-depth section under Object Permission Levels.

Doc/skill-only. check:skill-docs in sync; docs build green (1113 pages).
showcase deliberately NOT touched — it's open-source, so a `unit` scope there
would fail-closed to `own` and mislead; the showcase-scope-depth dogfood already
proves the capability with a reference resolver.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 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 21, 2026 9:30am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/s labels Jun 21, 2026
@xuyushun441-sys
xuyushun441-sys merged commit da28be0 into main Jun 21, 2026
15 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the docs/scope-depth-openpaid branch June 21, 2026 09:34
os-zhuang added a commit that referenced this pull request Jun 30, 2026
chore: release packages (#2118)

objectui@4a259042dbede9cfab04580f444d1184b6f375dc

This branch was successfully deployed

1 active deployment
Preview — 6fc0bf79 Deployed Jun 21, 2026 by vercel[bot]
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/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants