Commit Graph
641 Commits
Author SHA1 Message Date
aiongg 9e2763b6b4 Merge scan-maintainers: maintainers start and continue deep scans with a spend cap 2026-11-22 15:07:57 +00:00
aiongg 8b8c70df1e Maintainers with write start and continue security scans with a spend cap; uncapped scans stay operator-only 2026-11-22 15:07:41 +00:00
aiongg 48304b9c1f Merge perm-items: maintainers run decisions, items, the merge queue, outside holds and areas on their repos
# Conflicts:
#	docs/dashboard-spec.md
2026-11-22 15:04:38 +00:00
aiongg 0760044d31 Continuing a capped scan is operator-only; maintainers with write may stop it 2026-11-22 15:03:34 +00:00
aiongg 658d43b27a Maintainers with write access run per-repo and per-item actions: snooze, prepare, releases, merge controls, fast track, outside release, areas, conversation includes 2026-11-22 14:58:34 +00:00
aiongg 174c43de92 Maintainers with write access run their repo: approvals, optional checks, security stop/continue and findings, build tasks, nightly, screenshots, job cancel, feedback limit 2026-11-22 14:57:52 +00:00
aiongg b8dddd4623 Maintainers with write access to the repos a push breaker names can resume it 2026-11-22 14:42:12 +00:00
aiongg edbabe0491 Merge ws-session-fix: the workspace MCP server is named work (Claude Code reserves workspace) 2026-11-22 14:34:51 +00:00
aiongg b39e3db90c Workspace session: name the MCP server work, stop a Claude run that lacks its MCP servers
Claude Code reserves the MCP server name `workspace`: it skips a --mcp-config entry so named with a warning and runs
on with no tools. The first workspace session therefore had no workspace tools; the model wrote tool calls as text
until its output ran out, and the call ended as done with no tool calls.

- The workspace session's server is `work` (route /mcp/task/work, tools mcp__work__*).
- Task Runner 1.3.7: the Claude adapter's guard reads the stream-json init event and stops the run when one of the
  call's MCP servers is missing or failed, so the call fails with the reason instead of answering without its tools.
- The workspace system prompt says the tools are the only way to see or change the code, never to write tool calls as
  text, and to stop when the tools are missing.
2026-11-22 14:34:26 +00:00
aiongg 236fa45ac1 Maintainers with write access switch a repo's pipeline 2026-11-22 14:26:58 +00:00
aiongg 136bfbdef2 Workspace try: resume, cleanup and one job per session
- The CLI queues the job as cli-queue: the runner runs it, so a runner restart resumes it (resumeJob still refuses
  command-line runs, whose process belongs to the command).
- The launcher's passes fail a session whose job ended without ending it (deadline, cancel, a stop it does not resume
  from) and end its workspace unless kept.
- A resumed job waits on the session's recorded call, even one that ended meanwhile, instead of queueing a second
  session; the outcome is stored before the diff stat.
- The call may wait 30 min in all in the queue; the pod's time limit covers seeding, that wait and a margin. The launcher
  does not park a workspace whose bound remote call is queued or leased.
- A job claims its session atomically; another job stops without touching the workspace. The CLI records the job id
  only while none is set, and marks the session failed on any queueing error.
2026-11-22 13:49:54 +00:00
aiongg 14ae2ee719 Workspace try: an operator's end-to-end test session in a workspace pod
- Table workspace_sessions (kind, repo, base, item, prompt, environment, keep, time limit, state, outcome, workspace,
  remote call, job), general enough for later implementation sessions; kind 'try' for now.
- `autocraft-server workspace try <repo> <sha> --item N --prompt TEXT [--workspace ID] [--env ID] [--keep]
  [--deadline-sec N]` records the session and queues a workspace-try job with {repo, session}; the prompt stays out of
  job params and logs.
- Step workspace-try (Fix stage, no lane, so the planner never queues it; 160 min): creates or takes the workspace,
  waits for it to be ready (registered as the external wait "Workspace start"), queues the bound call with the fix-issue
  patch prompt's model, effort and tier and only the workspace tools, awaits it, then logs the outcome and cost, tool
  calls and shell time from workspace_calls, and the diff stat against the base commit with new files. The workspace
  is ended unless kept.
- The job's own diff-stat exec is recorded as tool `report` and does not count toward the session's limits.
2026-11-22 13:39:41 +00:00
aiongg 421966c6f2 Merge ws-relay: workspace tool calls relayed from the dashboard to the owning job 2026-11-22 13:26:36 +00:00
aiongg e2dfdd2f74 Workspace relay: review fixes
- The Task Runner does not send a workspace tool call again once the request may have reached the server; autocraft
  tool and autocraft mcp report the cut-off so the model can look with shell_status.
