fix: a send-back restores the attempt budget, and the core boxer hears only its prose (1/2) #152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/send-back-routing-and-budget"
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?
Part 1/2 of the tier-1 fixes from triaging the agents' debriefs and friction reports (ADR 0024, 0025). These are two run-engine defects the reports exposed. Part 2/2, the transcriber, is #154, stacked on this branch; #153 (the refinement sampler) is independent. ADR 0017, 0018.
What's in
Execution.SendBackresetsAttempt.Startincremented the count and onlyRequeuereset it. So every send-back kept the row's earlier attempts on the count. That covers QA's automatic send-back and also a person's retry-with-feedback, whoseRetryExecutionAsyncdoc already claimed the budget was restored.needs_workfails the review's own attempt rather than sending the review back.scoped is null ? sink.Regions : null).QaReportSinkall say a per-region complaint reaches only the refiner. The code disagreed.report_qa's description and refusal now defer to each brief. The floating brief keeps a slot under regions, where its boxer (which holdsreorder_region) still hears it. Filing it as feedback instead would re-read every floating region.RetryExecutionAsync,AgentDebrief.Attempt,QaReportSink.Tests: +7 (Domain +1, UseCases +6). The total goes from 1254 to 1261 (Domain 129, UseCases 603, Integration 266, BlazorAdapter 263), from a fresh run at
969d4f4.ExecutionTests.A_send_back_restores_the_budget_from_either_settled_state:Attemptis 0 after a send-back from Succeeded and from Failed.RunEngineTests.A_sent_back_row_that_fails_once_is_retried_whatever_it_spent_before.AnnotationRunTests.A_review_that_never_passes_fails_for_good_at_the_cap_while_the_chain_keeps_its_budget, plus its floating twin:Attempt = 0turns both red.A_mixed_core_verdict_sends_the_boxer_its_prose_and_the_refiner_its_boxes:A_mixed_floating_verdict_hands_the_boxer_both_halvespins the other branch of the ternary. Replacing the ternary withnullturns it red.AnnotationToolTests.Every_reading_order_problem_goes_to_the_one_pass_that_can_reorder:report_qadefers to each brief and no longer says "wrong as a whole".Notes
attempt > 1as "an earlier attempt broke off", which is only true once this reset is in.🤖 Generated with Claude Code
SendChainBackAsync handed the boxing pass the verdict's per-region list whenever the verdict also carried prose. For the core pass that contradicts ADR 0017 (a per-region complaint reaches only the agent bound to that box), the page-QA brief ("and no other") and QaReportSink's own summary — and it cost work: a core boxer handed "p3r8: should be embedded" holds no tool that sets a form, so it deleted and re-created the region, discarding its transcription and ink. The boxer now gets the list only when no scoped stage exists to receive it; the floating pass has no refiner and keeps both halves. The companion change is what keeps this safe. Only the boxer can reorder, and the brief used to send a single misplaced region to regions — which, with the list withheld, would reach only the refiner, which cannot move it. The page-QA brief and report_qa's description now send every reading-order problem to feedback with its labels named. The floating QA brief is unchanged: its boxer still hears both halves and holds reorder_region. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Summary
Summary
Coverage
Orihon.BlazorAdapter - 95.5%
Orihon.Domain - 100%
Orihon.Infrastructure - 97.2%
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlankLines_4
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlockBreaks_1
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__SpaceRuns_3
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__Tags_2
Orihon.Kernel - 90.9%
Orihon.Server - 94.4%
Orihon.UseCases - 97.7%
🔮 fufu~ Jibril reviewed your code!
Two little run-engine bugs ganged up on one poor transcription page — a streak that never reset, and a boxer force-fed another agent's complaints. You fixed both with surgical little cuts, and the pins are precise. Fufu~ I had such a good time killing them~ ♡
Verdict: ✅ Looks good to me~
✅ What I liked~
Attempt = 0inSendBack(Execution.cs:147) makes the budget mean consecutive automatic attempts within a streak, exactly asRequeuealready did — the precedent wasn't novel, the asymmetry was the bug. The doc comments (Execution,AgentDebrief.Attempt,RetryExecutionAsync) now tell one story, andRetryExecutionAsync's pre-existing claim ("budget restored") is finally true rather than re-documented. Fufu~ nothing makes me happier than a doc debt closed by making the code agree with it~scoped is null ? sink.Regions : null(AnnotationExecutors.cs:196): the core boxer hears only prose, the refiner and tail keep the named boxes, and the floating boxer keeps both halves because no scoped stage exists to strand them on. AndEvery_reading_order_problem_goes_to_the_one_pass_that_can_reorderpins the capability grants the routing rests on — boxer holdsreorder_region, refiner doesn't. Routing justified by verified tool grants, not vibes~ Oh? Oh! That's the good stuff~Attempt == 2assert was replaced by a behavioral pin — redo counts viaTranscriptLabel, feedback delivery asserts,DoesNotContain("form should be embedded")on the boxer's kickoff. AndEfRunStoreTestsnow pins the reset persisting through the real store.boxerScope/refinerScopemid-redo because success clearsFeedbackRegions— a post-hoc read would prove nothing — shows you understood what the pin needs to pin~ ♪Attempt = 0deleted fromSendBack(surgically — my first probe sed hitRequeuetoo and I redid it on the one site) → Domain 2 red (A_send_back_restores_the_budget...+ the Requeue sibling, which also settles via SendBack) and the 3 loop/RunEngine pins red in UseCases.null→ exactlyA_mixed_floating_verdict_hands_the_boxer_both_halvesred, the other three filtered tests correctly green.sink.Regions(the pre-fix behavior) → exactlyA_mixed_core_verdict...red at AnnotationRunTests:1173, with the original bug's own symptom in the failure text:- p1r2: form should be embeddedleaking into the boxer's kickoff.My first run of probe 1 came back falsely green — the test bin held a pre-mutation
Orihon.Domain.dll(timestamps 11:42 vs 11:50). Bins nuked, rebuilt--no-incremental, red as it should be. My trap, never attributed to your PR~969d4f4: Domain 100% line and branch includingExecution, UseCases 97.7%/89.5%,AnnotationStage100% line. Green CI and actually-exercised paths, verified~attempt == 1withfeedback != null, so #154'sattempt > 1read ("an earlier attempt broke off") stays sound — and withWithDistrust's distrust clause firing onfeedback is not null || attempt > 1, a first-attempt redo still hears its distrust. Merge this before #154, as you said~No blockers, no suggestions — the tree came back pristine after every probe and the whole suite re-greened. Merge it~ fufu~ ♡
Automated review by Jibril · 2026-09-26
CI/CD: passed for head SHA (coverage bot 9927 @
969d4f4) · Local checks: full matrix 1261/1261 green, 3/3 mutation probes killed on their own pins