Skip to content

Add durable hosted conversation history - #35

Draft
roackb2 wants to merge 1 commit into
devfrom
codex/durable-hosted-conversation-history
Draft

Add durable hosted conversation history#35
roackb2 wants to merge 1 commit into
devfrom
codex/durable-hosted-conversation-history

Conversation

@roackb2

@roackb2 roackb2 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

What changed

  • Added a Lucid-owned PostgreSQL projection for hosted conversation lifecycle, including requested/running/terminal states, bounded public Markdown, product-owned error codes, and deterministic user-scoped recent history.
  • Intercepted the managed execution stream so creation, acceptance, and settlement are durable before the corresponding browser event is released. A failed terminal write cannot escape as acknowledged success.
  • Added an authenticated no-input hostedConversation.recent tRPC query and a recent-conversation UI with conditional polling for open turns, local retry/error states, truthful failure/interruption presentation, and the existing hardened Markdown policy.
  • Added the checked-in Drizzle migration, real-PostgreSQL coverage, orchestration/auth/UI tests, and service-level documentation.

Why

Hosted answers and progress previously lived only in React state, so a refresh erased the only user-visible record of a completed or interrupted agent turn. This change gives the product a durable, inspectable terminal history without persisting raw execution traces or introducing replay semantics.

Privacy and lifecycle boundaries

The projection stores only user/workspace/invocation identifiers, the prompt, bounded public terminal Markdown, a closed set of Lucid-owned lifecycle codes, and timestamps. It deliberately excludes activity, hidden reasoning, tool inputs/results, credentials, capabilities, traces, provider error messages, and provider error codes.

Only an explicit terminal cancellation is recorded as cancelled. Browser disconnects and service shutdown use the truthful interrupted state because the shared HTTP abort signal cannot prove user intent. Expired open rows converge through user-scoped reconciliation and conditional client polling.

Validation

  • LUCID_POSTGRES_TEST_URL='postgresql:///lucid_test' yarn test — 148 server, 24 web, and 4 simulator tests passed
  • yarn typecheck
  • yarn build
  • yarn server:db:generate — no schema drift
  • git diff --check

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