Skip to content

feat(admin): audit wave B — audit-export UI, claim-mappings console, release three-part gate docs - #329

Merged
voidvec merged 2 commits into
masterfrom
feat/audit-wave-b-admin-ui
Nov 12, 2026
Merged

voidvec merged 2 commits into
masterfrom
feat/audit-wave-b-admin-ui

Conversation

@voidvec

@voidvec voidvec commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

Executes Wave B of the 2026-11 P0/P1 retro-audit fix plan (companion to #328 which landed Wave A):

  • Audit-export UI (audit finding #4a): the Audit Logs page gains a time-windowed Export CSV action against GET /api/admin/logs/export. from/to datetime-local inputs default to the last 24h when empty (the mandatory-window contract can never be tripped by accident); the active action/outcome/actor filters ride along; the download goes through a blob; and a blob-decoding error path lets AUDIT_EXPORT_WINDOW_REQUIRED / AUDIT_EXPORT_TOO_LARGE surface through the normal error catalog messages.
  • Claim-mappings console (audit finding #4b, the UI follow-up declared in feat(claims): P1-3 custom attributes + claims mapping (id_token/userinfo publication) #293): new Claim Mappings page (nav under Scopes) driving the /api/admin/claim-mappings CRUD end to end — create/edit modals with a scope-name datalist and the custom_attributes.<key> / user.display_name source-whitelist hint, a row-level enable toggle that issues the documented full-replace PUT, and a confirm-guarded delete.
  • Release three-part gate (audit finding test: use valid token format in OAuth2InvalidClientHeaderTest #5): versioning-and-release.md gains §11.0 — the pre-release gate (five-scenario benchmark ≥ 90% in-tree, curated CHANGELOG, six-point version sync) that v1.5.0 silently skipped, in EN + zh mirror; the release-engineering checklist gains the same blocking gate; the PR template gains a release-PR checklist section.
  • CHANGELOG [Unreleased] entry added.

Verification (local)

Gate Result
admin npm run build (tsc + vite) green
admin vitest (i18n parity included) 4/4
Playwright: logs.spec (12, incl. 2 new export cases) + claim-mappings.spec (5 new, incl. POST/PUT contract-body assertions) + navigation + i18n regression 29/29 green (one combined-run flake observed once, not reproducible in 3 reruns)
zh-mirror consistency 51/51 OK
check-doc-links 356 links green
llms regen zero drift (only llms-full.txt carries the versioning-doc delta)

Out of scope

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-12T02:02:38.323348Z
We couldn’t complete this review. Comment @codex review to try again.
7816f36 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.

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.
…release three-part gate docs

Closes the two v1.6.0 frontend-leg gaps from the 2026-11 P0/P1 retro
audit (#4: logs/export had no consumer; claim-mappings had no UI — the
follow-up declared in #293) and processizes the pre-release three-part
gate that v1.5.0 silently skipped (#5).

- Audit Logs page: time-windowed Export CSV action (datetime-local
  inputs; empty from/to defaults to the last 24h so the mandatory-window
  contract is never tripped by accident), blob download, and a
  blob-decoding error path so AUDIT_EXPORT_WINDOW_REQUIRED /
  AUDIT_EXPORT_TOO_LARGE surface through the normal catalog messages.
- New Claim Mappings page (/admin/claim-mappings, nav under Scopes):
  create/edit modals with the scope-name datalist and the
  custom_attributes.<key> / user.display_name source-whitelist hint,
  row-level enable toggle issuing the documented full-replace PUT,
  confirm-guarded delete — mirrors the P1-3 red lines in the mock and
  specs (reserved-claim 400, openid-scope 400).
- Release process: versioning-and-release.md gains the pre-release
  three-part gate section (five-scenario benchmark >= 90% in-tree,
  curated CHANGELOG, six-point version sync) in EN + zh mirror; the
  release-engineering checklist gains the same blocking gate; the PR
  template gains a release-PR checklist section.
- e2e: logs.spec +2 (window params, catalog error), claim-mappings.spec
  new (5 cases incl. contract-body assertions). Mock-api gains the
  export route (window guard + text/csv) and an in-memory claim-mappings
  CRUD mirroring the server red lines.

Verification: admin tsc+vite build green; vitest 4/4; Playwright
logs(12) + claim-mappings(5) + navigation/i18n regression suites green;
zh-mirror consistency 51/51; doc-links 356 green; llms regen zero drift.
… 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
voidvec force-pushed the feat/audit-wave-b-admin-ui branch from e422793 to ad2000b Compare November 12, 2026 04:44
@voidvec
voidvec merged commit a94fd8f into master Nov 12, 2026
11 checks passed
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.
@voidvec
voidvec deleted the feat/audit-wave-b-admin-ui branch November 13, 2026 03:02
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.

2 participants