Skip to content

Verify and close the session-history epic (relay) #601

Closed

Description

@barelyworkingcode

Child of #596. The close child (relay).

User story

As the owner, I want the session-history epic merged to relay's main only after its checks pass on both heads together, so that main never holds half of it.

Acceptance criteria

What I'd notice

Nothing new. The change appears on main in one step.

Close lines (relay)

  1. The verification task runs once, on the epic head frozen by line 4: the repo suite, then stack-up on that head and the --stack run, then stack-down. Relay: one run. This issue gets the Verified: line.
  2. A push after line 1 means line 1 runs again on the new head. Nothing is planned to push after line 4.
  3. Every child is merged to the epic branch, with review and evidence lines in place.
  4. main is merged into the epic branch by a sync PR whose head is sync/596-main and whose body says Closes #601. Conflicts are resolved on it; the parent's overlap table lists the expected ones. The epic head is now frozen.
  5. Close Session history: Claude reader, discovered records, history list #598, Session history: keep and resume a terminal Claude launched from a project #599 and Session history: purge a record whose transcript is gone #600, each with a comment naming its PR.
  6. merge-check passes on the epic PR to main.
  7. Merge under the joint close task on Session history from transcripts: discovered records, real titles, auto-purge #596 (step c). Confirm main green, close the parent (step d), delete the epic branch.
  8. The run report's final body (run-report finish, by the coordinator).

Verification task

On the devbox, once, on the frozen epic head after line 4, as step b of the joint close task.

  • Unlock the devid keychain and run npm ci in the eve checkout first.

  • No devlock.

  • Never kill or replace the devbox's default tmux server. End only the tmux sessions this pass created, by name.

  • repo-suite: (cd e2e && go test -race -timeout 30m ./features/).

  • devboxverify: stack-up r601 --relay <relay checkout at the epic head> --eve <eve checkout at its epic head>, then go run ./cmd/devboxverify --stack <stack.json> --phase api, then stack-down r601 (also on a failure).

  • real-app on the stack, in a project on the console, in scratch folders inside that project only:

    1. Launcher > New > the Claude terminal. Send one prompt, then /rename History check. Close the tab.
    2. relay session history --project <id> lists the row as dormant, titled "History check", with resume: history.
    3. Restart the stack's relay. The row is still listed with its title, and Launcher > Resume shows it.
    4. Resume it. The terminal opens on the same conversation, and the old row is gone.
    5. In the project folder, run an outside Claude in a named tmux session, send one prompt, and exit. After the next scan, a row with record: discovered lists it, and Resume opens it in the project.
    6. Move that discovered transcript out of its folder (keep it, to restore). After the next scan the row reads transcript: absent and stays: the grace period holds it. The purge itself is proven by TestHistoryPurgeAfterGrace. Move the file back; after the next scan the row reads present.
    7. With the loopback host's ssh refused, the host's rows stay, and no purge row appears.
  • Post Verified: <head sha> · repo-suite: <result> · devboxverify: <result> · real-app: <result> · log: <link or path> here.

Tasks

Contract

This child adds no code. Its PRs are the sync PR and relay's epic PR to main (Closes #601). merge-check judges both on the files that differ from main, so the list below is every file of relay#598, relay#599, relay#600 and relay#614, written out. Conflict resolution stays inside it.

File ownership

  • internal/sessions/ledger/ledger.go
  • internal/sessionhistory/history.go
  • internal/sessionhistory/claude.go
  • internal/sessionhistory/purge.go
  • internal/outsidesessions/ended.go
  • internal/outsidesessions/inventory.go
  • internal/outsidesessions/probe.go
  • internal/config/session_history.go
  • internal/config/settings.go
  • internal/config/clone.go
  • internal/audit/audit.go
  • cmd/relay/session_history_ops.go
  • cmd/relay/session_history_routes.go
  • cmd/relay/session_history_verbs.go
  • cmd/relay/frontend_server.go
  • cmd/relay/admin_ops.go
  • cmd/relay/cli_verbs.go
  • cmd/relay/session_launch.go
  • cmd/relay/outside_session_ops.go
  • cmd/relay/router.go
  • cmd/relay/router_sessions.go
  • cmd/relay/server_core.go
  • cmd/relay/session_routes.go
  • fakerelay/internal/api/history.go
  • fakerelay/internal/api/register.go
  • fakerelay/internal/world/history.go
  • fakerelay/internal/world/types.go
  • fakerelay/internal/sessions/history.go
  • fakerelay/internal/sessions/register.go
  • fakerelay/internal/sessions/session.go
  • docs/session-history.md
  • docs/session-host.md
  • docs/outside-sessions.md
  • docs/routes.md
  • docs/cli.md
  • docs/events.md
  • docs/audit-log.md
  • docs/FEATURES.md
  • docs/THREAT-MODEL.md
  • docs/fakerelay.md
  • CLAUDE.md
  • e2e/features/g1_session_history_test.go
  • e2e/features/g1_session_history_terminal_test.go
  • e2e/features/g1_session_history_purge_test.go
  • fakerelay/prooftest/history_test.go
  • cmd/devboxverify/journey_session_history.go
  • cmd/devboxverify/journeys.go
  • cmd/devboxverify/README.md

Test surface

The whole repo suite and the --stack api run (every journey, not a selection), plus the real-app pass above, once on the frozen head. Nothing new is written here.

Waits:

  • Merges and child state: merge-check exit codes and gh issue and PR state.
  • stack-up: its process exit and a valid stack.json. stack-down: its process exit.
  • Suite and harness: their process exits.
  • real-app: each step waits on what the screen shows (the row, its title, the opened terminal), on a CLI's exit, or on the session.history.scan and session.history.purge event lines (relay logs --follow). Claude's replies are model output with no signal: a bounded wait, and the log says so.

Budget

0 lines of new code. Conflict resolution only inside the files above; anything else stops and asks.

Amendment 1 (2026-10-22): The ownership list adds the files the children's amendments added: cmd/relay/router.go and cmd/relay/server_core.go (relay#598, Amendment 7), cmd/relay/session_routes.go and cmd/relay/router_sessions.go (relay#599, Amendments 3 and 11), fakerelay/internal/sessions/history.go and fakerelay/internal/sessions/register.go (relay#599, Amendment 6), and fakerelay/internal/sessions/session.go (relay#614). It now matches git diff origin/main...origin/epic/596-session-history --name-only (48 files).

Activity

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

    @barelyworkingcode
    OwnerAuthor

    Coordinator approval: inherits the approved epic's listed batches, 2026-10-22

  3. barelyworkingcode commented on Oct 23, 2026

    @barelyworkingcode
    OwnerAuthor

    Verified: 840327b · repo-suite: ok relaye2e/features 1070.430s · devboxverify: pass=13 fail=0 blocked=0 notrun=2 (stack r601 with eve d03b539) · real-app: 7/7 PASS (step 3 restarted the stack's relay by hand, since a stack has no restart command; step 7 used a loopback host added for the pass, refused with port 1) · log: devbox:/tmp/r601-suite-840327b.log, /tmp/r601-dbv.log, /tmp/r601-realapp/

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

    task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions