* chore: add a formatter, matching the style this repo already writes
singleQuote=false was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.
Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* style: format with prettier (1062 files)
Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* chore: teach git blame to skip the reformat
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(lint): reattach two guards the reformat detached
Both effects were one-liners, so a trailing eslint-disable-line covered the
setState call:
useEffect(() => { setSelected(new Set()); }, [q.length]); // eslint-disable-line ...
prettier expanded the block. The comment stayed on the closing line while the
call moved above it, so the guard protected nothing and the rule its author had
deliberately silenced failed the build.
This is the second shape of the same defect — hirnli had the eslint-disable-NEXT-line
variant. Both come from the same fact: an eslint directive binds to a line
number, so reformatting can silently unbind it, which makes 'mechanical, no
behaviour change' false for any bulk reformat.
* chore(desktop): bump the runner version the reformat requires
desktop-release-drift enforces that anything built into Fleet Runner which
differs from the last released tag must carry a version ahead of that tag —
main read 0.8.15 and fleet-runner-v0.8.15 already shipped.
A whole-repo reformat changes bytes under desktop/, so the gate fires. The
alternative was adding desktop/ to .prettierignore, which would buy a quiet PR
by carving a permanent hole in the formatter's coverage — the precise shape of
silent drift this test was written to catch. Bumping is what the rule asks for
and costs one patch release whose only content is whitespace.
* chore: merge main and re-format
A whole-repo reformat conflicts with any concurrent commit, and a conflicting PR
runs no checks at all while reporting nothing. Conflicts resolved to main,
which is correct because this branch changes formatting and nothing else.
* chore: leave desktop/ out of this reformat
desktop-release-drift is right to refuse this. Everything under desktop/ is
built into Fleet Runner, so changing it means shipping: bump the version AND add
a FLEET_RUNNER_RELEASES entry, whose stated audience is 'person who installed
Fleet Runner and wants to know what changed'. For a whitespace-only build the
honest answer is 'nothing', so that release should not exist — and I should not
write release notes claiming otherwise.
I had bumped to 0.8.16 to get the gate green. That was the wrong direction:
publishing a build to three OS runners to keep a formatting PR quiet. Reverted.
desktop/ is excluded in .prettierignore with the reasoning recorded there, to be
formatted alongside the next real runner change, where the bump and the notes are
true anyway.
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The run-grader reads a handoff against the project's definition_of_done and
downgrades to `partial` when the bar is not evidenced. It sees only what the
agent wrote — so a bar phrased as a property of the FINISHED PRODUCT can never
be met by one turn, no matter how good the work was.
On 2026-08-04 that was 10 of 19 projects ("outcomes are tracked to improve
future recommendations", "money is not a float", one that literally began "Not
explicitly defined"). The fleet closed 26 partial / 10 timeout / 3 success over
seven days and it read like an agent-quality problem. It was a bar problem.
The bars themselves are rewritten in the DB, delegating to each repo's own
`verify`. This is the part that stops them coming back:
- the brief-extraction prompt taught the vague phrasing — its example was
"tsc + lint clean, tests pass, deploys green" with no rule against describing
the product. It now demands one-turn, handoff-checkable actions and names the
three real bars that failed as counter-examples.
- `isCheckableDoneBar` — present is no longer the same as usable. The health
check fails a bar with no runnable action in it and says why, so an
ungradeable bar shows up on the project card instead of silently costing
every run.
- the GoalEditor placeholder and label match the same standard.
Deliberately a keyword heuristic, not an LLM call: it renders on every project
card, and catching "money is not a float" cheaply beats a perfect judgment
nobody can afford to run.
Covered in scripts/test/dod-gate.ts with the five real ungradeable bars and the
four real replacements, plus a case through computeProjectHealth.
Co-authored-by: test <test@test>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The DoD stop-gate supports a turn cap (`goal_max_turns`) that stops re-looping
an unmet goal and escalates. No project has ever set it, and unset meant "loop
until met" — so every goal-mode project looped forever.
That is worse than it sounds. `partial` is not a failing outcome, so an endless
partial streak is invisible to BOTH the failure brake and the escalation ladder.
datacat re-closed `partial` a dozen times against the same gap ("client-side Zod
validation still missing") and nothing ever told a human. An unbounded goal loop
is indistinguishable from a stuck one.
- DEFAULT_GOAL_MAX_TURNS, SSOT'd to the ladder's human rung: a project gets the
same number of tries here as anywhere else before a human is brought in.
Explicit `goal_max_turns=0` remains the opt-in escape hatch for a genuinely
unbounded goal — deliberate, rather than what you get by saying nothing.
- The cap now REPORTS. applyDoDGate deliberately keeps the success outcome so
the continue-loop halts, which means the ledger alone would show a success and
nobody would learn the goal had been abandoned short of its bar. A cap that
only writes itself into `next` is a silent cap; it now raises an alert and a
push naming the remaining gap, exactly like the ladder's human rung.
Co-authored-by: test <test@test>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Realizes the /goal loop pattern for FleetCrown: a project declares what "done"
means and how many tries it gets, and the existing cross-model DoD judge loops
the fleet until the bar holds or the cap is hit — instead of stopping on the
agent's own say-so.
- dod-gate.ts: applyDoDGate gains an optional turn cap. Under the cap it still
downgrades success→partial (loop continues); AT the cap it stops downgrading
so the run keeps success (no gap → the continue-loop halts naturally) and
records the cap in `next` for the captain. Enforced entirely at the gate — no
continue-loop change. +7 pure test cases (12/12).
- getProjectGoalConfig sources definition_of_done + a new goal_max_turns attr
(clamped 1–20, null = loop until met = unchanged behavior).
- gateAndCloseRun uses per-project DoD + cap, counting consecutive prior partial
closes (from the outcomes the handler already fetched) as the turn count.
- POST /api/control/goal sets both attributes; GoalEditor (in the project
dossier Now section) is the UI to set/clear the goal + cap.
tsc + lint + design-system + dod-gate tests all green. On a branch (no deploy).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The /goal pattern. closeRunFromSession closes a run the moment the agent writes
status: ready — the agent grading its own homework (Ralph Wiggum). When a project
declares a definition_of_done (now a first-class profile field, injected into
every dispatch), the close is gated by a DIFFERENT-lineage model:
- dod-gate.ts: verifyDefinitionOfDone(dod, handoff) — gpt-oss-120b (not the
worker's lineage) reads the handoff against the stated bar, returns {met, gap}.
Fail-OPEN (a judge error lets the run close rather than wedge the loop).
- applyDoDGate (pure, unit-tested): a SUCCESS close with an unmet bar is
downgraded to "partial" with the gap written into `next`, so autopilot's
existing continue-loop keeps working instead of stopping. Only gates success;
error/partial are untouched.
- Wired at the control close seam, fire-and-forget + an in-flight guard so the
judge fires at most once per run and never blocks the control response.
This makes "done" an objective, cross-model-verified condition per project —
the lever the loop-engineering literature calls the real one. scripts/test/
dod-gate.ts (7 cases) added to the pre-push suite. tsc=0, eslint=0.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>