A day doctor, and reports that hear the whole walk - #175
Merged
Conversation
The day view says "No Enrichment yet" for three different breaks — the job was never queued, it failed, or it is stuck mid-claim — and from the outside they are indistinguishable. scripts/day-doctor.mjs reads the Captures, the jobs and the reports for one day together and says which it is. Reading is the default and writes nothing; --fix releases stuck claims and re-offers failures a retry could fix; --redo releases the day's Captures from the Enrichment that covered them so the queue writes their reports again. The old report is left in the Thread's history — one the walker may already have read and acted on is not ours to delete. And the break the doctor was written to find, fixed: a Thread's frozen history carried capture.text, so a Capture that was audio alone reached the model as an empty line. Only a job's *target* Captures get their bytes re-sent, so every earlier recording on the Thread was silent to it — a second thought on a spoken Thread got a report written as though the walk had said nothing until then. Both repositories now freeze captureWords(). 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.
"I don't see the reports."
No Enrichment yet.is what the day view says for three different breaks — the job was never queued, the job failed, or the job is stuck holding a claim from an invocation that died. From the outside they look identical, and none of them can be told apart from the desk.scripts/day-doctor.mjsReads a day's Captures, its Enrichment jobs and its reports together and says which break it is. Reading is the default and writes nothing:
Per Thread it prints every Capture with the words it carries (typed, or the transcript, or
(no words)), whether an Enrichment covers it, how long the report is and which model wrote it, and every job with its status, attempt count and error. It flags the two silent states by name: a report too thin to be worth reading, and an inclusion pointing at an Enrichment that no longer exists — that one makes the Capture count as researched forever, so the queue skips it and there is nothing to show for it.Then two repairs:
--fixreleases claims older than 15 minutes back toqueued, and re-offers failed jobs a retry could fix. Failures no retry can fix (missing_original_media_*,model_*_unsupported_media_*) are named and left alone rather than burned through 25 attempts again.--redoreleases the day's Captures from the Enrichment that covered them, so the queue treats them as never researched and writes their reports again. Threads whose report is missing or thin by default;--allfor every Thread of the day. The old report stays in the Thread's history — one the walker may already have read and acted on is not ours to delete.Neither flag writes a report itself. The queue does that on the next
/api/enrichment/process, which the desk fires when it is open.The break it was written to find
listPendingThreadsfrozecapture.textinto the job's basis history. A Capture that is audio alone has no text, and only the job's target Captures get their bytes re-sent to the model — so every earlier recording on the Thread reached it as an empty line, with no audio behind it. A second thought on a spoken Thread got a report written as though the walk had been silent up to that point.Both repositories now freeze
captureWords(capture), the same fallback the digest, search, the To-do list and the Day flow card already use.Tests
tests/capture-transcript.spec.tsgains a seventh: a Thread's frozen history carries what an earlier recording said. 7 passed.Generated by Claude Code