quak logout ends the session on the server (closes #108) #116

Merged
clawbot merged 1 commits from issue-108-server-logout into next2 2026-09-23 06:51:12 +02:00
Collaborator

Closes #108.

quak logout now calls POST /users/logout with the saved token, so a copy of session.json stops working. It then deletes the file. If the call fails, the file is still deleted and the command says the server session could not be ended. Either way it prints the account's cache directory and says it still holds decrypted data.

  • The library gets Client.logoutOnServer(). Client.logout() is unchanged and still only clears memory. The CLI calls both.
  • The default cache path (the env-paths cache directory plus the user id) moved into defaultCacheDirectory() in src/library/index.ts, so Library.open and logout name the same directory.
  • The server answers {}. A 5xx is not retried, because POST retries only on connect errors.
  • The tests read a real client from the session file and point it at a fake API. They check the method, path and token header, a failed call, the default cache path, and running with no session file.

Judgement calls:

  • A failed server call makes logout exit 1. The issue did not say what the exit status should be.
  • If session.json is corrupt, it is deleted and reported as "could not end the session on the server". Without --cache-dir, no cache directory is printed, because the user id is unknown.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/quak/issues/108. `quak logout` now calls `POST /users/logout` with the saved token, so a copy of `session.json` stops working. It then deletes the file. If the call fails, the file is still deleted and the command says the server session could not be ended. Either way it prints the account's cache directory and says it still holds decrypted data. - The library gets `Client.logoutOnServer()`. `Client.logout()` is unchanged and still only clears memory. The CLI calls both. - The default cache path (the env-paths cache directory plus the user id) moved into `defaultCacheDirectory()` in `src/library/index.ts`, so `Library.open` and `logout` name the same directory. - The server answers `{}`. A 5xx is not retried, because `POST` retries only on connect errors. - The tests read a real client from the session file and point it at a fake API. They check the method, path and token header, a failed call, the default cache path, and running with no session file. Judgement calls: - A failed server call makes `logout` exit 1. The issue did not say what the exit status should be. - If `session.json` is corrupt, it is deleted and reported as "could not end the session on the server". Without `--cache-dir`, no cache directory is printed, because the user id is unknown. Model: opus-5-5
clawbot added the needs-review label 2026-09-23 05:52:47 +02:00
clawbot self-assigned this 2026-09-23 05:52:47 +02:00
Author
Collaborator

FAIL on d71555a: it does not rebase cleanly onto next2 390401a.

  • src/library/index.ts:348 (Library.open) conflicts with the change for #104, which rewrote the same lines to discard another account's cache. Acceptable: rebase onto current next2, keep that check, and compute the default path with defaultCacheDirectory(userID). No other defects found.

TODO.md-only conflict, resolved locally.

Model: opus-5-5

FAIL on `d71555a`: it does not rebase cleanly onto `next2` `390401a`. - `src/library/index.ts:348` (`Library.open`) conflicts with the change for https://git.eeqj.de/sneak/quak/issues/104, which rewrote the same lines to discard another account's cache. Acceptable: rebase onto current `next2`, keep that check, and compute the default path with `defaultCacheDirectory(userID)`. No other defects found. TODO.md-only conflict, resolved locally. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-09-23 05:59:49 +02:00
clawbot force-pushed issue-108-server-logout from d71555a90e to 573de7e104 2026-09-23 06:09:14 +02:00 Compare
Author
Collaborator

Rebased onto next2 390401a. Library.open keeps the check from #104 that discards another account's cache, and now computes the default path with defaultCacheDirectory(userID). TODO.md keeps both entries, newest first. Nothing else changed.

Model: opus-5-5

Rebased onto `next2` `390401a`. `Library.open` keeps the check from https://git.eeqj.de/sneak/quak/issues/104 that discards another account's cache, and now computes the default path with `defaultCacheDirectory(userID)`. `TODO.md` keeps both entries, newest first. Nothing else changed. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-09-23 06:09:21 +02:00
Author
Collaborator

PASS on 573de7e rebased onto next2 c19943a (TODO.md-only conflict, resolved locally).

Model: opus-5-5

PASS on `573de7e` rebased onto `next2` `c19943a` (TODO.md-only conflict, resolved locally). Model: opus-5-5
clawbot added needs-rebase and removed needs-review labels 2026-09-23 06:25:35 +02:00
clawbot added needs-review and removed needs-rebase labels 2026-09-23 06:26:37 +02:00
clawbot force-pushed issue-108-server-logout from 573de7e104 to 6e238bc1bd 2026-09-23 06:26:38 +02:00 Compare
clawbot added needs-rebase and removed needs-review labels 2026-09-23 06:36:22 +02:00
clawbot added 1 commit 2026-09-23 06:45:05 +02:00
logout now calls POST /users/logout with the saved token through the new
Client.logoutOnServer(), then deletes session.json even when that call
fails; in that case it says the server session could not be ended and
exits 1. It prints the account's cache directory and says it still holds
decrypted data. The default cache path moves into
defaultCacheDirectory(), shared with Library.open, so both name the same
directory.

Model: opus-5-5
clawbot force-pushed issue-108-server-logout from 6e238bc1bd to c1b4502f8d 2026-09-23 06:45:05 +02:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-09-23 06:45:06 +02:00
clawbot merged commit 4bb75ca323 into next2 2026-09-23 06:51:12 +02:00
clawbot deleted branch issue-108-server-logout 2026-09-23 06:51:13 +02:00
Sign in to join this conversation.