Expand description
Bug fixes, the L2 rung: a person’s triad — what happens (Current), what should (Expected), what must stay as it is (Unchanged) — one reproduction per Expected statement that fails on the untouched code by an assertion, shown to the person once and then frozen, and a fix judged like any task plus three bug rules: every reproduction goes from red to green, the pass-to-pass set stays green, and undoing the fix (the revert) is rejected by at least one reproduction.
The rules live here, where they are property-tested; running tests and model calls is the runtime’s.
Structs§
- Acceptance
Ref - What the fix’s visible acceptance set came from.
- BugHome
- The bug’s home, as the format adapter chose it.
- BugReport
- A bug: where it lives, the person’s triad, the reproductions and how
far it got. The
bugpayload, and what speccoder keeps of it. - Candidate
- Someone else’s fix, judged as the attempt.
- Candidate
Refusal - Why a candidate was refused before it was applied.
- Claim
- The author’s own words, kept only as a labelled claim.
- Confirmation
- The person’s one confirmation, bound to what they saw.
- Discrimination
- Everything that shows the reproductions tell a fixed tree from a buggy one.
- Handoff
- The hand-off of a stopped bug, composed by the engine from the journal (never written by a model).
- Held
OutVariant - A held-out variant, as the payload shows it: never its content or path.
- Issue
Ref - The issue a bug was recorded from.
- Member
- One test that must stay green.
- Pass
ToPass - The tests that passed before the fix and must pass after it.
- PreFrozen
Ref - Where the confirmed reproductions are kept, as recorded with the fix.
- Rejection
- The person rejected the reproductions shown; the reason goes to the author’s next try.
- Reproduce
Try - One try of the reproduction author.
- Reproduction
- One reproduction test.
- Revert
Result - The revert candidate’s result.
- Special
Case - One special-case candidate: a fix that recognises a reproduction’s literal inputs.
- Statement
- One statement of the triad, in the person’s words.
- Statements
- Statements, by what the tries showed.
- Triad
- The person’s three statements about a bug.
- TryStatement
- One statement’s class in one try.
Enums§
- Basis
- How the person decided the reproductions.
- Candidate
Origin - Where a foreign fix came from.
- Final
- A reproduction on the final tree.
- Home
Kind - Where the format keeps the bug.
- Member
Final - A pass-to-pass member on the final tree.
- Outcome
- The bug’s outcome; distinct from a task’s verdict.
- Pass
ToPass State - Whether anything was selected for pass-to-pass.
- Reproduce
- What reproduce decided.
- Revert
- A reproduction against the revert candidate (the fix undone).
- Source
- Who wrote a reproduction.
- Stage
- Where the bug is.
- Triad
Error - Why words are not a triad.
Constants§
- DEFAULT_
TRIES - Reproduce tries when
[bug] reproduce_triesis not set. - MAX_
SLUG - The most a bug slug may be long.
- MAX_
TRIES - The most
[bug] reproduce_triesallows.
Functions§
- bug_
class - The class a reproduction counts as from its two baseline runs: red only by an assertion in both; red once, then not, is flaky; an absent symbol is not a bug’s red.
- bug_
verdict - The verdict on a bug task:
base(the ordinary rules, held-out included) stands only if every reproduction passed on the final tree, the revert was rejected by an assertion, every reproducing statement has a special case and each was rejected (or ruled), the pass-to-pass set passed by name and the held-out variants passed. Reasons name statements, never a held-out test. - decide_
reproduce - What the tries so far decide, for the Expected statements
expectedand at mostmaxtries. Pure; never reads the author’s words. - normalise
textwith every run of whitespace one space, trimmed: how statements are compared and hashed.- rejected_
try - Why a try was discarded when the person rejected what it reproduced.
- valid_
slug - Whether
slugnames a bug directory: lowercase ASCII letters, digits and-, starting with a letter or digit, at mostMAX_SLUGlong — never a path (.., a separator) whatever its source (a flag, an interface, a commit trailer of an untrusted pull request).