Skip to content

fakerelay drops a launched history row when its session is deleted #614

Closed

Description

@barelyworkingcode

Part of #596. Filed per #596 Amendment 4.

Story

As eve's test writer, I want fakerelay to drop a session's history row when the session is deleted, so that eve's specs can prove a deleted thread leaves the Resume list.

Acceptance criteria

  • After fakerelay's DELETE /api/sessions/{id} succeeds, GET /api/session-history lists no row with that id.
  • After fakerelay handles a delete_session WebSocket frame, GET /api/session-history lists no row with that session id.

What I'd notice: nothing. fakerelay is a test fixture.

Contract

  • Dev, 2 files: fakerelay/internal/sessions/session.go (the one call to HistoryStore.Remove moves from deleteSession into removeSession, after the session is dropped and before the session_ended broadcast; Amendment 1) and docs/fakerelay.md (one line in the session-history section).
  • Test writer, 1 file: fakerelay/prooftest/history_test.go, two cases: plant a world with a session and its resume: "session" row, delete the session through DELETE /api/sessions/{id} in one and through a delete_session frame in the other, and the GET no longer lists the row.
  • Waits: the HTTP answers. For the frame: the session_ended broadcast on the same WebSocket, which removeSession sends after it removes the row.
  • Budget: about 5 Go lines, 1 doc line, about 30 test lines. No FEATURES.md row: nothing a user reaches moves.
  • Merge order: into epic/596-session-history before Verify and close the session-history epic (relay) #601's close lines. Launcher history: real titles, last activity and resume eve#637 then re-pins to the new relay epic head.

Tasks

  • Dev: drop the row on delete; doc line
  • Test: prooftest case; break-and-restore
  • Review, PR into the epic branch

Amendment 1 (2026-10-22): The first fix covered only the HTTP door, but eve deletes through the delete_session frame (hub.go). The Remove call moves into removeSession. Its only callers are the two delete doors, so no other path drops a row. hub.go does not change.
Amendment 2: A second PR into epic/596-session-history with Closes #614 carries the move and the frame case. Budget: about 3 Go lines, about 30 more test lines.

Activity

  1. added
    enhancement
    on Oct 23, 2026
  2. barelyworkingcode commented on Oct 23, 2026

    @barelyworkingcode
    OwnerAuthor

    Coordinator approval: inherited from the epic #596 (owner approved 2026-10-22); this child splits Amendment 4 of the approved epic.

  3. barelyworkingcode commented on Oct 23, 2026

    @barelyworkingcode
    OwnerAuthor

    Done in #615 (merged into epic/596-session-history).

  4. barelyworkingcode commented on Oct 23, 2026

    @barelyworkingcode
    OwnerAuthor

    Reopened: eve deletes through the WebSocket delete_session frame, and #615 covered only the HTTP route. G3.12's row check stays red against 3dd14d1.

  5. barelyworkingcode commented on Oct 23, 2026

    @barelyworkingcode
    OwnerAuthor

    Done in #615 and #616 (both merged into epic/596-session-history).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions