Repository navigation
feat(triage): keep every candidate's transcript and list the queue locally - #80
Merged
Merged
Conversation
…cally A file held by the quality gate kept only a 500-character excerpt of each candidate transcript in its Markdown manifest, so the decision about it was often made on a fragment and a view of the queue could not show what was never saved (brief 001). `batch` now writes, beside the unchanged manifest, a `<stem>.json` record -- every candidate's score, the reason the file was held, when, and where each transcript is -- and each candidate's full transcript as `<stem>.<backend>.txt`. `tetrak-ocr triage` lists the queue from those records, and `--serve` serves it as a page: each file, its best score, the engine and the reason held. The server binds to the loopback address and nothing else, with no flag to bind elsewhere, answers GET for `/` only and serves no files. A directory written by an older release lists its manifests by name, and an empty or missing directory is reported as empty rather than failing. Closes #26 Closes #27 Co-authored-by: Yvette Mankerian <yvettekm@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying tetrak with
|
| Latest commit: |
6e0dc16
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a94de96c.tetrak.pages.dev |
| Branch Preview URL: | https://feat-triage-queue.tetrak.pages.dev |
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.
Closes #26. Closes #27.
The first two build stories of brief 001, in one PR because the list view reads what the record writes.
Keep every candidate's full transcript (#26)
When the quality gate diverts a file,
batchnow writes three kinds of file intoworkspace/triage/:<stem>.md<stem>.json<stem>.<backend>.txtThe writing lives in a new
tetrak_ocr.triagemodule;batch._send_to_triagecalls it beside the manifest it already wrote. The CSV manifest'soutputscolumn for a triaged row still names the.mdalone, deliberately, so that beta format does not change under this.List the queue (#27)
tetrak-ocr triageprints the queue as a table;tetrak-ocr triage --serveserves the same as a page onhttp://127.0.0.1:8321/(--portto change it,--dirto point elsewhere). Each row: file, best score, engine, reason held, when, and how many candidates.HOSTis a constant, there is no flag to bind elsewhere, and two tests pin it: one on the bound address, one that--hostis rejected./only, no files served, no authentication because there is nothing remote. The directory is re-read on every request, so the page follows a batch still running.Tests
tests/ocr/test_triage.pycovers the record and transcripts, the queue reader (including the older manifest-only case), rendering and escaping, and the server (loopback address, the page, 404 elsewhere, the empty case, on a free port).test_batch.pycovers a diverted file with three backends end to end, including that the Markdown manifest is unchanged byte for byte.test_cli.pycovers the subcommand wiring. Fast suite: 452 passed; ruff, Sphinx-Wand markdownlint clean.Notes for the product side
servewould take. Worth recording in brief 001's decision log; I have not touched the product repo for this..txtfiles rather than by re-running anything.🤖 Generated with Claude Code