Skip to content

A day doctor, and reports that hear the whole walk - #175

Merged
wschenk merged 1 commit into
mainfrom
claude/walking-thoughts-org-g0qlvt
Aug 8, 2026
Merged

A day doctor, and reports that hear the whole walk#175
wschenk merged 1 commit into
mainfrom
claude/walking-thoughts-org-g0qlvt

Conversation

@wschenk

@wschenk wschenk commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

"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.mjs

Reads a day's Captures, its Enrichment jobs and its reports together and says which break it is. Reading is the default and writes nothing:

fnox exec --profile prod -- node scripts/day-doctor.mjs
fnox exec --profile prod -- node scripts/day-doctor.mjs --day 2026-08-07

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:

  • --fix releases claims older than 15 minutes back to queued, 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.
  • --redo releases 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; --all for 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

listPendingThreads froze capture.text into 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.ts gains a seventh: a Thread's frozen history carries what an earlier recording said. 7 passed.


Generated by Claude Code

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
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
walking-thoughts Building Building Preview Aug 8, 2026 6:12pm

Request Review

@wschenk
wschenk merged commit 86f7839 into main Aug 8, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants