Skip to content

feat: add reversible chat archiving#4

Open
ex3ndr wants to merge 2 commits into
mainfrom
feat/reversible-chat-archiving
Open

feat: add reversible chat archiving#4
ex3ndr wants to merge 2 commits into
mainfrom
feat/reversible-chat-archiving

Conversation

@ex3ndr

@ex3ndr ex3ndr commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • issue and await Rig’s authoritative run abort before archiving active chats
  • abort descendants, external tool calls, queued work, and run-scoped processes through Rig’s existing /sessions/:id/abort protocol
  • atomically terminalize queued/running turns with archive metadata, audit, and sync state
  • make retries idempotent and prevent archived work from being reclaimed
  • add Archived sidebar view, restore actions, composer lockout, navigation fallback, and normal search/directory exclusion

Ordering and races

The route authorizes first, resolves durable session/run targets, calls Rig abort with expectedRunId, awaits acknowledgement, stops local Happy streams, reauthorizes transactionally, then terminalizes unfinished turns and archives the chat in one database transaction. Completion either wins before that transaction or is fenced by the terminal turn state.

Verification

  • pnpm typecheck
  • server and gym lint pass (one pre-existing gym warning remains)
  • archive/Rig integration suite: 8 passed, including active abort-before-archive, retry, read-only, and restore
  • server chat actions: 12 passed
  • state chat actions: 2 passed
  • UI lint/typecheck pass
  • UI browser tests remain unavailable on this host because GTK/GStreamer/WebKit libraries are missing

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant