Repository navigation
[M2.2e1a] Fix immutable SDK arrays and pagination schema - #63
Merged
Merged
Conversation
4 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.2d4c2b-token-management-http
branch
from
November 5, 2026 12:36
e067c3c to
df1810d
Compare
samuelmbabhazi
changed the base branch from
feat/m2.2d4c2b-token-management-http
to
main
November 5, 2026 12:36
samuelmbabhazi
force-pushed
the
fix/m2.2e1a-client-contract
branch
from
November 5, 2026 12:37
019269c to
486ab5b
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
The web app now has a typed identity client covering account, MFA and token-management endpoints, plus in-memory session state. Requests use the generated SDK, stay on the current origin, refuse redirects/bearer credentials, avoid caching, cap network waits at twenty seconds and attach only an unambiguous CSRF cookie. Mutation callers supply their retry keys so a UI can preserve a key across an uncertain result. Session state retains only user ID, email and expiry, including when accepting a response that also contains recovery codes or an API token. A revision counter prevents stale requests from restoring signed-out state. Failed logout remains visibly unconfirmed; missing credentials and service outages have distinct states. UI errors use fixed safe messages and bounded Retry-After values. Validation: web lint/typecheck, all 11 Angular tests and production build pass. Tests cover cookie/header behavior, cross-origin rejection, duplicate/insecure CSRF cookies, empty responses, sanitized errors and late session responses. The workspace SDK dependency is declared alongside the existing root Angular dependencies so the Angular/Vitest runner resolves it consistently. Security: credentials remain in request bodies/headers and never enter URLs or browser storage. No new external package/version; only an existing workspace package is linked. Screens and real-browser acceptance follow in M2.2e2–e4. Stacked on #63; no merge requested. - [x] M2.2e1b criteria met - [x] Web checks and race/security regressions pass - [x] Plan/spec current - [x] No secret persisted in session state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first typed web consumer exposed two contract defects: token-list
limitwas generated as an object, and openapi-fetch's Readable/Writable helpers transformed readonly arrays into objects whose array methods were unusable. This blocked recovery-code and scope handling under strict TypeScript.The pagination DTO now explicitly declares an integer schema. A version-pinned pnpm patch corrects only the helper package's three TypeScript declaration entry points, using homomorphic array mapping to preserve mutable/readonly arrays and tuples. Runtime JavaScript is unchanged, and no dependency version is downgraded. This addresses the confirmed upstream issue: openapi-ts/openapi-typescript#2615. Remove the patch after an upstream fix passes these regressions.
Validation: the new client typecheck failed before the fixes. API and client lint/typecheck/tests now pass (96 API tests, four client tests), API production build passes, and OpenAPI/client regeneration is current. Regression tests exercise numeric pagination, nested readonly response scopes and readonly request bodies; the HTTP OpenAPI test asserts the integer schema.
Security: no authentication semantics or runtime dependency code changes; no casts weakening the generated contract. Stacked on #62; no merge requested.