ref(conversations)!: Make events the canonical transcript#916
Open
dcramer wants to merge 55 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
Make ConversationEvent the sole application history contract and derive Pi context through an adapter. Rename the SQL table in place, version rows, and rewrite legacy Pi messages through a bounded upgrade migration. Keep only rollout-scoped database and Redis import compatibility while removing the legacy application store and projection paths. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Move provider-neutral event reduction and runtime-context shaping into the conversations domain. Keep the Pi adapter responsible only for validating projected model messages. Build reporting transcripts, activity, and child history from canonical events while preserving lazy legacy import, privacy gates, redaction, and the existing API contract. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Persist visible message, metadata, and reply facts in the canonical conversation event log while maintaining the SQL message table as an atomic hydration and search projection. Add idempotent event keys, shared sequence locking, a bounded zero-gap backfill, and the stopped-worker schema cut that removes the legacy step compatibility view. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Project runtime hydration, reporting, and eval transcripts from canonical visible-message events while retaining safe terminal outcome and trace metadata. Remove message-table transcript readers and make assistant message identities stable across persistence retries. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Add strict start and first-terminal-wins outcome facts, then wire the local runtime through durable input, delivery, and persistence boundaries. Surface privacy-safe lifecycle failures in conversation detail, preserve incident correlation, and remove synthetic no-reply transcript messages. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Make the canonical delivery outbox own ordinary Slack reply completion across process crashes and ambiguous provider writes. Recover older deliveries before new input, reconcile exact Slack receipts, and keep terminal transcript facts authoritative when runtime-state repair fails. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Project canonical conversation history into a strict ordered API boundary. Keep visible content singular and omit internal payloads so reporting consumers can adapt one event stream safely. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Make canonical conversation events the only detail and dashboard history authority. Remove transcript and subagent compatibility APIs, inherit child privacy from the locked root, and make retention purge whole trees without append races. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Make SQL events the only live history source for Pi projection and visible hydration. Keep the Redis decoder and backfill writer available only through the explicit operator upgrade path. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Document canonical metadata, non-history aggregates, completed event reporting work, and the bounded migration and delivery follow-ups that remain intentionally open. 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>
Preserve main API and archive changes while moving the conversation event cutover after the new 0004 migration. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
dcramer
force-pushed
the
ref/conversation-event-pi-adapter
branch
from
July 17, 2026 02:18
b71945d to
3895bfd
Compare
Preserve event-backed transcript authority while incorporating destination visibility, system metrics, and the latest dashboard and Slack changes. 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>
Preserve the canonical transcript cutover while incorporating the latest system dashboard and release metadata changes. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 741e059. Configure here.
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>
Preserve canonical event and outbox ordering while incorporating completion callbacks for reaction-only Slack turns. 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>
dcramer
marked this pull request as ready for review
July 17, 2026 15:21
Use the SQL-backed turn lifecycle across eval runtime, scheduled dispatch, and OAuth callback fixtures. Normalize actual scheduled Slack delivery and omit sendMessage when internal dispatch owns the final post. 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>
Keep the already-applied 0004 snapshot byte-identical to main. The appended 0005 snapshot remains the only migration metadata change. Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com> # Conflicts: # packages/junior/src/chat/runtime/slack-resume.ts
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 ConversationEvent log as its sole authority. The Pi adapter reconstructs model context from those events, the API exposes a privacy-safe semantic projection, and the dashboard owns the event-to-view reduction. Visible messages, failures, compaction, handoffs, and child lifecycle share the stream; raw Pi payloads, tool-call IDs, and private runtime metadata stay internal. Correlated handoff and advisor events replace their generic tool row instead of rendering twice.
This is an intentional hard cutover. Runtime Redis/session-log history readers and the old transcript, activity, and special-subagent API shapes are removed. The conversation message table remains a rebuildable search and hydration projection, not another history source. Child conversations keep their own event histories with immutable parent lineage, while privacy and retention follow the root conversation.
Recoverable Slack delivery now keeps only delivery control data and canonical event cursors outside the event log. Model continuity is committed before the delivery intent; accepted replies publish visible facts, full rejection rolls back undelivered model output, and partial multipart rejection records only the accepted prefix while retaining tool and side-effect continuity. Local, Slack, dispatch, continuation, and OAuth resume paths all write first-terminal-wins lifecycle outcomes, so failures remain visible after process or provider errors.
Rollout must block ingress, drain and stop old workers, apply the consolidated schema migration, run the CLI import and visible-event backfill, verify the seal, then deploy and restart. The schema migration rewrites retained SQL Pi rows; the CLI imports external Redis and advisor history before visible events seal each conversation.
For review, start with the migration and event/Pi boundary, then lifecycle and Slack recovery, then the reporting API and dashboard reduction.