Going-forward trouble-ticket poller + repoint /trouble-tickets to events - #298
Merged
Merged
Conversation
Wires runTroubleTicketIngest into the sync worker's existing 20-minute trouble-ticket beat, guarded by the SAFETY comment: this must not deploy until the one-time timeline backfill has run and been verified on prod, because the append path claims each row's hash at recordedAt = now. Repoints the /trouble-tickets POC page from the sheet cache to the troubleTickets read model (still super-user only, still windowed to 6 months), rendering the parsed answers as labelled lines instead of the double-stringified JSON blob. The sheet cache stays: it remains the ingestion source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The /trouble-tickets repoint left deps.getTroubleTicketData unread by any production code; drop the field and its wiring (the underlying function stays - the sync worker path and tests use it directly). Also reword the ingest driver's comment, which still claimed it wasn't wired into the sync worker. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JamesMoulang
force-pushed
the
feature/tt-poller
branch
from
September 21, 2026 07:57
e6fc801 to
f6bdedd
Compare
An old sync bug left rows with every column NULL; the sheet_id-scoped cache replacement can never delete them (NULL never matches =), so prod carried 542 of them forever and the ingest would warn about them every cycle. Sweep them in the same atomic batch as the cache update. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Stacked on #297. Mirror of the quiz migration's #285 + #287, in one small PR.
runTroubleTicketIngestwired into the sync worker's existing 20-minute trouble-ticket beat, right after the sheet pull — new tickets becomeTroubleTicketCreatedevents within one cycle. Dedup by rowHash makes every re-run free./trouble-ticketsnow readssharedReadModel.troubleTicketsinstead of the sheet cache (same super-user gate, same 6-month window), and renders the parsed answers as labelled lines — fixing the old double-JSON.stringifyblob. The sheet cache stays; it's still the ingestion source.Draft until the one-time backfill (#297) has run and been verified on prod. The append path claims each row's hash at
recordedAt = now; deploying this first would permanently prevent historical tickets from being woven in at their true submission times. Same ordering the quiz migration enforced (#285 merged only after the #276 backfill ran). The SAFETY comment insrc/sync-worker/index.tsrecords this.🤖 Generated with Claude Code