Skip to content

test(airc): add chat dual-write smoke proof - #1435

Merged
joelteply merged 1 commit into
canaryfrom
feat/airc-stage1-smoke
May 25, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/airc-stage1-smoke

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • add scripts/ci/canary-smoke-chat-dual-write.sh for the Stage 1 Continuum chat -> AIRC proof gate
  • add a typed TS probe that sends a real collaboration/chat/send message, asserts the ORM chat_messages row, then verifies the AIRC SQLite event by the structured receipt id
  • wire the smoke into canary-smoke-matrix.sh as a stack-required slice and mark the Stage 1 proof-gate item complete

References work card 38c581a6-6fd7-4d4f-bf69-567f6a85fbea.

Verification

  • cd src && npx eslint --max-warnings 0 tests/precommit/chat-airc-dual-write-smoke.test.ts --no-warn-ignored
  • cd src && npm run build:ts
  • bash -n scripts/ci/canary-smoke-chat-dual-write.sh scripts/ci/canary-smoke-matrix.sh
  • bash scripts/ci/canary-smoke-chat-dual-write.sh currently fails locally because the running Continuum stack is not serving this canary checkout yet: chat/send returns no airc receipt. That is the intended failure signal for this smoke.
  • pre-commit hook: TypeScript passed, staged lint clean, chat-roundtrip passed; browser-ping hit the hook timeout and was skipped by the configured gate
  • pre-push hook: TypeScript clean, ESLint baseline ratchet held, Rust gates skipped because no Rust-relevant changes

@joelteply
joelteply merged commit 32f66fe into canary May 25, 2026
4 checks passed
@joelteply
joelteply deleted the feat/airc-stage1-smoke branch May 25, 2026 13:12
joelteply added a commit that referenced this pull request May 25, 2026
* docs(chat-airc): Stage 1 → 2 design + decision resolutions for #6b564a9a

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]>

* feat(airc): project active realtime subscriptions (#1437)

Co-authored-by: Test <[email protected]>

* feat(chat-airc): add mirror writer skeleton

---------

Co-authored-by: Test <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant