3 Commits
Author SHA1 Message Date
GandClaude Opus 5 caa0e41c3b chore: add a formatter (#449)
* 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>
2026-08-31 09:23:30 +00:00
64c057ecbf fix(control): drop the reaper's prose from runs that did not fail (#382)
#379 moved new reaper explanations to payload.note and restyled the old
ones. Checking the live card afterwards, the sentence was still there:

  "Reaped as timeout, but the repo shows work during the run window —
   corrected to partial (see evidence)"

Restyling was the wrong fix. The complaint was never that the text was
red — it is that the text is reaper vocabulary addressed to nobody, on a
run that succeeded. Quieter jargon is still jargon.

payload.error now renders only when run.state is error. That is safe by
construction, not by assumption: every writer of that field sets
state = error alongside it — closeRunUndelivered, and the reaper's
timeout branch — so an error sitting on a non-failed run can only be the
pre-2026-08-26 correction prose. Checked all four payload writers in the
orchestration routes; none of them set an error without the state.

Rows already in the database keep their data. Nothing is migrated or
deleted; the card simply stops reading a field that, for those rows,
holds a sentence written for whoever maintains the janitor. A non-failed
run says what it has to say through `note`, which is human copy from
EXECUTOR_COPY and carries a real evidence link.

The test now asserts the absence of the restyle branch too, so the
half-fix cannot come back as a "tidier" version of itself.

npm run verify green.

Co-authored-by: t <t@t.t>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 12:44:29 +02:00
e751ecfe4f fix(runs): a run that did not fail must not explain itself as an error (#379)
/control showed this on a project card, in the red error box:

  "Reaped as timeout, but the repo shows work during the run window —
   corrected to partial (see evidence)"

The run's outcome was `partial`. That is a success. Two defects in one
line: the reaper wrote non-failure explanations into payload.error, which
the card renders with `ui-error`, and the sentence was written for
whoever maintains the reaper — "reaped", "corrected to partial", and a
"(see evidence)" pointing at nothing the reader can click.

Three call sites did it, not one:

  reap-evidence.ts   timeout corrected UP to partial on repo evidence
  orchestration-runs reaped run whose agent had written a handoff
  orchestration-runs a genuine timeout

Only the third is an error. The first two now write payload.note, and
the copy moves to EXECUTOR_COPY.honesty so both read from one place
instead of two SQL string literals: "This run ran out of time, but its
work reached the repo — so it counts as partial rather than failed."

The evidence was already stored structurally and thrown away by the API,
which is why the sentence had to say "(see evidence)" — nothing carried
the link. payload.evidence now reaches the card and renders as "See the
pull request" / "See the push".

Rows already in the database still hold the old sentences in
payload.error, so fixing the writers alone would have left them looking
like failures forever. The card now styles by `run.state === error` — the
run's own account of whether it failed — rather than by which field
happens to be set. Old rows go quiet without a data migration.

Also extracted src/lib/repo-evidence.ts. The evidence type and its
validator lived in github-evidence.ts, which fetches from GitHub; the
moment control-types imported the TYPE from there, check:desktop started
walking that chain and broke on `next: { revalidate }`, absent from its
DOM lib. Caught by verify, not by review. A shape both a client type and
a server fetcher need belongs below both.

Evidence is validated at the API boundary, not cast: an unknown `kind`
drops the whole block, because the card labels the link BY kind.

Both source-level assertions were checked by reintroducing the defect and
watching them fail.

npm run verify green.

Co-authored-by: t <t@t.t>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 12:29:41 +02:00