- The listening connection opens in the background with a 5 s connect limit; Db.listen returns a subscription whose
  listening() says whether notifications arrive, and the relay polls at the short interval until they do.
- A call whose bundle lists the workspace server is leased only to the claude harness.
- The job serves only calls queued under its call's live lease.
- Rows left running by an earlier process of the job are taken over when the server opens, before it listens: shell rows
  go back to the session to re-attach, others fail with an unknown outcome.
- A claimed row keeps its arguments cut to the record size; a delivered result keeps its images as type, size and hash.
- A row the session left unsettled gets the result its call returned.
- awaitCall's cleanup steps each run when one before them fails.
- queueWorkspaceCall refuses a workspace another queued or leased call is bound to, unless that call is the parent.
2026-11-22 13:25:50 +00:00
aiongg f3c97f6843 Workspace tools: put keeps modes and writes through links, shell time by the job's clock, image caps, restart and race fixes 2026-11-22 13:21:05 +00:00
aiongg 0ca6b27ef8 Workspace relay: a session's workspace tool calls go from the dashboard to the job that owns the workspace
- workspaces.remote_call_id binds a workspace to the remote call whose session uses it; workspace_calls.run_id records
  the lease run a relayed call came from.
- Dashboard: the workspace server on /mcp/task/workspace and the tool route queues each call as a workspace_calls row
  with its arguments whole and waits for the row's result with keep-alive ticks; a call still queued when the lease ends
  is refused. Workspace tool bodies may be up to 12 MiB.
- Job: awaitCall serves the workspace bound to its call, runs claimed rows side by side on the job's WorkspaceSession
  (which settles each row), hands rows still running after a restart back to the session, and refuses queued rows when
  the call ends.
- Wake: Db.notify and Db.listen, Postgres NOTIFY on one listening connection per handle that reconnects; the relay polls
  every 10 s behind it, and at the model queue's interval on SQLite.
- Tool replies carry image content after the text: protocol 5 (3 and 4 still accepted); Task Runner 1.3.6 falls back
  through 4 and 3 and prints a line for images in autocraft tool.
