ref(conversations)!: Make events the canonical transcript#916
Open
dcramer wants to merge 58 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
force-pushed
the
ref/conversation-event-pi-adapter
branch
from
July 15, 2026 19:38
a61e9ff to
82514f8
Compare
dcramer
force-pushed
the
ref/conversation-event-pi-adapter
branch
from
July 15, 2026 21:39
390078b to
ade88fc
Compare
dcramer
force-pushed
the
ref/conversation-event-pi-adapter
branch
from
July 17, 2026 02:18
b71945d to
3895bfd
Compare
Remove SQL persistence assertions and dead skipped coverage from the model-backed suite. Keep handoff and conversation-search behavior observable, and add same-thread continuity after a failed reply. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Remove mocked branch matrices and duplicate orchestration assertions while retaining event ordering, delivery repair, command identity, privacy, and intentional-silence contracts at their strongest test layers. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Keep semantic projection, rendering, accessibility, and browser interaction coverage while removing fixture counts, private DOM markers, styling checks, and duplicate status/search cases. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Make test layering and pruning decisions explicit so non-trivial changes consolidate duplicate failure matrices without dropping distinct safety, migration, or recovery invariants. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Persist the initiating Pi tool call on successful handoff epochs so reporting can later coalesce the generic tool row with the semantic transition. Keep deployed uncorrelated markers readable while requiring correlation for every new write. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Keep Pi continuity in the conversation event log while Slack recovery stores only event cursors and delivery control state. Record lifecycle failures across local, dispatch, and resumed turns so reporting cannot silently terminate. Harden migration reruns and chronology. Correlate special tool rendering without exposing private IDs, and document the required deployment drain. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Delete the orphaned formatBytes export after transcript size metadata and raw tool-result inspection were removed. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Use loaded child conversation status to replace stale running rows while preserving terminal parent invocation failures. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Keep only the durable schema entrypoint, upgrade ordering, generation workflow, and append-only migration rules. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Keep the route handler, SQL read, and response projection together now that both helper layers have a single consumer. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Load only the containing context epoch for cursor recovery and only visible event types for conversation hydration. Add the matching event-type index to the existing undeployed migration. Also repair the 0005 schema snapshot, which recorded the pending-delivery due index under the conversation-event table instead of its owning table. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Select only reportable canonical events in sequence order and resolve root privacy without taking dashboard read locks. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Persist the earliest canonical event needed to rebuild the live visible-message suffix, and replace lossy covered-message ID snapshots with exact counts. Convert deployed snapshots during the existing 0005 cutover. Apply upper sequence bounds while restoring fixed model cursors so future malformed events cannot break an earlier committed projection. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Preserve the live visible-message baseline across the final chronology resequence and recover legacy compacted totals from Redis stats when stored ID lists were truncated. Keep orphan visible facts strict for uncompacted history while allowing them only inside an explicitly bounded compacted suffix. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Resolve idempotency keys before refreshing conversation metadata so replayed events cannot unarchive conversations or extend retention. Mixed batches refresh from genuinely new events only. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Keep tool starts structural and rely on canonical model messages for tool-call continuity. Strip legacy argument payloads during the existing event migration and operator import. Co-Authored-By: GPT-5 Codex <codex@openai.com>
Resolve root visibility and ordered reportable events in one SQL statement so a concurrent visibility change cannot authorize payloads from a different snapshot. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Remove legacy reporting helpers resurrected by historical conflicts and restore the reviewed event-log, migration, and recovery end state on current main.
Keep the consolidated event migration and retention purge independent of the deferred Slack delivery outbox.
Carry main's archived conversation column into the consolidated 0005 schema snapshot without introducing a follow-up migration.
Keep canonical transcript reporting coverage scoped to ConversationEvent facts owned by this change.
Persist correlated lifecycle events for ordinary and resumed Slack turns and agent dispatch without coupling transcript history to delivery recovery. Preserve classified Sentry event IDs through the final Slack failure boundary and exercise the real lifecycle in evals.
Attempt the safe Slack failure reply even when failure-state persistence fails. Record the persistence terminal in conversation history and propagate the persistence error after delivery.
Keep legacy compaction anchors until visible-message events exist, then finalize the canonical suffix and reconcile truncated historical counts from retained thread state.
Scan retained Redis turn-session records before resequencing conversation events. Block unfinished cursors and invalidate terminal cursors even when a partial write omitted the summary indexes.
Only inspect and invalidate turn-session sequence cursors when visible events still require backfill. Repeated upgrades leave active and terminal session state untouched.
dcramer
force-pushed
the
ref/conversation-event-pi-adapter
branch
from
July 18, 2026 01:55
ac0a8dc to
b063024
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Conversation history now has one ordered SQL
ConversationEventlog as its authority. The Pi adapter rebuilds model context from that log, while the reporting API exposes allowlisted semantic events and the dashboard performs its own event-to-view reduction. Messages, failures, compaction, handoffs, and child lifecycle share the stream; raw Pi payloads, tool arguments, and private runtime metadata do not. Correlated handoff and advisor events replace their generic tool row instead of rendering twice.This is an intentional hard cutover. Runtime session-log history and the old transcript, activity, and special-subagent API shapes are removed. The conversation message table remains a rebuildable search and hydration projection, and child conversations retain their own event streams with immutable parent lineage. Reporting stays a direct, lock-free SQL snapshot with no runtime reconstruction.
Direct local, Slack, dispatch, continuation, and OAuth resume paths record first-terminal-wins turn lifecycle outcomes, including explicit failures and safe Slack error references. Crash-safe delivery recovery and the durable Slack outbox are intentionally split into a follow-up PR; they are not part of this core cutover.
Rollout stops ingress and old workers, applies
0005_conversation_events, runs the CLI history import and visible-event backfill, verifies the seal, then deploys and restarts. The migration preserves real pre-cutover compaction anchors, reconciles historically truncated counts, and refuses to resequence while a resumable turn cursor is live. Completed reruns are no-ops for active turn state.Validation includes workspace typecheck, focused runtime and reporting integration suites, migration and upgrade suites, schema regeneration, local mock-dashboard QA for handoffs, failures, and child transcripts, and independent adversarial review.