Council Autofix Transition Table & Fixture Format¶
Statuses¶
AwaitingNativeReview: Two consecutive rounds completed with zero OpenMajororBlockerkeys.Escalated: The loop stopped early or at the round cap with a deterministicReasoncode.
Key States¶
Open: Raised this round and needing a fix.Fixed: PreviouslyOpen, absent this round after a patch was applied. AFixedkey raised again always reopens toOpen, even when the vote dismissed it this round, and setsreopenedFixedKey.Dismissed: Dismissed by voter consensus (single-family seat findings only).Superseded: Replaced by a successor key. A targeted key moves here — never toFixed— when the next round raises a reworded version of it (same normalized path, same lens group, snippet did not exist before the last patch). The successor reuses the targeted key's integerIdentityand isOpen. Convergence checks compare identities, not keys, and a successor is never churn. Successors are strictly one-to-one: a target raised in the same round is never superseded, and when more than one new key matches a target there is no successor - each is a new key, and the target staysOpen(it is never markedFixedwhile reworded versions of it are still being raised). ASupersededkey raised again restores anOpenrepresentative for that identity, with the same convergence checks as a reopenedFixedkey.- Rank is sticky per identity: a downgrade (e.g. a Major later reported as Low) stays open at the old rank. Clean, sensitive, and successor checks all use the stored max rank.
Reason Codes¶
GateCannotRun: Baseline proof failed (Baseline(StartSha) == Red), a required voter seat wasNotRunafter retry, scanners neither ran nor were skipped (Ran == false,Skipped == false), a ref or path starting with-was supplied (it would parse as a git flag, so everyGitArgvbuilder rejects it withGateCannotRunException), or any live git/policy/HEAD read failed operationally (timeout or unexpected nonzero exit; confirmed-missing paths return null instead). Never "empty = no risk" and never "no scanners".ChairUnavailable: A required chair seat wasNotRunafter retry.SeatDisagreementHighCritical: A single-familyHighorCriticalfinding received at least oneAcceptvote and at least oneRejectvote.SensitiveChange:IRiskPort.IsSensitive(sha)returned true, a finding key (scanner, seat, or manual) had lens groupsecuritywith rank>= Major, orIRiskPort.IsSensitiveProposal(proposal)returned true.UnsafePatch:IGuardPort.Check(proposal)failed twice in the same round, or a fixer was exhausted on a guard strike with no valid replacement allocation.PoolExhausted: Pre-roundAllocationPlanner.Plancould not find a valid chair, fixer, and at least one voter family. A fixer family never votes or chairs in that run, so former (excluded) fixers count against voter quorum too, and the chair is never an excluded former fixer. Dismissal of a High/Critical candidate still needs two rejecting families (seeSeatDisagreementHighCritical).NotConverging: After>= 2completed fix rounds, either a previouslyFixedidentity was re-raised asOpenor the round'sOpenMajor/Blockeridentity set was not a strict subset of the previous round's set.Churn: Two consecutive fix rounds each introduced a new key whereSnippetExistedBefore(key, shaBeforeLastPatch)was false. Keys introduced after a round with no applied patch never count, and successors never count.RoundCap: Round 5 completed without achieving two consecutive clean rounds.ProveFailed: A round exhausted all 3 fix attempts without committing, or a fixer accumulated 2 strikes ending on an apply/prove failure with no valid replacement allocation.ProveUnavailable: Propose-only mode.Baseline(StartSha) == Unavailablemeans there is no baseline (the loop continues without one); when the guard passes, the proposal is not sensitive, andProvereturnsAvailable == false, the run stops here withFixOutcomerecorded asproposed:<proposalId>(no commit, no strike).EngineRequest.ProposeOnlydefaults totrue: a missing argument must never commit, and the first proposal that passes guard and risk ends the run here without callingProveorCommit. The structured proposal id is also carried onRoundRecord.ProposalIdandRunOutcome.ProposalId. A clean ledger with a skipped scanner also stops here without calling the fixer: the round is recordedClean: falsewithFixOutcomeskipped-scanners-need-execution:FLT-410(scanners need execution).CiUnverifiable: Reserved for later increments when remote CI status cannot be verified.CiUnfixable: Reserved for later increments when remote CI fails outside autofix scope.InternalError: An unhandled or unscripted port exception was caught at the top level ofAutofixEngine.Run.
Exit Codes¶
0: Reserved for futurelandcommand (also returned byexplain <dir>on valid report inspection).1:EscalatedwithReason.InternalError, or unimplementedrun/landsubcommands.2:Status.AwaitingNativeReview(converged after two consecutive clean rounds).3:Status.Escalatedwith any domain escalation reason other thanInternalError(includingProveUnavailable).4: Invalid, unknown, or missing CLI arguments.
Not Built Here¶
- Docker prove:
IProvePortis still a scripted/stubbed port. Running real proof in a container is a follow-up ticket. landandpush: thelandsubcommand is not implemented (exit1).- CI: remote CI status and unfixable-CI handling (
CiUnverifiable,CiUnfixable) are reserved reasons only. - Resume: stopping mid-run and resuming from a report is a follow-up ticket.
Live run (increment 2, propose-only)¶
Live run is off by default: without --enable-live-adapters the command exits 4 before touching git, child processes, or the output directory. FLT-405 shipped with open High findings in the live adapters under Andrew's risk acceptance (2026-11-07), tracked in follow-up tickets; enable the flag only on trusted branches.
council-autofix run --repo <worktree> --base <ref> [--author-family <family> ...] [--manual-findings <json>] [--out <dir>]
- Preconditions (each failure → exit
3GateCannotRunwith a report):git status --porcelainis empty; aFileStream/FileShare.Nonerun lock is held oncouncil-autofix-<worktree>.lockundergit rev-parse --git-common-dir. - Default run dir
%LOCALAPPDATA%\council-autofix\<repo-name>\<yyyyMMdd-HHmmss>-<nonce>, never inside the repo. - Authors = the
--author-familyvalues only. The orchestrator must pass every implementing family explicitly (e.g.--author-family Claude --author-family Muse).Co-Authored-By:trailers onbase..HEAD(Claude/Opus/Fable/Clahadore → Claude; Codex/ChatGPT/Cedric/GPT → Codex; Gemini/Jenny → Gemini; Grok/Gronktayvius → Grok; Muse/Susie → Muse; case-insensitive) are recorded as report metadata only and never remove a seat. - Pace order =
UsageGovernor.exe pacepools by largestpointsBehindTodayfirst; on any failure the fixed order Gemini, Grok, Muse, Codex, Claude withpaceSource: fallback. - Prove is Unavailable: nothing from the branch under review is ever built, run or committed.
LiveProvePort.Baseline→Unavailable,Prove→Available: false. Configured scanners are NOT run either (they would execute branch code; needs the FLT-410 sandboxed prover): with scanners configured at base the port reportsSkipped: true(shown asscanners: skipped). A skipped round is recordedClean: falseand never counts toward convergence, so it can never returnAwaitingNativeReview; the run may still reachProveUnavailablewith a written proposal. No scanners configured at base still reportsRan: truewith no findings. - On
ProveUnavailablethe run writesproposal-<id>.json(test/production edits, worker, targeted keys) andproposal-<id>.diff(unified diff rendered from HEAD content, no git). - Report extras:
paceSource,authors(+ source),allocation, per-seat attempt verdicts and run-dir paths,scanners, proposal files. - No bypass or force flag is ever passed to a child process (
--yolo,--dangerously-skip-permissions,--no-verify,--force,-f,--trusted-host); every argv list goes through the banned-flag guard, and all calls use argument lists, never shell strings. - Guard order per edited path: traversal/absolute (
path-traversal:) → denylist (path-denied:) → allowlist (path-not-allowed:). The denylist is checked before and independently of the allowlist, so a finding file on a denied path is still refused. Symlink ancestors (symlink-ancestor:) are only checked for path components that exist on disk: a missing directory cannot be a live symlink (a dangling link still counts viaLinkTarget). Path canonicalization lives inDeniedPaths(worktree-root-aware when available) and is shared by the guard and the risk port: empty /./..segments, trailing dots/spaces,:, 8.3~Nnames, and any segment starting with.gitare rejected (.gitattributescan define filter, textconv and diff drivers, which execute code; same for.gitmodules,.gitignore,.gitconfigand any other.git*name in any position), plus.mailmapsegments, and the denylist also covers scanner configs,package.json,.husky/.githooks,*.cmd/*.bat/*.psm1/*.sh, andstryker*.json. Weakening (weakening-test:) is file-level:[Fact]/[Theory]/Assert.counts on non-comment lines before vs after applying all of the file's edits - any decrease is a violation, and every non-comment HEAD assertion expression (from the firstAssert.to end of line, whitespace-normalized) must still appear in the post-image. Suppression markers and secret shapes are also compared before vs after per file (suppression:/secret:): an increase is a violation even when the marker is split across hunks. Correctness/data findings require a real test edit on atests/**path: a non-comment line whose trimmed text starts with[Factor[Theory(comment lines and string-literal markers do not qualify). Votes bind on the full key (path, lens group, snippet hash); a vote matching more than one key is dropped, a supplied lens must equal the candidate group (an unknown lens drops the vote), and two different choices for one key from the same voter output drop both.
JSON Fixture Format¶
Each fixture file is a single JSON object consumed by council-autofix dry-run --fixture <file.json> --out <dir>:
Top-level fields:
baselineGreen(legacy):truemaps to baselineGreen,falsetoRed.baseline(preferred):"Green","Red", or"Unavailable". Takes precedence overbaselineGreenwhen present.Unavailablemeans propose-only mode: there is no baseline and the loop continues without one.manualFindings: optional array of findings merged into round 1 only. Same shape as seat/scanner findings. Their family defaults toManual(which has no seats and never votes, chairs, or fixes), and their rank ismax(Major, mapped rank). A manual finding with asecuritylens escalates asSensitiveChangelike any other source.- Each
fixAttempts[]entry acceptsavailable(defaulttrue). When the guard passes, the proposal is not sensitive, andProvereturnsAvailable == false, the run stops withProveUnavailableandFixOutcomeproposed:<proposalId>. scanneracceptsskipped(defaultfalse): scanners configured at base but not run in propose-only mode. A skipped round is recordedClean: falseand never counts toward convergence.- Top-level
proposeOnly(defaulttrue): whentrue, the first proposal that passes guard and risk ends the run withProveUnavailablewithout callingProveorCommit. Fixtures and tests that need a commit or aProvecall set it tofalseexplicitly; a missing argument must never commit.
{
"name": "fixture-name",
"authors": ["Claude"],
"paceOrder": ["Gemini", "Muse", "Codex", "Grok"],
"excludedFixers": [],
"startSha": "sha-0",
"baselineGreen": true,
"manualFindings": [],
"rounds": [
{
"round": 1,
"changedFiles": ["src/App.cs"],
"sensitiveDiff": false,
"scanner": { "ran": true, "findings": [] },
"seats": {
"CedricFocus": [
{
"valid": true,
"coverage": ["src/App.cs"],
"findings": [
{
"id": "F1",
"severity": "High",
"lens": "Correctness",
"path": "src/App.cs",
"line": 10,
"snippet": "return null;",
"evidence": "Null dereference downstream",
"suggestedFix": "Return empty collection"
}
]
}
]
},
"votes": {
"GronktayviusGeneral": { "F1": "Reject" }
},
"snippetExistedBefore": { "F1": true },
"fixAttempts": [
{
"id": "fix-1",
"applies": true,
"guardOk": true,
"guardViolations": [],
"sensitiveProposal": false,
"redOk": true,
"greenOk": true,
"available": true,
"receipt": "prove-ok",
"newSha": "sha-1"
}
]
}
],
"expected": {
"status": "AwaitingNativeReview",
"reason": null,
"rounds": 2,
"exitCode": 2
}
}
Any port call not scripted in the fixture throws FixtureException, which AutofixEngine.Run maps to Status.Escalated with Reason.InternalError (exit code 1).