Files
loki/docs
CatoandClaude Opus 5 8cd138bd1a feat(feedback): ship fixes automatically, per project, opt in (#656)
An agent's job ends at a pull request, so until somebody merges it the
visitor's report is not fixed. This adds the switch that decides who presses
merge — per project, off by default, in the Feedback section beside the
widget's Pause.

NOT an auto-merge.yml in the customer's repo. That would be a commit in
someone else's repository, would need back-filling into repos FleetCrown
never provisioned (annushka's was made by hand), would need another commit to
turn off, and — the real objection — it merges ANY green pull request,
including one a person opened for something unrelated. FleetCrown already
watches the exact PR its own dispatch produced (the fix ledger), so it merges
that one and nothing else: the setting applies to PRs already open, and
leaves no trace in the repo when it goes back off.

auto_ship is nullable on purpose. NULL = never chosen, and the project shows
an invitation rather than a switch sitting in the off position looking like
somebody's decision. FALSE = chosen off; stop offering. Off is the effective
default either way, which is what keeps client sites safe: FleetCrown cannot
tell a client site from its own — that ledger lives in apps.conf on the box,
not in this database.

Conditions, pure and pinned in scripts/test/feedback-auto-ship.ts:
  - only a PR from FleetCrown's own dispatch;
  - never on an "unverified" ledger — that is the agent's claim, and it is
    the exact shape the org-restriction 403 produces;
  - not a draft, and GitHub must say mergeable (null means it is still
    computing, which is not permission);
  - every check passed, and NO CHECKS AT ALL IS A HOLD. The dogfood site's
    first agent PR had zero checks; absence of red is not evidence of green;
  - one failed deploy pauses the project, so a broken fix cannot have the
    next one land on top of it.

When it holds, the row says what it is waiting for — an operator who turned
the switch on should never have to wonder whether the feature works.


Claude-Session: https://claude.ai/code/session_017FU2m6NxPYYFkEdyufcSrX

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-11 08:35:34 -07:00
..