mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 04:16:59 +01:00
feat/shared-knowledge-map
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7718294354 |
fix(builder, composer): a silent sealed session no longer holds a runner update; the composer falls back to the cloud runner (#1676)
* fix(builder): a sealed session that has been silent for half an hour no longer holds a runner update The drain restarts the box runner only when no agent is working. A sealed session has no status file the drain can read: its agent lives inside gVisor and the unit's cgroup holds only the `podman run` that relays its terminal, so it counted as working for as long as it was open, and sessions stay open for days. Measured on the box, 2026-11-12 07:56 UTC (Sealed builds run 43178274733, mode=activity): three open sealed sessions, one of them eighteen hours old, relayed 0, 40 and 96 bytes in a minute while the drain logged "3 agent(s) working — deferring restart" on every look. The runner stayed two releases behind for hours, so the runner fixes merged that morning were not running, and the commands route held new work for the restart. - agent_is_busy: a sealed session that has relayed under 512 bytes a look for 30 minutes is not working. Shorter than that, or a quiet that cannot be told, still is: unknown is not idle. - quiet_for reads the relay's cumulative byte counters and keeps its note under /run/loki-drain/<unit>, outside the drain's own process: every deploy starts a new drain, and a clock that restarted with it would never reach thirty minutes on a box that deploys several times an hour. - The rule is the sealed session's alone. An unsealed agent that is not Claude still always holds the restart: its output was not measured. What it can cost: a sealed agent stopped at a permission prompt in the middle of a task prints nothing, so after thirty minutes of that the restart goes ahead; the session reopens and its open run is closed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmt4p1jMfJnbJtpeNhi * fix(composer): the project composer falls back to the cloud runner when the project's own builder is off The chat reroutes a project pinned to an offline computer to the cloud runner and says so (inject-core). The project composer for an idle project (/api/control/tab-inject) asked for the routing decision without that fallback: a project registered from a laptop queued for the laptop while it was shut, with the laptop's folder as the place to start, and the answer named no builder. The row sat until the reaper closed it an hour later. - tab-inject passes the project's offline fallback, starts a rerouted dispatch in the folder the cloud runner clones into, and answers with the builder that took it and the reroute sentence. - execution-access test pins the three. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmt4p1jMfJnbJtpeNhi --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
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>
|
||
|
|
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>
|
||
|
|
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> |
||
|
|
66e3ac55dc | feat(multitenancy): gate shared cloud execution |