Commit Graph
4 Commits
Author SHA1 Message Date
CatoandClaude 83316f063a feat(feedback): whoever asks pays — a seat's request is a suggestion, the allowance is retired, routing tells the truth (#1344)
Track 0 of docs/master-plan-2026-10.md: stop the leak and the routing lies,
app only, nothing on the box changes.

Stop the leak
- A request on a shared project from a Builder, a client or a viewer is
  filed as a suggestion in the owner's tenant (source `client` or the new
  `member`), announced like a visitor's note, and waits for the owner's
  tap. Only the owner's own word starts a build on the owner's builder
  (ask-in-loki.ts, implement.ts, pass-holder.ts). Until now a Builder's
  ask built at once on the owner's subscription and a client's built on
  a monthly allowance; both spent one person's engine on another's word.
- The per-site allowance is retired: config/client-allowance.ts, the
  members PATCH, the People-panel picker, the dossier count, the invite
  copy. The `monthly_changes` columns stay in the schema unread (a DROP
  aborts the deploy; dropped by hand later). `on_allowance` is kept and
  read as `previewFirst`: a change built for the person who asked still
  opens as a draft and goes live on their "Make it live".
- The owner pass is the owner's alone; everyone with a seat carries a
  member pass. The 40-builds-a-day cap is keyed by the owner, not the
  project: a guard on one engine, never a price.

Routing honesty
- inject-core requests only what was chosen (a lock, a named builder, a
  stored preference) and lets the decision apply the floor, so a fresh
  account with Fleet Runner connected runs there instead of a 403
  (execution-access.ts requestedDispatchChannel).
- Kickoff writes a path under the cloud builder's root only for accounts
  the cloud serves; for anyone else the path stays empty so the project
  is not locked to a builder they do not have.
- "Hosted runner" is offered, accepted and dispatched only for the one
  account it serves (lib/hosted-runner/serves.ts).

Records: CHANGELOG entry {#seat-suggests}, ROADMAP milestone ticked,
CLAUDE.md and feedback-widget.md say what a seat's ask is now. Tests:
client-seat rewritten, execution-access extended, the pinned shapes in
client-seat-browser, seat-on-site-and-tracking, feedback-trust,
project-capabilities and owner-note-builds updated.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 11:43:36 +02:00
CatoandClaude 3ce95843d3 feat(control): work waits for nobody — an offline computer hands off to the cloud (#1119)
A phone tap ("Fix this" in the widget, "move forward" in chat) on a project
that prefers this computer sat "Queued for this computer" for 106 minutes
beside a cloud builder reading "online · not executing", and the hero told
the operator to restart a desktop app that was simply shut.

Routing
- A project that merely PREFERS this computer (no locus lock, cloneable
  repo) falls through to the cloud builder when this computer is offline at
  dispatch time and the cloud is online: `offlineFallbackChannel` +
  `decideQueuedExecution({ offlineFallback })`. The chat says so
  ("… this computer is offline, so the cloud builder took it. Nothing to
  do.") and the stored preference is untouched. A lock never falls
  through; a cloud preference never falls to a laptop that cannot clone.
- The executor swaps in the cloud clone dir for a rerouted dispatch.

Already stuck
- `POST /api/control/reroute` (lib/reroute-queue.ts) moves unclaimed rows
  waiting for this computer to the cloud — one row or all — on projects
  the same rule allows; an `inject` row becomes a `dispatch` so it lands.
- Control hero: "Waiting for this computer · N queued 106m (loki), which is
  offline. The cloud builder is online and can take it now." with ONE
  button, "Run it in the cloud". The stall query reports `localQueued`.
- Feedback card: "This computer is offline — the cloud builder can take it
  now" with the same button in place of "Open Fleet Runner … then Retry".

Control page, from the widget's own findings
- "N awaiting input" / "N working" now narrow the roster to that bucket,
  with a chip to clear it (on a phone the tap changed nothing on screen).
- The page title is the shell's h1 at every width (md:sr-only), the Find
  project and new-project fields carry labels, and the roster's 10px
  evidence line and sort chips are 12px.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-09 09:32:59 -07:00
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
Mao Nakamoto 66e3ac55dc feat(multitenancy): gate shared cloud execution 2026-06-30 19:07:54 +02:00