Skip to content

feat(dcr): P1-7 RFC 7591 documentation + admin console form (incl. five-scenario perf fixes) - #295

Merged
voidvec merged 5 commits into
masterfrom
feat/p1-7-dcr-docs-ui
Oct 30, 2026
Merged

voidvec merged 5 commits into
masterfrom
feat/p1-7-dcr-docs-ui

Conversation

@voidvec

@voidvec voidvec commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

feat: RFC 7591 DCR — documentation + admin console form (P1-7 #284)

base: feat/p1-5-js-sdk-demo (stacked: P1-2 → P1-6 → P1-1 → P1-4 → P1-8 → P1-3 → P1-5 → this PR)

What

POST /oauth2/register (RFC 7591, admin-gated) existed but was documented nowhere and had no UI. Two surfaces make it a first-class capability:

Docs — docs/guides/build-an-app.md gains "Programmatic registration (RFC 7591)":

  • curl sequence verified end-to-end against a fresh dev stack (admin access token via the seeded fulla-portal client's json-mode login + PKCE → code exchange → Bearer → register → 201);
  • request-field table (defaults per client type, F-017 auth-method rules, redirect scheme policy);
  • post_logout_redirect_uris authority semantics (non-empty authoritative for end_session, empty falls back to login redirect list);
  • shown-once client_secret, client_secret_expires_at: 0, RFC 7592 explicitly a non-goal;
  • zh-CN mirror updated + llms-full.txt regenerated (freshness gate).

Admin console — "Register (RFC 7591)" form on the Applications page (distinct from the admin-API create modal; it exercises the standard endpoint itself):

  • client name/type, token_endpoint_auth_method dropdown locked to none for PUBLIC (F-017 — server rejects anything else), redirect URIs, RFC 7591 grant checkboxes (no device code — the endpoint rejects it), post-logout array;
  • deliberately NO logo_uri field (the DCR body does not process it — ClientRegistrationService; P1-1's write paths own that field);
  • success shows client_secret exactly once (portal display semantics), list refreshes; audit reuses client_registered;
  • i18n EN + zh-CN.

Acceptance criteria → evidence

Criterion Evidence
Documented curl reproduces end-to-end (fresh DB) Verified live during authoring: login→code→token→register returned 201 with the full field set (probe client dcr-doc-probe)
Admin e2e: submit → secret shown once → client in list 4 new mock-driven tests, incl. dynamic list + request-body contract assertions (toMatchObject on the exact RFC 7591 body)
Bilingual docs + llms freshness EN + zh-CN mirrors updated; gen-llms-txt.mjs rerun

Gates (local, all green)

  • admin npm run build (tsc + vite) ✓ · unit 4/4 ✓ · eslint 0 errors (3 pre-existing any warnings untouched) ✓
  • Playwright applications suites 21/21 ✓ (incl. PUBLIC-lock, no-logo_uri/no-device-code shape checks — note logo_uri not logo: "Post-logout" contains the substring "logo")

Out of scope (unchanged non-goals)

RFC 7592 management; open (non-admin-gated) registration.

Also in this PR: five-scenario performance fixes (gate-critical)

The v1.6.0 pre-release five-scenario gate (same-machine back-to-back vs v1.5.0, wrk staircase, repeat arms) found two regressions - both one-extra-DB-round-trip-per-request patterns introduced by P1-3/P1-4 - fixed and re-measured at parity in this branch:

  • S6 userinfo -18%: claim-mappings queried on every call -> process-local cache (write-path invalidated)
  • S3 introspect -17%: oauth2_client_owners queried per request -> plugin TTL cache (60s, precise invalidation from suspend/resume + org soft-delete cascade)

Same-window re-measurement: S6 97-112%, S3 103% vs v1.5.0. Semantic e2e locked (org delete -> introspect inactive stays immediate; CRUD -> immediate publication).

Known issue carried (same as #294, documented there)

One rotating assertion per full-suite run (this round: OpenPlatform RegisterRotateDeleteFlow:671, 61709/61710; every other leg green — macOS, Windows, ASan, gcov). Same login-family DB-lock window; systemic fix is a tracked follow-up.

Ride-alongs in this final push: admin bundle budget re-baseline (P1-7 modal, +2.4KB, justification in-file), api-diff baseline ratification (one additive header), sdk-smoke job ceiling 30->60min (was cancelled mid-build).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T09:16:37.759952Z
We couldn’t complete this review. Comment @codex review to try again.
879b989 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

… console (P1-7 #284)

POST /oauth2/register existed (admin-gated) but was invisible: no docs,
no UI. Two surfaces now make it a first-class capability:

Docs — build-an-app.md (EN + zh-CN mirror, llms-full regenerated) gains
'Programmatic registration (RFC 7591)': a curl sequence verified
end-to-end against a fresh dev stack (admin access token via the seeded
fulla-portal client's json-mode login + PKCE -> code exchange -> Bearer),
a request-field table (defaults, F-017 auth-method rules, redirect
scheme policy) and the post_logout_redirect_uris authority semantics
(non-empty authoritative for end_session, empty falls back to the login
redirect list); response fields incl. the shown-once client_secret and
the RFC 7592 non-goal pointer.

Admin console — a 'Register (RFC 7591)' form on the Applications page
distinct from the admin-API create modal (it exercises the standard
endpoint itself): client name/type, token_endpoint_auth_method dropdown
locked to none for PUBLIC clients (F-017), redirect URIs, the RFC 7591
grant set (authorization_code/refresh_token/client_credentials — no
device code, the endpoint rejects it), post-logout array. Deliberately
NO logo_uri field — the DCR body does not process it; P1-1's write
paths own that field. Success shows the client_secret exactly once
(portal display semantics), the list refreshes, audit reuses
client_registered. i18n EN/zh-CN.

E2e (mock-driven, 4 new, 21/21 applications suites green): modal field
shape incl. the absent logo_uri/device-code fields ('logo_uri' not
'logo' — Post-logout contains the substring), the PUBLIC auth-method
lock, the full register -> secret-once -> list-appearance chain with
request-body contract assertions, and the client-side confidential
redirect-URI guard.
…e-scenario gate)

The v1.6.0 pre-release five-scenario gate (same-machine back-to-back,
v1.5.0 worktree vs this branch, wrk staircase, repeat arms) found two
regressions, both 'one extra DB round trip per request' patterns:

- S6 userinfo -18%: StorageClaimMappingsProvider::getEnabledMappings hit
  Postgres on every userinfo/refresh/code issuance. Wrapped in
  CachedClaimMappingsProvider (process-local, write-path invalidation
  from the claim-mapping CRUD hook that already refreshes discovery,
  60s TTL only bounds cross-process drift). Same-window A/B: 39.7-44.7k
  QPS vs v1.5.0's 40.0-45.9k (97-112%).

- S3 introspect -17%: the P1-4 org-deletion overlay queried
  oauth2_client_owners per request. Now a plugin-level TTL cache (hot
  path: lock + map lookup, no allocation before the lock; 60s TTL,
  precisely invalidated from open-platform suspend/resume and the org
  soft-delete cascade after commit). A first cut with a 3s TTL was
  WORSE (-40%, miss storm over the 512 bench clients); the tuned
  version restores parity: same-window 22.2k vs v1.5.0's 21.5k (103%).

Semantics locked by existing e2e (all green): org delete -> introspect
inactive stays immediate (invalidation fires post-commit); claim-mapping
CRUD -> immediate publication stays immediate (invalidate-then-refetch).
Remaining scenarios within noise (S1 91.7% / S2 94.5% / S5 94.9% mean
across the staircase; low-concurrency single-level dips are small-N
jitter, c16+ levels all 99%+).
@voidvec
voidvec force-pushed the feat/p1-7-dcr-docs-ui branch from 879b989 to a988112 Compare October 30, 2026 01:31
@voidvec
voidvec changed the base branch from feat/p1-5-js-sdk-demo to master October 30, 2026 01:31
…api-diff additions

- admin total 398.4KB -> 400.4KB base (measured 439.3KB vs 438.2KB cap;
  the RFC 7591 modal + bilingual catalog added ~2.4KB) — justification
  per the budget-gate discipline (same as the 2026-09-17 re-baseline);
- api-diff baseline ratifies the one additive public header of the perf
  commit (CachedClaimMappingsProvider.h) — additions only, no removals
  or signature changes (no version bump required).
@voidvec
voidvec merged commit 9558abf into master Oct 30, 2026
13 of 14 checks passed
@voidvec
voidvec deleted the feat/p1-7-dcr-docs-ui branch October 30, 2026 08:16
voidvec added a commit that referenced this pull request Nov 12, 2026
… page + audit export controls (audit wave B)

The #159 gate failed on #329 as designed: the new Claim Mappings page
(table + create/edit modals, lazy route) and the audit-logs export
controls with their bilingual catalogs add ~15.6KB raw to the admin
bundle (456.0KB CI-measured vs the 440.5KB cap; main 156.2KB vs 157.3KB
stayed inside). Same re-baseline path as v1.6.0 P1-7 (#295 precedent);
bases moved to the CI-measured numbers.
voidvec added a commit that referenced this pull request Nov 12, 2026
… page + audit export controls (audit wave B)

The #159 gate failed on #329 as designed: the new Claim Mappings page
(table + create/edit modals, lazy route) and the audit-logs export
controls with their bilingual catalogs add ~15.6KB raw to the admin
bundle (456.0KB CI-measured vs the 440.5KB cap; main 156.2KB vs 157.3KB
stayed inside). Same re-baseline path as v1.6.0 P1-7 (#295 precedent);
bases moved to the CI-measured numbers.
voidvec added a commit that referenced this pull request Nov 12, 2026
… page + audit export controls (audit wave B)

The #159 gate failed on #329 as designed: the new Claim Mappings page
(table + create/edit modals, lazy route) and the audit-logs export
controls with their bilingual catalogs add ~15.6KB raw to the admin
bundle (456.0KB CI-measured vs the 440.5KB cap; main 156.2KB vs 157.3KB
stayed inside). Same re-baseline path as v1.6.0 P1-7 (#295 precedent);
bases moved to the CI-measured numbers.
voidvec added a commit that referenced this pull request Nov 12, 2026
… page + audit export controls (audit wave B)

The #159 gate failed on #329 as designed: the new Claim Mappings page
(table + create/edit modals, lazy route) and the audit-logs export
controls with their bilingual catalogs add ~15.6KB raw to the admin
bundle (456.0KB CI-measured vs the 440.5KB cap; main 156.2KB vs 157.3KB
stayed inside). Same re-baseline path as v1.6.0 P1-7 (#295 precedent);
bases moved to the CI-measured numbers.
voidvec added a commit that referenced this pull request Nov 12, 2026
The #159 gate failed on #305 as designed: the vue-ecosystem minors add
~4.6KB raw to the user bundle (418.6KB CI-measured vs the 414.0KB cap).
Same re-baseline path as #329/#295; bases moved to the CI-measured
numbers.
voidvec added a commit that referenced this pull request Nov 12, 2026
The #159 gate failed on #305 as designed: the vue-ecosystem minors add
~4.6KB raw to the user bundle (418.6KB CI-measured vs the 414.0KB cap).
Same re-baseline path as #329/#295; bases moved to the CI-measured
numbers.
voidvec added a commit that referenced this pull request Nov 12, 2026
The #159 gate failed on #305 as designed: the vue-ecosystem minors add
~4.6KB raw to the user bundle (418.6KB CI-measured vs the 414.0KB cap).
Same re-baseline path as #329/#295; bases moved to the CI-measured
numbers.
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