Skip to content

refactor(api): delete the slice's sign-in, sign-out and CSRF-token routes - #150

Merged
aRustyDev merged 2 commits into
mainfrom
refactor/delete-unused-slice-auth-routes
Nov 13, 2026
Merged

aRustyDev merged 2 commits into
mainfrom
refactor/delete-unused-slice-auth-routes

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

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/, in thrust-compat-plane), no test has called the slice's three since stage 3 (#136), and scripts/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

  • The handlers and routes for POST /api/_slice/auth/sign-in/email, POST /api/_slice/auth/sign-out and GET /api/_slice/auth/csrf, in thrust-api.
  • SignInRequest and SignInResponse in thrust-contracts, which only the sign-in used.
  • Three entries of slice_auth_routes(), the table that the_slice_routes_are_gone_from_the_reserved_v1_prefix walks (ten identity routes become seven).

What stays, and why

  • CsrfResponse: the moved CSRF test reads Plane's get-csrf-token answer with it (its doc comment now names Plane's route).
  • Core's sign_in, sign_out and new_csrf_token: Plane's routes call them.
  • Sign-out-everywhere, the session info, OIDC, API keys, the activity feeds, attachments and the work-item routes: nothing replaces them yet, or the slice's own behaviour is still under test.

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.md and a comment in thrust-core name Plane's paths.
  • G-26 in docs/src/testing/status.md records the deletion and trims its "Not done" clause.
  • ADRs 0050 and 0052 keep the old paths: they are history.

Verification

On native-memory: main 65 of 65, sweeper 3 of 3, csrfoff 6 of 6; cargo clippy --workspace --all-targets -- -D warnings and cargo fmt --all --check clean.

Control: with GET /auth/csrf put back in the route table, the_slice_routes_are_gone_from_the_reserved_v1_prefix fails 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

aRustyDev and others added 2 commits November 13, 2026 16:32
…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]>
@aRustyDev
aRustyDev merged commit f4febc5 into main Nov 13, 2026
66 of 68 checks passed
@aRustyDev
aRustyDev deleted the refactor/delete-unused-slice-auth-routes branch November 13, 2026 22:22
This was referenced Nov 15, 2026
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