Repository navigation
feat(chat-airc): add Stage 2 mirror writer skeleton - #1436
Merged
Merged
Conversation
Continuum chat substrate migration card 6b564a9a (Replace Continuum chat/Postgres dependency with AIRC Rust SQLite substrate) — Stage 1 of the proof-gates doc is now complete (continuum#1432 publisher seam, #1433 structured airc-publish CLI, #1435 smoke proof, all merged to canary). This PR appends the Stage 1 → 2 design + resolves the four open decisions that were explicitly blocking that transition: 1. Dual-write atomicity: pick (b) append-only with reconciler for Stage 2 (AIRC primary, mirror writer subscribes + back-fills on restart + every 60s). 2. Message ID: invert from Stage 1 — AIRC event_id becomes canonical at Stage 2 cutover; legacy ORM ids retained in metadata for pre-Stage-1 history rows; same UUID shape so no schema change. 3. Backfill: none. Pre-Stage-1 history stays in ORM, served via the mirror reader path. Known migration boundary, not a regression. 4. Tombstones: stay ORM-local at Stage 2 (mirror retains deletedAt). Stage 3 introduces chat.redact AIRC event type (out of scope). Plus the Stage 2 architecture: new AircToORMMirrorWriter daemon that subscribes via LibAircSubstrate (gated on continuum#1434 wiring slice landing first), ON CONFLICT DO NOTHING for idempotency, cursor-resumed reconciler. Producers (ChatSendServerCommand, PersonaUser persona replies) drop their direct ORM write; readers stay unchanged. And the Stage 1 → 2 PR sequence: PR-A mirror writer skeleton, PR-B producer cutover, PR-C reader audit, PR-D 1h soak. PR-A is the gating slice on this lane. Status log updated to mark Stage 1 complete with PR refs. Does NOT touch ORM-side code (Stage 3 is the only irreversible step and is out of scope), does NOT change the AIRC wire format, does NOT touch persona memory / engram admission. Closes design portion of work card 6b564a9a-ba4f-4bc4-8ba8-c0fe88dd0eaa. Implementation lands in follow-up PRs A-D. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Summary
Card `6b564a9a-ba4f-4bc4-8ba8-c0fe88dd0eaa` (Replace Continuum chat/Postgres dependency with AIRC Rust SQLite substrate). Two commits:
Design slice (commit 1)
Implementation slice (commit 2 — PR-A)
Verification
What this PR does NOT do
Follow-up
PR-B (producer cutover), PR-C (reader audit), PR-D (1h soak) per the Stage 2 PR sequence in the proof-gates doc.
Closes design portion + PR-A of work card `6b564a9a-ba4f-4bc4-8ba8-c0fe88dd0eaa`. Card remains open until PR-B/C/D land.