Repository navigation
refactor(api): delete the slice's sign-in, sign-out and CSRF-token routes - #150
Merged
Merged
Conversation
…utes Plane's routes replace them (`POST /auth/sign-in/`, `POST /auth/sign-out/`, `GET /auth/get-csrf-token/`, in thrust-compat-plane), and since stage 3 of the contract-suite move no test called the slice's three; `scripts/measure-argon2.sh`, the one other caller, moved in the last step. Under the owner's decision of 2026-11-11 a slice route with a replacement goes, and the ones without stay under `/api/_slice`. Removed: the three handlers and their routes in thrust-api, and `SignInRequest` and `SignInResponse` in thrust-contracts, which only the sign-in used. `CsrfResponse` stays (the moved CSRF test reads Plane's token with it), and so do the core functions `sign_in`, `sign_out` and `new_csrf_token`, which Plane's routes call. The three paths leave the table that `the_slice_routes_are_gone_from_the_reserved_v1_prefix` walks (ten identity routes became seven). No test was added or removed: the counts stay 65, 3 and 6. Docs: the three rows leave docs/src/flows/app.md, which now says where the routes went, and its sign-in paragraph and error table stop describing the slice's 401 for a refused sign-in (Plane's route answers 5060 before hashing and 5065 after); infra.md and a comment in core name Plane's paths; G-26 records the deletion. ADRs 0050 and 0052 keep the old paths: they are history. Checked on native-memory: main 65 of 65, sweeper 3 of 3, csrfoff 6 of 6, clippy clean on the workspace. Control: with `GET /auth/csrf` put back in the table the walking test fails at its "not mounted" assertion. The other three targets run in CI. Refs: #58 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Main gained #149 (the operator's routes) and #148. The one conflict was crates/thrust-api/src/lib.rs, in two places where #149 added the operator's handlers and routes beside the three this branch deletes: kept both operator routes and the operator block, dropped the slice's sign-in and sign-out routes, and kept this branch's comment on what is left of the identity routes. #149's contract tests sign in through Plane's `/auth/sign-in/`, so nothing there called the deleted routes. Checked on native-memory after the merge: main 68 of 68 (main's 65 and #149's three; this branch changes no count), sweeper 3 of 3, csrfoff 6 of 6, clippy clean on the workspace. Refs: #58 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 15, 2026
Closed
Merged
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.
Summary
Step 5b of moving off
/api/_slice: delete the slice's sign-in, sign-out and CSRF-token routes. Plane's routes replace them (POST /auth/sign-in/,POST /auth/sign-out/,GET /auth/get-csrf-token/, inthrust-compat-plane), no test has called the slice's three since stage 3 (#136), andscripts/measure-argon2.sh, the one other caller, moved in #146. Under the owner's decision of 2026-11-11 a slice route with a replacement goes, and the ones without stay under/api/_slice.What goes
POST /api/_slice/auth/sign-in/email,POST /api/_slice/auth/sign-outandGET /api/_slice/auth/csrf, inthrust-api.SignInRequestandSignInResponseinthrust-contracts, which only the sign-in used.slice_auth_routes(), the table thatthe_slice_routes_are_gone_from_the_reserved_v1_prefixwalks (ten identity routes become seven).What stays, and why
CsrfResponse: the moved CSRF test reads Plane'sget-csrf-tokenanswer with it (its doc comment now names Plane's route).sign_in,sign_outandnew_csrf_token: Plane's routes call them.No test is added or removed: the counts stay 65, 3 and 6.
Docs
docs/src/flows/app.md: the three rows go, with a pointer to Plane's routes. The "Sign-in." paragraph and the Errors table no longer say the slice answers a refused sign-in with a 401: Plane's route answers an unknown email with a 400 (5060) before it hashes, every other refusal with a 400 (5065), and the limiter with a 429.docs/src/architecture/infra.mdand a comment inthrust-corename Plane's paths.docs/src/testing/status.mdrecords the deletion and trims its "Not done" clause.Verification
On native-memory: main 65 of 65, sweeper 3 of 3, csrfoff 6 of 6;
cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --all --checkclean.Control: with
GET /auth/csrfput back in the route table,the_slice_routes_are_gone_from_the_reserved_v1_prefixfails at its "not mounted" assertion (the route is gone, so the live prefix answers a routing 404).Not run locally: native-pg, worker-memory and worker-cf (they run in CI), and the passes outside main, sweeper and csrfoff.
Part of #58; this PR does not close it.
🤖 Generated with Claude Code