Skip to main content

Module bisect

Module bisect 

Source
Expand description

Which tick made already-passing acceptance tests pass: a fact found by running the tests, never a guess from diffs.

The feature branch’s tick commits are searched by bisection — at most five runs, each with the acceptance files overlaid on the commit’s tree in a scratch worktree of its own under the state directory, sandboxed, under the checks’ deadline. A run that builds and fails says “not passing there”; anything that cannot say — a worktree that cannot be made, a run that times out or prints nothing readable — makes the answer “could not be determined”, never a task’s name. For a section added to a story’s file only that section’s tests run. No model call; the verdict is never changed.

Structs§

Found
The search’s answer and the runs it took.
Search
What the search needs.

Enums§

Probe
What one run at a commit said.

Functions§

budget
The run budget for n ticks: min(5, ceil(log2(n + 1)) + 1).
prune
Removes the scratch worktrees a crashed search left behind: only those whose process is gone, each by its own git worktree remove — never another live search’s, never the repository’s other worktrees.
search
Searches the feature’s ticks for the first one at which the acceptance tests pass (they pass on the branch’s tip: the red run said so).
search_with
search over ticks (oldest first) with probe(commit, n) telling what the tests did at a commit. Any undetermined probe ends the search with no answer.
section_command
The command that runs only the tests added declares: argv with the runner’s own filter (None: no filter is known for the runner — the search then cannot run only the section).