0094 — Delete the conversation reconciler sweeps: the turn-settled stream is the sole path
- Status: Accepted
- Date: 2026-07-16
- Deciders: Gera
- Relates:
- ADR-0088 — the durable
conversation.turn_settledevent stream. This ADR replaces 0088's PR-3 ("relax the reconcilers to hourly, retire after a further clean month") with an immediate full deletion. - ADR-0084 — inline topic stamping. Its reconciler half is deleted; its classify-and-stamp logic is unchanged.
- ADR-0079 — single canonical writer; the D4 sweep-side regarding-reconcile rode the topics sweep and is deleted with it.
- ADR-0088 — the durable
Decision
Delete BOTH conversation "reconciler" backstop sweeps entirely — the topic sweep
(conversationTopicClassificationWorkflow / classifyRecentConversationTopics,
Schedule conversation-topics-reconciler) and the grade sweep
(conversationGradeSweepWorkflow / gradeRecentConversations, Schedule
conversation-grader-reconciler) — while keeping the always-on real-time
inline path untouched.
"No reconcilers, no arms, no flags — always stamp, always grade, always
topic." The ADR-0088 event stream is verified live in prod:
conversationTopicStampWorkflow + conversationGraderWorkflow execute per
settled turn on ALL channels (SMS/email via the inbound-processor Lambda,
voice call-ended, dashboard/simulator). The stream carries durability
(at-least-once SQS FIFO + DLQ alarm), so the 15-minute sweeps were pure
redundancy — the reconcilerCaughtMissed retirement instrument existed to
prove exactly this.
What was deleted
- The sweep workflows (
conversationGradeSweepWorkflow,conversationTopicClassificationWorkflow) + their worker/barrel registrations. - The sweep activities (
gradeRecentConversationsActivity,classifyRecentConversationTopicsActivity) + theirwithAutomationRunwraps andconfig/automations.tomljob entries. - The Temporal Schedule upsert halves of both clients
(
upsertConversationGradeSchedule,upsertConversationTopicsSchedule,CONVERSATION_GRADE_SCHEDULE_ID,CONVERSATION_TOPICS_SCHEDULE_ID,RECONCILER_INTERVAL,RECONCILER_WINDOW_HOURS,RETIRED_NIGHTLY_SCHEDULE_ID,deleteRetiredNightlySchedule) + the two operator upsert scripts, and theconversation-topics-reconcilerentry in the ADR-0045 namespace-prep contract. - The domain sweep functions (
gradeRecentConversations,classifyRecentConversationTopics,conversationsToGrade,conversationsInRecencyWindow) and thereconcilerCaughtMissed/reconciler_caught_missed_conversationretirement counter everywhere. - The D4 sweep-side refuse-to-guess regarding reconcile
(
reconcileConversationRegarding,decideRegardingReconcile) + itssingle_writer_regarding_unresolvablebake-alert kind. The INLINE backstamp (backstampWorkOrderReportSegment: bounded retry + the loudsingle_writer_regarding_tie_failedmarker) is the sole tie path.
What was kept (100% intact)
conversationTopicStampWorkflow+stampConversationTopicsActivity+classifyAndStampConversation(inline topic stamp, 10s debounce as of 2026-08-28 — see ADR-0084's amendment note).conversationGraderWorkflow+gradeConversationActivity+gradeAndAlertConversation+ the RED→#alerts rubric (conversation_grade_red) + theredAlertedAt/gradedAtclaim/watermark dedup.- The bridge consumers (
topic-stamp,grade,maintenance-dirty-bits) inlambda/conversation-events-bridge/registry.tsand the client signal fns they call (signalUntaggedMessagesArrived,signalConversationTurnSettled).
Accepted trades (named, not hidden)
- Crash-before-publish drop is not retried. A settle edge lost before the awaited SQS publish (or swallowed after its one retry) gets no sweep re-cover. The thread's NEXT turn re-emits and the untagged rows / ungraded state are picked up then; a thread that never speaks again keeps its last state.
- No historical backfill lane. The wide-window sweep invocation
(manual
windowHoursoverride) is gone. A one-off backfill, if ever needed, is a script overclassifyAndStampConversation— not a standing reconciler. - D4 sweep reconcile gone. Untied ≥24h rows that the inline backstamp's
retry could not tie are found via the
single_writer_regarding_tie_failedlog marker, not an alert-driven sweep.
Ops follow-ups (not in this PR)
- Delete the two live Temporal Cloud Schedules
(
conversation-topics-reconciler,conversation-grader-reconciler) onpropflow-renewal-prod— the code deletion makes them dead letters (their workflow types no longer register on the workers). tools/agent-smith'sreconciler-caught-missed-clean-weekbake checker is now dead (its counter no longer exists) — remove it in a Smith-side change.