Claude: changes for issue #37 #61

Merged
Grandiras merged 2 commits from claude/issue-37 into main 2026-07-25 14:59:21 +00:00
Collaborator

Closes #37.

Closes #37.
feat: add PdsOptions.SessionSigningKey for persistent PDS session tokens
All checks were successful
CI / build-and-test (pull_request) Successful in 41s
af0fac68e8
AddAtProtoPds() registered PdsSessionService by type, and DI cannot supply
the byte[] signingKey constructor parameter — so every process start
generated a random HMAC key and invalidated all access/refresh tokens on
restart or redeploy.

Add PdsOptions.SessionSigningKey (base64) and build the session service
through a factory that passes it. When it is unset the ephemeral-key
fallback remains, but a warning is now logged; a new IHostedService forces
the service to be constructed at host startup so the warning (and the
InvalidOperationException for a malformed key) surfaces before the first
request instead of on the first login. Keys shorter than 32 bytes are
accepted with a warning.

Also adds PdsSessionService.GenerateSigningKey(), ResolveSigningKey(),
UsesEphemeralSigningKey, and SigningKeySize.

closes #37
Author
Collaborator

🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the task runs.

🤖 Reviewing this PR — follow along in [the action run](https://git.grandiras.net/Grandiras/claude-bot/actions/runs/55); the reply will link the full session transcript. 📜 [Live transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/ATProto.NET/pr-61/run-55.md) — updating every ~5 minutes while the task runs.
Merge branch 'main' into claude/issue-37
All checks were successful
CI / build-and-test (pull_request) Successful in 42s
Sync Closures to GitHub / sync-closure (pull_request) Successful in 6s
c2f08b8191
Grandiras deleted branch claude/issue-37 2026-07-25 14:59:22 +00:00
Grandiras referenced this pull request from a commit 2026-07-25 14:59:22 +00:00
Author
Collaborator

🤖 Reviewing this PR — follow along in the action run; the reply will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the task runs.

🤖 Reviewing this PR — follow along in [the action run](https://git.grandiras.net/Grandiras/claude-bot/actions/runs/60); the reply will link the full session transcript. 📜 [Live transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/ATProto.NET/pr-61/run-60.md) — updating every ~5 minutes while the task runs.
claude-bot left a comment

Solid, well-scoped fix for issue #37. PdsSessionService now resolves its signing key from PdsOptions.SessionSigningKey (falling back to an ephemeral random key with a warning), and the new PdsSessionKeyStartupCheck IHostedService forces eager construction so a missing/invalid key is surfaced at host startup rather than on first login. TryAddEnumerable correctly dedups the startup check across repeated AddAtProtoPds() calls (covered by a test). Base64 decoding, null/whitespace handling, and short-key warnings are all sensibly implemented and thoroughly tested (DI-path tests, direct-construction tests, and a real host-startup test). Docs and sample updated consistently, CHANGELOG entry present. No correctness or security issues found — nice attention to the signingKey parameter still taking precedence over PdsOptions for explicit callers.


⏱ 0m 35s · 1 turns · tokens: 22.6k in / 2.8k out (+23.7k cache-read)
📜 Full session transcript

Solid, well-scoped fix for issue #37. `PdsSessionService` now resolves its signing key from `PdsOptions.SessionSigningKey` (falling back to an ephemeral random key with a warning), and the new `PdsSessionKeyStartupCheck` `IHostedService` forces eager construction so a missing/invalid key is surfaced at host startup rather than on first login. `TryAddEnumerable` correctly dedups the startup check across repeated `AddAtProtoPds()` calls (covered by a test). Base64 decoding, null/whitespace handling, and short-key warnings are all sensibly implemented and thoroughly tested (DI-path tests, direct-construction tests, and a real host-startup test). Docs and sample updated consistently, CHANGELOG entry present. No correctness or security issues found — nice attention to the `signingKey` parameter still taking precedence over `PdsOptions` for explicit callers. --- ⏱ 0m 35s · 1 turns · tokens: 22.6k in / 2.8k out (+23.7k cache-read) 📜 [Full session transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/ATProto.NET/pr-61/run-60.md) <!-- claude-reviewed-head:c2f08b819155f81e4c3c319f7e0d8b494b1d4677 -->
Sign in to join this conversation.
No description provided.