A spoken Capture says what it said - #173
Merged
Merged
Conversation
Audio has been transcribed since ADR 0015, but the transcript lived only on the Enrichment row. Every surface that shows the walker's own words reads the Capture — the day digest, search, the To-do list, the Day flow card, the notebook — and a Capture recorded rather than typed has empty text. So a spoken walk was blank to all of them, and the day digest in particular was handed a corpus of empty lines and produced nothing worth reading. The transcript now lands on the Capture as it is made: - sync_captures grows a transcript column, carried by both repositories, written through a new recordCaptureTranscripts seam as the enrichment transcribes. Best-effort: a failure there costs the other surfaces their words, never the walker's report. - Hydration adopts it onto Captures the device already holds, not just new ones — the Capture always syncs before it is transcribed, so without that the device that recorded the walk is the one that never sees the words. - captureWords() is the one reader: typed text wins, transcript speaks when there is none. Applied at all six read sites, so a recording and a typed note are the same thing everywhere. scripts/backfill-capture-transcripts.mjs copies transcripts already recorded on past Enrichments onto their Captures, rescuing walks that have already happened rather than re-enriching them (which would re-spend the gateway and rewrite reports the walker may have filed). --day rescues one walk; --dry-run shows what it would write. Covered end to end in tests/capture-transcript.spec.ts, including the exact failure: a day of recordings reaching the digest prompt as words rather than blanks. No-ticket: true Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mm4zPLAX77USAqyk12jgc1
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Why today's digest was worthless. Audio has been transcribed since ADR 0015, but the transcript lived only on the Enrichment row. Every surface that shows "the walker's own words" reads the Capture — and a Capture that was recorded rather than typed has empty
text. So a spoken walk was blank to the day digest, search, the To-do list, the Day flow card, and the notebook alike. The digest was handed a corpus of empty lines and produced accordingly.This was never a model problem. The model got nothing.
The fix
sync_captures.transcript, carried by both repositories and written through a newrecordCaptureTranscriptsseam as the enrichment transcribes. Best-effort: a failure there costs the other surfaces their words, never the walker's report.captureWords()is the single reader — typed text wins, the transcript speaks when there is none, and a transcript never overwrites typing. Applied at all six read sites, so a recording and a typed note are the same thing everywhere downstream.Rescuing walks that already happened
scripts/backfill-capture-transcripts.mjscopies transcripts already recorded on past Enrichments onto their Captures. Deliberately a copy, not a re-enrichment: re-running the gateway would re-spend it and rewrite reports the walker may have already filed and routed.--dayrescues one walk; omit it for the whole archive. It refuses to run against a database that hasn't taken the migration yet, and keeps an existing transcript unless--force.Test plan
tests/capture-transcript.spec.ts— 6 tests covering the seam end to end, including the exact failure: a day of recordings reaching the digest prompt as words rather than blanks. Also: typed text always wins, re-transcription is idempotent, an empty transcript never erases a good one, and hydration gives the words to a Capture the device already holds.todo-destination,journal-notebook,day-digest,sync-hydrate,globals-csspnpm exec tsc --noEmitclean; eslint adds no new errors (the pre-existingset-state-in-effectones are untouched)No-ticket: true
🤖 Generated with Claude Code
https://claude.ai/code/session_01Mm4zPLAX77USAqyk12jgc1
Generated by Claude Code