Sign-out should write a journal event so Installation lists update live #20

Closed
opened 2026-10-13 15:37:47 +00:00 by kayg · 1 comment
Owner

Follow-up from #5 (PR #19).

Signing out over HTTP (POST /api/v1/auth/logout) revokes the browser's Installation, but writes no journal event. Only the account.revoke action records account.installation-revoked. So an Installations list open on another device doesn't update live when someone signs out, which breaks ADR 0012 (views are always live).

Fix: route logout through the same path as account.revoke, so it records account.installation-revoked in the user's journal (for example, by running the action through the engine from the logout handler, with an idempotency key). Add a test: with a live websocket open, signing out another session shows the event.

Follow-up from #5 (PR #19). Signing out over HTTP (`POST /api/v1/auth/logout`) revokes the browser's Installation, but writes no journal event. Only the `account.revoke` action records `account.installation-revoked`. So an Installations list open on another device doesn't update live when someone signs out, which breaks ADR 0012 (views are always live). Fix: route logout through the same path as `account.revoke`, so it records `account.installation-revoked` in the user's journal (for example, by running the action through the engine from the logout handler, with an idempotency key). Add a test: with a live websocket open, signing out another session shows the event.
Author
Owner

PR #104. Rust: calternal-auth tests 8/8 pass in login.rs incl. new signing_out_shows_up_live_on_another_device; clippy clean workspace-wide. Playwright flow project (Chromium) passes: a second context signs out and the Devices list in the first goes 2 rows to 1 live. Startup budget test (answers_within_budget) failed once in CI at 512ms vs 500ms on a loaded runner; locally on this branch it starts in 15-27ms (3 runs), so it is load noise, not this change.

PR #104. Rust: calternal-auth tests 8/8 pass in login.rs incl. new signing_out_shows_up_live_on_another_device; clippy clean workspace-wide. Playwright flow project (Chromium) passes: a second context signs out and the Devices list in the first goes 2 rows to 1 live. Startup budget test (answers_within_budget) failed once in CI at 512ms vs 500ms on a loaded runner; locally on this branch it starts in 15-27ms (3 runs), so it is load noise, not this change.
kayg closed this issue 2026-10-14 03:26:55 +00:00
Sign in to join this conversation.
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
kayg/calternal#20
No description provided.