Skip to content

test(app-showcase): ADR-0090 configuration-surface test round — positions UI, mapping, developer authoring chain - #2915

Merged
os-zhuang merged 1 commit into
mainfrom
claude/permission-model-testing-d5a460
Jul 14, 2026
Merged

test(app-showcase): ADR-0090 configuration-surface test round — positions UI, mapping, developer authoring chain#2915
os-zhuang merged 1 commit into
mainfrom
claude/permission-model-testing-d5a460

Conversation

@baozhoutao

Copy link
Copy Markdown
Contributor

Summary

Second round of ADR-0090 permission-model testing (follow-up to #2910), covering the configuration surfaces the first round didn't touch:

  1. How an admin configures positions — Setup app → Access Control → Positions: list, create form, position detail related lists (Holders / Permission Sets), non-admin denial, built-in anchor (everyone) delete protection. (checklist section N, 6 cases)
  2. How positions map to permission sets — end-to-end: bind a set to a position via the junction related list / REST, assign a holder, and observe the grant become effective and the revoke take effect immediately from the assignee's own session. (section O, 9 cases)
  3. How a developer authors permission setsdefinePermissionSetobjectstack build → boot reprojection; FLS change verified end-to-end with before/after screenshots; access-matrix snapshot gate (drift fails the build with a precise message, --update-access-matrix regenerates); package-set edits via env gate rejected with 403 (ADR-0086/0094); runtime-set full lifecycle; seed idempotency. (section P, 7 cases)

What's in this PR

  • e2e/permission-model-admin.spec.ts — new spec, 14 tests, all green (full permission suite now 25/25)
  • playwright.permission.config.ts / playwright.config.ts — glob widened to permission-model*.spec.ts
  • docs/test/permission-model-test-checklist.md — sections N/O/P added
  • docs/test/permission-model-test-report.md — §4 configuration-surface details, §5 two new observations, §6 screenshot index
  • 11 evidence screenshots under docs/test/screenshots/

Notable observations (documented in the report)

  • Cookie-less sessions render FLS fail-open in the console: injecting only the localStorage auth token (no better-auth cookie) leaves FLS-locked fields editable in the UI; the data plane still enforces. UI tests must inject cookies into storageState.
  • Lookup grid columns show the target record's name (API name), e.g. showcase_auditor instead of its display label.

Destructive cases (P3 source edit + rebuild, P4 matrix drift) are documented as manual-replay steps in the report rather than committed as spec code.

Test plan

  • PERM_BASE_URL=http://localhost:3777 pnpm exec playwright test --config playwright.permission.config.ts — 25/25 passed
  • Sources restored after destructive cases (src/security/permission-sets.ts, access-matrix.json match main)

@vercel

vercelBot commented Jul 14, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJul 14, 2026 12:46pm

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests size/m labels Jul 14, 2026
@os-zhuang
os-zhuang merged commit 3705c67 into mainJul 14, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/permission-model-testing-d5a460 branch July 14, 2026 14:11
os-zhuang added a commit that referenced this pull request Jul 14, 2026
…position UI, position→permission-set mapping, developer authoring chain (#2915)"
This reverts commit 3705c67.
… UI, position→permission-set mapping, developer authoring chain
Second round of ADR-0090 permission-model testing covering the configuration
surfaces (checklist sections N/O/P):
- N: admin configures positions via Setup UI (list, create form, related
lists, non-admin denial, built-in anchor delete protection) — 6 cases
- O: position→permission-set mapping end-to-end (bind via junction, assign
holder, live grant/revoke observed from the assignee's session) — 9 cases
- P: developer authoring chain (definePermissionSet → build → boot
reprojection, FLS end-to-end with visual proof, access-matrix snapshot
gate, package-set 403 write-through, runtime-set lifecycle, seed
idempotency) — 7 cases
New e2e/permission-model-admin.spec.ts (14 tests, all green; full permission
suite 25/25) + 11 evidence screenshots + report §4 configuration-surface
details and two new observations (cookie-less FLS render fail-open,
lookup column shows target API name).
os-zhuang added a commit that referenced this pull request Jul 16, 2026
…hen + role-gated option (#2559) (#3006)
Adds `showcase_cascade`, a served fixture that exercises the B3 server-side
option-value enforcement (objectql `evaluateOptionVisibility`, #2915 / #1583):
- country → province cascade — `province` declares `dependsOn: ['country']`
and each option gates itself with a `visibleWhen` CEL predicate. The client
narrows the offered set; the rule-validator rejects an out-of-set submit
(`{ field, code: 'invalid_option' }`).
- a role-gated `tier.restricted` option (`'admin' in current_user.positions`),
enforced server-side the same way.
`public_read_write` (no permission set → absent from the ADR-0090 access-matrix),
wired into the Showcase app's Data Model nav. Verified live against a fresh
backend: POST /api/v1/data/showcase_cascade rejects country=us+province=zj
(400 invalid_option) and accepts country=cn+province=zj (201);
GET /api/v1/meta/object/showcase_cascade serves the per-option visibleWhen to the
client. Drives objectui e2e/live/cascading-options.spec.ts.
Claude-Session: https://claude.ai/code/session_01S91NyYJURiQTKmF9q3AXxg
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mtests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@baozhoutao@os-zhuang