Skip to content

feat: wave 6 TS platform (shared limits, typed endpoints, dashboard session, a11y) - #222

Merged
thegdsks merged 9 commits into
release/wave6-2026-10from
feat/wave6-ts
Oct 13, 2026
Merged

thegdsks merged 9 commits into
release/wave6-2026-10from
feat/wave6-ts

Conversation

@thegdsks

Copy link
Copy Markdown
Member

Five commits for the wave 6 release branch.

Commits

  1. fix: write scim patch values as own properties. Writes go through Object.defineProperty, so a __proto__ key can only create an own property. Should clear the 5 remaining CodeQL prototype-pollution alerts on scim-patch.ts, which did not accept the earlier throw-then-continue guards.
  2. feat: enforce adapter rate limits across instances through secondary storage. guard.admit counts in the rateLimit secondary storage, so one limit holds across instances when a shared store is configured. It is async now. A store error lets the request through, so an outage there cannot take sign-in down.
  3. fix: keep the dashboard session in an HttpOnly cookie. The dashboard secret no longer goes into sessionStorage (CodeQL js/clear-text-storage-of-sensitive-data). POST /api/dashboard/auth sets an HttpOnly, SameSite=Strict, HMAC-signed cookie for eight hours, GET checks it, DELETE signs out.
  4. feat: typed plugin endpoints. defineEndpoint validates params, query and body with zod and exposes the shapes through ApiOf. createEndpointClient in the client package calls routes by "METHOD /path" key with inferred input and result, importing the server module as a type only.
  5. feat: accessibility pass on the default auth components. Errors use role=alert, field errors are linked with aria-describedby and aria-invalid, the loading button sets aria-busy, 2FA digits and the backup input are named, the card is a region named by its title. Four copies of the default slots were identical, so they now live in one module.

Behavior to know about

  • guard.admit returns a Promise. Only the three adapters call it.
  • Dashboard: an existing browser tab with the old sessionStorage entry has to sign in once more. Scripts that send Authorization: Bearer <secret> to GET /api/dashboard/auth keep working.
  • defineEndpoint is additive.

Verified (by running)

  • core: adapter-admit and adapter-guard (31), typed-endpoint (5), scim suites (138), tsc.
  • adapters: express 56, fastify 20, nestjs 19 against a rebuilt core.
  • client: endpoint-client (5), tsc. Type level checks for both endpoint packages were compiled with tsc, and one real inference bug (an all-optional query was required) was found and fixed that way.
  • ui: 59 tests including 4 new accessibility tests. cli: dashboard-server (11). dashboard: tsc.

Not verified

  • The Playwright e2e for the dashboard was edited to mock the auth route but not run.
  • CodeQL on the SCIM change. I only know the own-property approach avoids a plain assignment.
  • No manual screen reader pass. The a11y changes follow the ARIA patterns and are covered by role/name queries only.
  • Multi-instance limits were tested with two admission objects sharing a memory store, not with Redis or the database store.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your first pull request. CI will run shortly. If the change touches package source, please add a changeset with pnpm changeset.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@thegdsks
thegdsks merged commit ce22818 into release/wave6-2026-10 Oct 13, 2026
6 of 7 checks passed
@thegdsks
thegdsks deleted the feat/wave6-ts branch October 13, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants