chore: remove dead AccessClaims struct (#5) #14

Merged
alvaro merged 1 commit from chore/5-remove-dead-claims into main 2026-07-20 01:09:31 +00:00
Owner

Summary

Closes #5. backend/src/auth/claims.rs was orphaned dead code: auth/mod.rs never declared mod claims, so the file wasn't compiled into the crate at all. It defined two structs:

  • AccessClaims — referenced nowhere. A latent trap: it carried family_id/permissions fields that suggested enforcement that doesn't exist. (Discovered during the Phase B doc review; filed as #5.)
  • RefreshClaims — a duplicate of the live RefreshClaims in jwt.rs, which is what JwtService actually uses.

Deleted the whole file. The live Claims and RefreshClaims in backend/src/auth/jwt.rs are unaffected and remain the only definitions.

Also updated the JWT ADR to mark the open item done and note the removal historically (so future readers don't go looking for the file).

Verification

cargo build + clippy --all-targets --all-features -D warnings + fmt --check all clean — as expected, since the file wasn't compiled. No behavior change.

Tiny, mechanical cleanup. No CI risk beyond the workflow running.

## Summary Closes #5. `backend/src/auth/claims.rs` was orphaned dead code: `auth/mod.rs` never declared `mod claims`, so the file wasn't compiled into the crate at all. It defined two structs: - **`AccessClaims`** — referenced nowhere. A latent trap: it carried `family_id`/`permissions` fields that *suggested* enforcement that doesn't exist. (Discovered during the Phase B doc review; filed as #5.) - **`RefreshClaims`** — a duplicate of the **live** `RefreshClaims` in `jwt.rs`, which is what `JwtService` actually uses. Deleted the whole file. The live `Claims` and `RefreshClaims` in `backend/src/auth/jwt.rs` are unaffected and remain the only definitions. Also updated the JWT ADR to mark the open item done and note the removal historically (so future readers don't go looking for the file). ## Verification `cargo build` + `clippy --all-targets --all-features -D warnings` + `fmt --check` all clean — as expected, since the file wasn't compiled. No behavior change. Tiny, mechanical cleanup. No CI risk beyond the workflow running.
alvaro added 1 commit 2026-07-19 15:24:01 +00:00
chore: remove dead AccessClaims struct (#5)
All checks were successful
Lint and Build / format (pull_request) Successful in 36s
Lint and Build / clippy (pull_request) Successful in 1m42s
Lint and Build / build (pull_request) Successful in 3m47s
Lint and Build / test (pull_request) Successful in 3m57s
Lint and Build / format (push) Successful in 38s
Lint and Build / clippy (push) Successful in 1m58s
Lint and Build / build (push) Successful in 3m48s
Lint and Build / test (push) Successful in 3m57s
668ea59030
backend/src/auth/claims.rs was orphaned dead code: auth/mod.rs never
declared 'mod claims', so the file wasn't compiled into the crate at
all. It defined two structs:
- AccessClaims — referenced nowhere; a latent trap (carried
  family_id/permissions fields that suggested enforcement that doesn't
  exist).
- RefreshClaims — a duplicate of the LIVE RefreshClaims in jwt.rs,
  which is what JwtService actually uses.

Deleted the file. Updated the JWT ADR to mark the open item done and
note the removal historically.

Build/clippy/fmt clean (the file wasn't compiled anyway). Closes #5.
alvaro merged commit 668ea59030 into main 2026-07-20 01:09:31 +00:00
alvaro deleted branch chore/5-remove-dead-claims 2026-07-20 01:09:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: alvaro/normogen#14
No description provided.