bench(lab): carry the rejection forward and bound the loop - #273
Closed
luuuc wants to merge 1 commit into
Closed
Conversation
Authoring is a cycle, not a line, and what happens on the second attempt is where the method lives. Three verdicts send work back, and each is an opportunity to lose the thing that made the previous attempt worth improving. The instinct when a draft fails is to clear it and start clean, and the cost of yielding to it is invisible: six unrelated attempts look exactly like six iterations from the outside. lab/internal/loop holds a repository's position and refuses a re-entry that carries no table. Nothing is deleted: the attempt is filed with its anchor, its draft and the rejection, and the next attempt answers every rejection so far rather than only the last. Re-anchoring is its own decision with its own verdict; a re-question never touches the anchor, and a NO-ANCHOR records that one is owed without discarding the one that failed. Both ceilings refuse rather than warn. The authoring ceiling parks after the sixth cycle and is re-entered only by a deliberate resume, which hands a fresh cycle count and keeps the history. lab/internal/budget reads spend from the run tree every time instead of holding a counter, so a restart cannot spend the budget twice: the total is the size of a set of run directories, which makes double-counting unrepresentable rather than merely guarded against. A campaign runs unattended for hours, so no phase may ask a human anything. The lab boundary test now walks every production file for a read of os.Stdin and allows it only where a stream is handed to a command.
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.
Problem
Authoring is a cycle, not a line. Most drafts do not become a benched win on the first attempt, and what happens on the second attempt is where the method lives.
Three verdicts send work back —
NO-ANCHORfrom a draft,REQUESTIONfrom a mini-bench,DO-NOT-PAYfrom a validation — and each one is an opportunity to lose the thing that made the previous attempt worth improving. The instinct when a draft fails is to clear it and start clean, and the cost of yielding to it is invisible: six unrelated attempts look exactly like six iterations from the outside.A loop that re-enters itself also needs a bound, and this binary spends money unattended.
Summary
lab/internal/loopholds a repository's position in the authoring cycle and the rules for re-entering it.lab/internal/budgetreports what a campaign has spent by reading the run tree rather than by holding a counter.Changes
ReAnchorchanges the anchor, and it refuses unless a verdict asked for one. ANO-ANCHORrecords that an anchor is owed without discarding the one that failed, because a sub-floor cell is a question the anchor could not carry rather than necessarily a bad anchor.Resumeis the deliberate human action, and it hands a fresh cycle count while keeping the anchor, every attempt and every rejection.os.Stdin, allowed only where a stream is handed to a command.--manualstops before a phase and prints the artifact it awaits; there is no second bypass.Decisions recorded during the build
Spend is counted in paid runs, not dollars. Nothing on disk records a price — the model files carry an id, a provider and the tools that can drive them, and no rate — so a dollar figure would be a number the instrument invented.
budget.Ceilingand--manualhave no caller yet, because no command drives the loop until the flywheel cycle. The mechanisms are here and tested; the flag and the pay-path check are wired when the driver lands.Test Plan
make cigreen: build, tests, per-file coverage floor with no new exception, zero complexity suppressions, lint clean.