enhance(cli): walk a repository to a result in four commands - #302
Merged
Conversation
A check whose verdict enum has one member is not a check. Preflight could only emit AUTO: on mastodon cycle 3 it found no lab/benches/mastodon.json, wrote sixty lines explaining why that is fatal, emitted the only verdict it had, and the loop advanced into the phase that spends money — against a matrix no file declared. - BLOCKED joins preflight's enum, and phase.Stopped is what it routes to: a second non-phase beside Done, because they are opposite outcomes and neither is a re-entry — no rewording of a question declares a missing arm - position.Blocked is its own standing rather than Unusable, which means an agent misbehaved; here nothing did, and the two send a reader to opposite places. The awaited phase stays the one that stopped, so editing the file and running again picks it up where it was - lab/plans/preflight.md declares both verdicts and says when to emit which; the plans loader holds the enum in both directions, so the graph and the plan cannot drift apart - position.Act says what kind of act moves a repository, for the pages that have to ask
Three pure packages, no callers yet. They exist so the flow can speak in ordinary English while the code keeps the names it should have: the internal vocabulary is right inside the binary and wrong on a terminal, and renaming it would make the code worse in order to make one screen better. - stage maps the eleven phases onto five plain-English stages and turns a verdict into what it means. A test walks phase.Graph and fails when a phase or a verdict has no words: one added without them would print a blank line at the moment somebody is watching to see what happened - say turns a scored pair into a sentence naming the bar and the direction. The gap is the difference of the ROUNDED percentages rather than the rounded difference, so a reader's own subtraction agrees with the one printed beside it - ask is the one place this instrument waits for a person: at the command boundary and never between two phases, with an unattended path that refuses rather than assuming when there is nobody there to answer
The paid step took eight flags and four hand-typed paths, printed a scenario path that does not exist, and left the operator to score both arms and subtract the two recalls in their head. `sense-lab pay <repo>` takes a repository: the arms come from the bench file, the scenario from the phase the graph says wrote it, and both arms are scored with the gap stated in words. - Six refusals before anything spawns: no bench file, arms that cannot all run, subjects that are not a baseline against a sense pair, a repository not standing at the paid step, the lifetime ceiling, and a scenario that cannot be scored. Scoring both arms against nothing returns zero for each, and zero against zero reads as a measurement in which Sense gave no advantage - cells.json is written after EVERY cell, and a second run into a directory that already holds one is refused by name: an interrupted matrix that left nothing naming the burned arm is how a later pass pairs it - `run` is deleted. It spawned a single unisolated session and took no subject, so a tree built with it carried arm names and no arms, which cost four paid runs to discover. Its shared resolution helpers move to job.go and its shared fixtures to fixtures_test.go, because what they describe is the lab rather than the verb - The SIGTERM test drives `pay`, where an agent left running is spending on an arm nobody can pair, and asserts the interrupted cell records what it burned
`sense-lab next <repo>` is the whole flow: admit an unknown repository, or advance a known one to its next stop, printing where it stands in five plain stages, a line as each stage starts, and a stop that says what happened, what is next, why, and the one command that moves it. `repo` is gone — it switched between three behaviours on whether a flag happened to be set, and which one you were about to get was invisible until it had happened. - Admission ends with a bench file already written and checked against the resolver, so what a repository is measured on is decided by editing rather than by authoring. Nothing is ever overwritten: a bench somebody wrote IS the decision this exists to ask for - Spending narrows to the paid cell alone. Report, harvest and board spend a model call on an artifact already on disk and are now cranked; they used to stop the loop and print three commands this binary does not have, which is what made the flow go dark after the expensive step - The checkout is held at its pin on every invocation rather than only the first. A phase run against a tree that drifted records a result against a commit it did not come from - `why` prints the whole record, `help concepts` defines the words the pages deliberately do not use, and every status row that can move carries the command that moves it - The verbs live in one function: position says only what KIND of act is owed, so a package that decides positions cannot go stale when a command is renamed
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
The bench instrument now walks a repository from a github handle to a measured result in four commands, with nothing typed that it already knows and no arithmetic left to the person running it. Every stop says what happened, what comes next, why, and the one command that moves it.
Problem
Driving one repository through one cycle took six commands, one of which did not exist.
sense-lab report,sense-lab harvestandsense-lab boardwere printed as instructions and answeredunknown command. Twelve paths were typed by hand acrossprobeand twoscorecalls, nine of them values the crank was holding at the moment it printed the instruction, and the command it printed named a scenario file that cannot exist because the run tree is not committed. Two files had to be hand written,cells.jsonand the bench that declares what a repository is measured on. The delta, which is the number the whole instrument exists to produce, was left as a subtraction in the operator's head. Four stops printed no next step at all, and the position page ran to 30KB, reprinted after every phase.Underneath that was one inversion. The instrument did the hard, irreversible things unassisted and correctly, then handed over the clerical work.
Worse, a check could not refuse. The preflight phase had a single verdict, so when it found no bench file for a repository it wrote sixty lines explaining why that was fatal, emitted the only verdict it had, and the loop advanced into the phase that spends money against a matrix no file declared.
Summary
One verb walks the flow and one verb spends, with the paths, the arms and the arithmetic derived rather than typed. A phase that finds something wrong can now say so and stop the loop.
Changes
The flow
sense-lab next <repo>admits an unknown repository or advances a known one, printing five plain stages, a line as each stage starts with its clock and its wall, and a four part stopsense-lab pay <repo>runs the paid cells the bench declares, checks each pair is a measurement, scores both arms and states the gap in words. Six refusals happen before anything spawnssense-lab why <repo>is the whole record, andsense-lab help conceptsdefines the vocabulary the pages deliberately avoidrepoandrunare deleted.runspawned a single unisolated session and took no subject, so a tree built with it carried arm names and no armsSafety
cells.jsonis written after every cell, and a second paid run into a directory that already holds one is refused by name, because an interrupted matrix that left nothing naming the burned arm is how a later pass pairs itOutput
Architecture Highlights
stagemaps the eleven phases onto five named stages,sayturns a scored pair into a sentence,askis the only place the binary waits for a person-yes, and a caller with no terminal and no flag is refused rather than assumed either waypositionreports what kind of act moves a repository; the verbs live in one function in the command layer, so a pure package cannot go stale when a command is renamedBreaking Changes
sense-lab repoandsense-lab runare removed.repois replaced bysense-lab next <repo>, which admits and advances.runhas no replacement by design: a paired cell is produced bysense-lab pay, and a single unisolated session is not a measurement.Test Plan
sense-lab next <handle>clones, indexes and stops with a bench file to reviewsense-lab next <repo>walks the stages and stops at the money with the command that spendssense-lab payinto a directory holding a record is refused and the record is unchangedmake cipasses: coverage gate, lint, complexity ledgermake smokepasses