- queueWorkspaceCall queues a session call with the workspace server and binds the workspace in one transaction.
2026-11-22 13:12:46 +00:00
aiongg 604307d4f9 Build pods read the CI runners' compile cache (sccache, read-only)
Offline steps that mount the build dirs run rustc through sccache against the
read-only WebDAV endpoint set with --sccache-url, when the repo has a CI gate.
sccache keys a compile on the compiler, its own release, the arguments, every
CARGO_* variable and the working directory, so a cached step matches the gate's
job: the CI checkout path with its default target dir, CARGO_HOME, the gate's
job env (CARGO_TERM_COLOR given to rustc only), dev-strip, and the store
sccache/<cache-version>. The pod carries craft.build/cache=read; the step ends
with sccache --show-stats. The rust-stable image pins Rust 1.100.0 and installs
the checksum-verified sccache 0.18.0 release.
2026-11-22 07:09:33 +00:00
aiongg f1cafc8841 Live board worker view: a user can keep their Task Runners private (My settings, audited), whose calls then show on one Private Task Runner row without login, label, slots or models; shared runners show their slots and models; no hostname is sent, a label that is the hostname shows as Task Runner; call items are read in one statement 2026-11-22 03:33:29 +00:00
aiongg 4453233568 Merge #41: Live board by worker 2026-11-22 03:23:25 +00:00
aiongg 4f6a589743 Merge #28 with fix-ups: simpler decision and item browsing; no hint text, theme tokens and 4.5:1 text, main's shell and the phone AutoCraft/GitHub switch kept, plain docs, the PR's tests cut to the four that guard behaviour 2026-11-22 02:16:18 +00:00
aiongg 30ee23143c The README and UI design describe the dashboard browsers as they behave, the queue comments read plainly, and the match count stays on screen while the previous rows show 2026-11-22 02:09:44 +00:00
aiongg ce5898acd7 Merge #28: Simplify AutoCraft's decision and item browsing
# Conflicts:
#	src/dash/api/item-timeline.ts
2026-11-22 02:04:16 +00:00
aiongg 4bfd0d8d2e GitHub App manifest: no commit statuses permission, because no code reads commit statuses 2026-11-22 02:03:43 +00:00
David Mann f450749cca Merge remote-tracking branch 'origin/main' into live-board-accounts
# Conflicts:
#	src/dash/api/live.ts
2026-11-22 02:58:27 +01:00
David MannandClaude Opus 5.5 9a570710cb Live board by worker instead of token cards: staff switch the board to one row per Task Runner (with its owner's own tokens), box account (operators only) and Jev, each with the model calls it ran in the last hour on the time axis, coloured by step and marked with their item
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:52:19 +01:00
aiongg 2ef370617c A pre-approved merge goes on through an unsure review and through a take-fix review, whose fixes the pipeline's fix-up makes and whose push is reviewed again; rows asked only for such a review resume and their open Merge? question is withdrawn 2026-11-22 01:33:54 +00:00
David MannandClaude Opus 5.5 03d26593a6 Live board: who provides the tokens. One card per enabled account (and Jev when it ran) with calls running against its limit, 5-hour use, a paused badge and the last hour's calls and tokens with its share; operators press a card to pick out that account's model calls on the lanes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:27:17 +01:00
aiongg 1f5994aa92 Remove the SQL-text fragments that no query uses any more, with their equivalence cases: the decisions inbox filters, the settler conditions, the card lock and held-open conditions, the snooze condition, and the hidden-repo filters of runs and traces 2026-11-22 00:55:04 +00:00
aiongg 8794761830 Merge main: restart without draining, resumable jobs and once-per-job creating writes; the runner tests read audit details as JSON in the test, so they run on Postgres too 2026-11-21 21:38:38 +00:00
aiongg 26c55ccd10 Resumed jobs withdraw only the earlier run's queued calls that were asked again with other input; leased ones run on for a later adoption. A push is recorded once per action, repo, pull request and commit 2026-11-21 20:32:08 +00:00
aiongg f00536c891 Docs: how a stopping job treats its writes, which jobs resume, and what a resumed run adopts and counts 2026-11-21 20:26:41 +00:00
aiongg fbe913b656 A stopping job lets its GitHub writes in flight finish and be recorded before it exits
The runner sends SIGTERM to the job process alone. The job refuses new writes (WritesStoppedError, so a
resumed run makes them), waits up to 7 s for the writes it has begun (tracked from begin() to finish()
in write.ts), saves its usage, then stops the rest of its process group and exits 143. SIGKILL to the
group still follows 10 s after the SIGTERM.
2026-11-21 20:02:33 +00:00
aiongg 35bf6ad5f4 A resumed job's unadopted remote calls do not count as waiting for a helper, so they do not hold off its deadline
jobRemoteQueue counts only queued calls whose caller polled within CALLER_STALE_MS.
2026-11-21 19:59:24 +00:00
aiongg b80062edaf Docs: restarts need no drain; interrupted jobs resume, adopt their remote calls and do not repeat their GitHub writes 2026-11-21 19:53:23 +00:00
skylartaylor 1358f83059 fix(ui): reconcile adversarial review findings 2026-11-21 20:51:14 +01:00
skylartaylor d696b6ced3 fix(ui): reconcile native queues and scoped history presentation 2026-11-21 20:51:14 +01:00
skylartaylor 9df9614f74 Fix decision bookmarks and item browsing regressions 2026-11-21 20:50:34 +01:00
skylartaylor 9cb7971bf4 Simplify AutoCraft's decision and item browsing 2026-11-21 20:50:34 +01:00
aiongg 7e1123ce8a Merge C1: AUTOCRAFT_DB_URL reaches every process, AUTOCRAFT_DATA_DIR, db.attempt
# Conflicts:
#	src/github/read.ts
2026-11-21 18:26:51 +00:00
aiongg f82b0e1553 Live topics and the plan change log on Postgres: one plpgsql function per table and operation evaluates every topic and change-log trigger (src/db/pg-triggers.ts); counters (change_seq, plan_full) move once per transaction at commit through a deferred constraint trigger that locks touched rows in sorted order; the change log is consumed by key on both dialects (a pass deletes exactly the seqs it read, late commits are read next pass) and plan_full is a full-pass generation; bulk marker on Postgres is the transaction-local ac.bulk; connectDb migrates a Postgres database at open (schema and triggers in one transaction under the migration lock, skipped when the stored stamp is current); parity, out-of-order commit, counter and plan-coverage tests 2026-11-21 18:15:40 +00:00
aiongg 776d59c758 Run every process on AUTOCRAFT_DB_URL: the dashboard, runner, worker threads and job processes open dbTarget() (job processes get dbEnv(), only the variable that names the database); the GitHub identity read uses the process handle in read transactions on Postgres; AUTOCRAFT_DATA_DIR (default: the SQLite file's directory; the image sets /data) holds reference documents, artifacts and the item snapshot; lock files are named by dbLockName(); the item snapshot, backup.sh, the predeploy snapshot and the periodic loops say that Postgres has no SQLite snapshot instead of succeeding; db.attempt(fn) runs fn under a savepoint on Postgres so a caught statement error leaves the write usable 2026-11-21 18:08:33 +00:00
aiongg 586424f021 Build pods: bounded disk use, claim-by-one starts, lost nodes, create retries
A disk container (AutoCraft image) first in every step pod fails the task when its volume
holds more than the environment's storage, which local-path does not enforce; a per-step
time cap (maxStepSec) and sized /src emptyDirs bound the rest, as docs/operations.md
explains. Tasks are claimed one at a time and every claim that cannot start goes back to
the queue. A pod stuck in deletion or on a node that stopped reporting, or running past a
deadline Kubernetes should have enforced, loses its task; a failed create of a later
stage's pod is retried with backoff before the task is lost. The launcher owns its tasks
(reapLost skips them) and keeps them alive even while the API is down; each container's
output is logged once; the pending health text stays stable; kubernetes environments
have no usable env key; the namespace cannot change while tasks run; pods select the
configured architecture; a source pod killed before it reports loses the task; a step's
own exit 124 before its limit is an ordinary failure.
2026-11-21 16:26:56 +00:00
aiongg 930e7e3415 Build pods: dashboard kind label and pod details, rust-stable toolchain Containerfile, operations docs, AUTOCRAFT_IMAGE in the example manifest 2026-11-21 16:13:04 +00:00
aiongg d968d9e53f Change log: blocker lookups through review_blockers and covering pair indexes keep per-row trigger cost near zero; bulk writes take one full mark; triggers survive malformed rows, lost marker rows and column drops; trigger rebuild in one transaction; shadow differences plan from the full load; pass durations; plan-log status and drop 2026-11-21 14:57:11 +00:00
aiongg 076c886144 Call Jev through Cloudflare Workers AI when configured 2026-11-21 05:01:28 +00:00
aiongg 1d1dd58527 Held follow-ups: wake the planner for rows left in filing; paced runs fail with the pacing message
The act lane pushes updated_at + HELD_STUCK_MS of each filing row into the planner's wake times, registered as the Act stage's 'Stopped held follow-up create' backoff. A run whose held create the write pacing held back fails with an error that starts with the pacing message, so the failure backoff skips it like other paced jobs.
2026-11-21 04:24:50 +00:00
aiongg 0cf7188de4 Held follow-ups: file when merged unless the path ended before the merge; settle stopped creates
A merged PR files its held issue unless the bound merge path ended before the merge time, so a pre-approval the merge itself cancels no longer drops it. Rows are bound to the press's own path: the pre-approval it created (runPipelineStep returns its id) or the decision's answer history count, so a new answer or pre-approval never revives one. createIssue treats an unsent request (failed app-token mint) as a clear failure and marks a write held back by pacing; pacing counts no try. A row left in filing is settled from its audit row. held_followups moves to its own topic outside the planner input, so row writes keep the failure backoff.
2026-11-21 04:23:03 +00:00
aiongg 8733915236 Hold follow-up issues on merge cards until the PR merges
A card that answers Merge, or whose fix-up merges, stores its open_issue step in held_followups instead of opening it. The Act job of the PR's repo opens it once the PR merged (same act-open-issue write and audit, counted against Act's daily limit then), and drops it when the PR closes unmerged or the merge path ends. A filing row is written before the create, so a restart never opens two. Card lines and the choices card read "After the merge: open an issue in <repo>: ..."; the item page shows the held issue and why it was dropped.
2026-11-21 04:14:30 +00:00
aiongg 9c4ce07694 Merge #27 with fixes: My tasks items, a user's Task Runners take only fast-tracked items or only the items they fast-tracked (or have queued); pools, room and limited selections see each unit's items, so a filtered runner is never handed work it refuses; batches hold only items the same filtered users take; room answers cache per repo and item key, as before when nobody filters; duplicate sets larger than one call name no items; the withdrawal reason names the takers' choice 2026-11-21 00:31:59 +00:00
aiongg e3d3f2f353 My tasks items: room answers are cached by repo and by which filtered users take a unit; one-repo jobs cut their selection in taker order; a duplicate set compared in rounds counts only runners that take every item; a selection puts first only units a ready filtered taker takes, and batches key on ready filtered users 2026-11-21 00:29:49 +00:00