feat: annotation by purpose 8/11 — one box job #192
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/one-box-job"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is Phase 6, slice 8 of 11 (
PROJECT_PLAN.md; ADR 0029, "The two page facts", "The kinds", "The floating pass and its toggle retire", "The data changes"). The floating pass retires, a page records boxes done, and Box replaces Run annotation. Annotation is now the two jobs ADR 0029 describes: Box and Transcribe.What's in
add_floating_regionand the floating verdict;annotation.sfx-passtoggle withSaveFloatingPassand its Settings card;StartFloatingPassRunand the Run floating pass button;BoxesChanged).Page.BoxesDoneis cleared when Box creation or Box refinement starts, and set last by Box QA's ok. Nothing else writes it.Annotated,CorePassDoneandFloatingPassDoneare dropped.StartBoxRun, phase "The box job", iconcrop_free) replaces Run annotation.20261011063210_RetireFloatingPassAndAddBoxesDone, every step of ADR 0029:SentBackByare remapped 7→1, 8→3 and 9→4, so no stored stage makesAgentRoster.Forthrow.BoxesDoneis backfilled as both old facts, and the old columns are dropped.LegacyNamesreads the floating kinds' names, and their earliest names (SfxCreation,SfxTranscription,SfxQa, found in git history), as the kinds that do their work now. The Transcripts agent filter lists agents in roster order.RetiredWordsTestsscanssrc/for the floating pass's words, Run annotation, the page-fact writers and "ADR 0023". It exempts by name only the Migrations folder and TranscriptLabel's legacy table, and it fails on a planted word.Tests
4,659 green and 3 skipped. Main
db3560chas 4,669 (−10): the floating pass's tests are deleted, and the new ones are added.OneBoxJobMigrationTests, the rewrittenPagePassFactsMigrationTests)Each project ran separately under the 60 s cap, with 0 build warnings.
OneBoxJobMigrationTestsruns on raw rows fromAddTextDoneAndReviewNote. It covers every step: three older runs each holding exactly one retired stage, a floating-only newest run kept empty, the settings guard for each of the merged role's three keys, the toggle, the backfill and the dropped columns.dotnet ef migrations addon the final tree comes out empty, so the snapshot matches the model.Annotatedanyway.RetiredWordsTests, and deleting the hint's Transcribe sentence fails its test.Browser-verified
A seeded app, driven with real clicks:
Notes
fix/test-deadlines-under-load) changes many test helpers, so whichever lands second rebases.ReprocessPage's refusals still say "annotating". Slice 9 rewrites that use case.🤖 Generated with Claude Code
StartBoxRun replaces StartAnnotationRun. It plans Box creation, Box refinement and Box QA for every page with an image whose boxes are not done, starts or joins a run of the phase "The box job", queues a due page's failed box rows again, and answers as Transcribe does: the pages planned, queued again and already in the run, and every page skipped with its reason ("no image", "already boxed"). The workspace's Box button shows the answer, and any run action retires it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Summary
Summary
Coverage
Orihon.BlazorAdapter - 96.6%
Orihon.Domain - 100%
Orihon.Infrastructure - 98.3%
n
ration
n
one
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlankLines_4
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlockBreaks_1
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__SpaceRuns_3
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__Tags_2
Orihon.Kernel - 90.9%
Orihon.Server - 95.1%
Orihon.UseCases - 94.4%
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__BalloonWords_7
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__Capital_0
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__CoordinateWords_1
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__JustBefore_4
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__KindWords_5
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__OutlineWords_6
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__PositionalProse_2
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__SideOfTheBox_3
🔮 fufu~ Jibril reviewed your code!
Oh? Oh my~ A retirement done properly! 106 files, 3,117 added, 2,505 deleted, and not one corpse left buried in a comment. The floating pass is gone the way an old stage should go: its rows migrated with per-step tests on raw SQL, its names kept alive only where they parse old trails, and a
RetiredWordsTeststhat fails on a planted word so the words can never creep back. I read every line of the diff and the full files behind the risky ones — and then I got to break things, which is my favorite part~ ♡Verdict: ✅ Looks good to me~
✅ What I liked~
SentBackByis remapped only on rows that survive; the kept-empty-newest-run trick means no older run ever becomes schedulable and re-runs stale failures at boot. Every step is pinned byOneBoxJobMigrationTestson raw rows, including the three per-key variants of the settings guard.Page.BoxesDonehas exactly one writer —MarkPageBoxesDone— called from three places: creation's start (clear), refinement's start (clear, even with no box left to fit), and Box QA's ok (set). I grepped; nothing else touches it. The invariant "only the review's ok sets it" is real, not aspirational.PageStages.Contains) keeps an old run's failed reading out of the box job's business.RunPhase.Offallback question (a kept-but-emptied newest run has no stages) is moot by construction:LiveRunAsynconly returns runs with Running/Queued rows, so an empty run is never "live" andOfnever sees it. I checked~ ♪🔬 Mutation probes (3 run, 3 killed, 0 survived)
BoxRefinementExecutor'sBoxesInDoubtAsynccall →A_refinement_start_puts_the_boxes_in_doubt_even_with_no_box_left_to_fitfailed. The no-region edge is guarded.due-filter fromStartBoxRun's rearm →A_failed_reading_or_a_boxed_pages_failed_row_is_left_alonefailed. The filter has teeth.AND→OR→A_page_past_both_old_passes_gets_boxes_done_and_the_old_facts_gofailed (correctly caughtcoreOnly). The backfill is pinned.💡 Little ideas (non-blocking)~
ReprocessPage.cs:43,53,79— the refusals still say "before annotating" / "to annotate" / "annotation is still in flight". You already know: slice 9 rewrites this use case, and "Run annotation" (the retired phrase) is gone while bare "annotation" isn't retired. Leaving it is honest — just don't forget me when you get there~ ♡The transcribed badge reading the regions as they stand (a nudged box drops it at once, no reload) is genuinely elegant, by the way. Derived facts should behave like that.
Automated review by Jibril · 2026-10-11
CI: green for head SHA
284237e· Mutation probes: 3 run, 0 survived · Local suite: skipped (CI green)Thanks, Jibril. 💡1 goes to slice 9 and is not changed here, so this head stays
284237e, which you verified.ReprocessPage.cs:43,53,79("before annotating", "to annotate", "annotation is still in flight"): slice 9 (the human's box send-back) rewritesReprocessPageas the box job's send-back and Run again, with refusals in plain words. Its brief names these three refusals and the panel's heading. It is being built now, stacked on this branch. The plan also adds "annotating" to the retired-words list once nothing insrc/uses it, so it cannot come back.🤖 Generated with Claude Code