Commit Graph
179 Commits
Author SHA1 Message Date
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
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 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
aiongg e4dbe3cc79 Merge #29 with fixes: autorepin via a branch pins to the first commit of that branch that holds the merge, waiting without counting tries (every 15 minutes, at most 7 days); a via branch that does not exist is refused when the command is accepted; a wait clears the try count; the via branch is fetched into its own ref namespace 2026-11-21 00:22:39 +00:00
aiongg ccef9a4900 My tasks items: pools, selections and the room ask about each unit's items, so a filtered runner counts only for units on items it takes and finds room while the other runners are busy with calls only they take; batches hold only items the same filtered users take; fast-tracked by me includes PRs the user queued with a live pre-approved merge; a withdrawn call names the takers' item choice; the docs say a repo without a matching item shows under No taker when every runner is filtered 2026-11-21 00:22:08 +00:00
aiongg 97cf92a877 Autorepin: refuse a missing via branch when the command is accepted, count only consecutive failures across waits, fetch the via branch into its own ref namespace 2026-11-21 00:13:42 +00:00
David MannandClaude Opus 5.5 61fc6a6a36 My tasks items: each user picks whether their Task Runners take every item, fast-tracked items only, or only the items they fast-tracked; a call fits when any of its items does, a question asked before the items are known counts a filtered runner only on repos with such an item, picks and session follow-ups run either way, and the queue says when a call waits for its items
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:20:23 +01:00
aiongg bf7402e6f2 Merge #24 with fixes: My tasks, each user picks which kinds of work their Task Runners take; the task counts in claims, room, takers, the planner, pools, the runner's start pass, the no-taker sweep and health mark and the queue view, so work nobody takes is never started; no task ticked takes only picks; no hint text 2026-11-20 16:00:15 +00:00
aiongg 040873990d My tasks: room and taker questions outside a job use the step of the prompt being asked about; the runner's job starts take the pass's earlier starts off a room read later in the pass; a repo counts as taken only by a runner whose user takes some task; on My settings only the latest save sets or clears the error; calls passed over for their repo do not count as calls ahead 2026-11-20 15:59:57 +00:00
aiongg dbd8b9b4fb My tasks: a user with no task ticked is no room for any call, as with Manual only; All tasks can be unticked; the hint and warning lines are gone; Other covers every step outside the stages and security prompts map to their steps outside a job; Merge queue's description names the pre-merge Opus review; My repos saves run one after another like task saves; the Task Runner wait names the task 2026-11-20 15:52:58 +00:00
David MannandClaude Opus 5.5 c5dff1335e My tasks review fixes: the room, pool takers, job starts and the planner count a runner only for the task of the step asked about (a queued job whose repo has takers but none that takes its task says "No Task Runner takes <task> tasks on <repo>"), a call of a task no ready runner takes is not counted as a call ahead, and task saves on the Connect page run one after another with only the latest setting the boxes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 16:44:33 +01:00
aiongg 4a8cec6087 A pre-approved merge lifts the label gate: Queue items, merge queue comments, queue_pr and fix-up then merge accept a PR whose label gets no review or has not settled, the plan reviews it while the pre-approval is live, and a label settled later does not stop it; drafts, backlog, duplicates and scope questions still refuse it 2026-11-20 15:33:21 +00:00
David MannandClaude Opus 5.5 81e6fe9d50 Autorepin via a branch: @<app> autorepin <pull request> via <branch> pins to the first commit of that branch's first-parent history that holds the merge, waits without counting tries while the merge is only on the default branch (looked for every 15 minutes, failed 7 days after the merge), accepts a merge straight into the branch, and a branch name git would refuse makes the line no command
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 16:25:44 +01:00
David MannandClaude Opus 5.5 2f888b38cc My tasks: each user ticks the kinds of work (pipeline stages that make model calls, and Other) their Task Runners take from the queue, all ticked by default; unticked ones are stored so a later task starts ticked, picks and session follow-ups run either way, and the room, takers, no-taker sweep, give-way rule and the queue's why-waiting count a runner only for the tasks it takes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:56:33 +01:00
aiongg dac03f8afc Merge #22 with fixes: @<app> autorepin <pull request> repins a PR's Cargo git dependencies to another tracked repo's merge commit once it is merged (comment re-read per command kind, lockfile keeps every existing package exactly, quiet PRs silent, off recorded, generic error text, waits registered, 3 h lockfile cap, push re-checks bound app permission, refused where the pipeline is off) 2026-11-20 14:33:38 +00:00
aiongg 4e71f32813 Autorepin: refused or failed with a reason where no build worker would take the lockfile task, drained apart from the webhook pass, waiting state registered as a wait, a crates.io package with a name the old lockfile has must be kept exactly, and a lockfile task no longer wanted is cancelled 2026-11-20 14:33:09 +00:00
aiongg ce1e4db5c0 Autorepin: an edited comment must still name the stored pull request, a lockfile may not change the version or checksum of a package it had, an off is kept per pull request, quiet pull requests get no comment, only reasons worded by AutoCraft reach GitHub, the asker's login must stay bound to their GitHub id with write access read through the app, a lockfile task ends after 3 hours, a recorded push survives a crash, and a nested Cargo.lock is refused 2026-11-20 14:25:36 +00:00
aiongg 07f5a47a1f Merge connect-restore: the Connect page is the contributor's design again (Connect your Agents, Overview and Setup guide views, My settings first, roomier Task Runner rows, smaller switch) 2026-11-20 14:20:35 +00:00
aiongg 9553775fa9 Connect page: Connect your Agents, with Overview and Setup guide views, My settings first with Saving…/Saved, roomier Task Runner rows; a smaller switch across the dashboard 2026-11-20 14:20:17 +00:00
aiongg 97753a0857 Task Runner 1.3.5: in the last 4 minutes of a Claude login the Task Runner runs the user's own claude once, outside the sandbox with the login's config directory or default Keychain item, so Claude Code refreshes the login under its own lock; the Task Runner never refreshes it itself 2026-11-20 14:20:13 +00:00
aiongg b07948bc3e Merge #20 and #21 with fixes: maintainers who settle decisions may use Queue items (permission refreshed through the GitHub App, default weight only, re-checked in batches); @<app> merge queue comments queue items, pinned to the head at comment time 2026-11-20 13:57:45 +00:00
aiongg 1421dc4c5b Comment commands: a PR head without a check suite is unknown and the command is tried again; a failure storing a command never fails the delivery's re-read 2026-11-20 13:57:31 +00:00
aiongg 36c4bcd1d6 Comment commands: app permission read, comment-time head pin, comment re-read, quiet and silent cases
- The commenter's write permission is read through the app installation (appPermission), which writes repo_permissions, so a
  maintainer's pre-approval stays alive under refreshSettlers; an access GitHub cannot read is retried, and a command that
  expires that way is answered once ("could not check your access; comment again").
- The comment's creation time is stored. A PR is pre-approved only at the head it had then: a force push, a later commit date or
  a later first check suite on the head refuses it ("the PR changed after your comment; comment again"), and preapproveMerge
  takes the pinned head. On an issue, the closing PR is queued only when it is older than the comment and unchanged since.
- A comment older than 5 minutes at delivery queues nothing; before acting the comment is read again by id and must exist, have
  the same author and still hold the same command.
- A login never bound, a viewer, and a non-operator on a quiet PR get no answer; nothing is answered on a quiet PR. Unexpected
  errors are answered with a fixed text; only an answer to someone the queue rule lets queue skips the comment approval.
- github_commands gets an index on (state, reply) and the runner prunes settled rows after 30 days; parseCommand skips indented
  code and HTML comments across lines.
2026-11-20 13:54:08 +00:00
David MannandClaude Fable 5.2 8372456a31 Autorepin: commands count in the order of their comments (a late retry never undoes a later off), the merge commit must still be an ancestor of the default branch as fetched now, only dependency tables are repinned, the lockfile is read as TOML, an unreadable Cargo.toml ends the try instead of being skipped, and a scratch folder that cannot be removed does not replace the outcome
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 14:47:45 +01:00
aiongg 73e550584d Merge fix-20 into #21
# Conflicts:
#	docs/pipeline.md
2026-11-20 13:42:31 +00:00
aiongg 00e15b4b1e Fast-track weights stay with operators: a maintainer's Queue items line or queue_pr adds an item not on the list with the default weight, never changes an existing weight and says it ignored a weight it named; the dialog and a maintainer's queue_pr take no weight 2026-11-20 13:40:58 +00:00
aiongg 828c151604 Connect page keeps main's layout; the install line runs autocraft setup, the harness step is for when setup did not pick one, Run offers autocraft work, one call and always on; docs describe setup's defaults, the AppArmor profile and how to remove it 2026-11-20 13:38:26 +00:00
David MannandClaude Fable 5.2 7f02969357 @<app> autorepin <pull request> in a comment on a PR: once that pull request of another tracked repo is merged into its default branch, the PR gets a commit that sets the rev of its Cargo dependencies on that repo to the merge commit, with Cargo.lock updated by cargo in a build task; no model, the push has a lease on the head, and a merge pre-approved at the old head carries on to the repinned one
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 14:24:16 +01:00
David MannandClaude Opus 5.5 a85d1cfa3a A command reads the commenter's role and binding again after the permission read and passes that role to queueAdd, so a login demoted or bound to another account meanwhile queues nothing; the early check stays, so an unknown commenter costs no GitHub call
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:12:33 +01:00
David MannandClaude Opus 5.5 4b96590569 The mirror never goes back to an older snapshot: a read that started before the one stored for an item writes nothing for it (row, comments, read time), so a command's freshness check holds until the pre-approval reads the head, whatever runs in between
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:53:10 +01:00
David MannandClaude Opus 5.5 ffb76a0826 A command checks its items' read times again after the permission read, right before queueAdd with no I/O wait between the check and the pre-approval, so an older snapshot written meanwhile (a reconcile that started before the comment) makes it wait instead of queuing that head
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:47:35 +01:00
David MannandClaude Opus 5.5 10f60b0497 A command counts only a read strictly after the comment (a read stamped at its instant may have started before it), and on an issue it also waits for a fresh read of every open PR that closes it, since queueAdd pre-approves the sole one at its mirrored head
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:43:09 +01:00
David MannandClaude Opus 5.5 7365123cd7 A command with no read of its item since the comment, and none queued, queues a re-read itself (at most once a minute), so a failed re-read or one in the comment's own second does not leave it waiting until it expires
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:40:10 +01:00
David MannandClaude Opus 5.5 b8d66de52a item_reads.synced_at is when the read started, before its first GitHub request (the run's start for paged reads), so a read that began before a comment never passes its freshness check; docs: the weight follows "merge queue" (a weight alone is no command), and the app's answer needs Issues and Pull requests write, which a dashboard-registered app has
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:38:31 +01:00
David MannandClaude Opus 5.5 8f9b4c05bc Commands in comments, after review: a fence closes only as CommonMark closes it; a command waits until the item was read from GitHub after the comment (item_reads), since a gone sync request also follows a failed re-read; rows waiting for a read or a permission retry (tried_at, a minute) no longer fill the drain's limit, which now counts GitHub calls only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:27:03 +01:00
David MannandClaude Opus 5.5 a8ab84a50c Merge queue from GitHub comments: @<app-slug> merge queue [weight] on a PR or issue queues it as a line of Queue items, as the commenter, under the same rule (settleRefusal); the webhook keeps only the comment id, item, weight and commenter in github_commands (never the text), the runner carries it out after the item's re-read with the commenter's write permission read from GitHub, and the app answers in the thread through write.ts; commenters without an AutoCraft login, or with another GitHub id than the bound one, get no answer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:10:42 +01:00
David MannandClaude Opus 5.5 e5c5f1e678 CodeRabbit follow-ups: the AppArmor profile is written to a temporary file and hard-linked into place (never overwrites, never leaves a partial one, removes only its own on a load failure), tested by running the script; macOS's git stub is found through symlinks; Saved belongs only to the latest change and Saving… lasts until every save is done
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 12:43:32 +01:00
David MannandClaude Opus 5.5 5547b2b77f MCP queue_pr for maintainers who answer decisions: a maintainer's answering token is offered queue_pr (not set_weight or cancel_queued) and the call takes the Queue items rule on the repo; the CLI's refusal line says who may approve merges
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 12:41:26 +01:00
David MannandClaude Opus 5.5 2ea70ed92a CodeRabbit on setup and Connect: setup offers curl and bash before Claude's installer, removes an AppArmor profile that does not load, signs in with the claude it found (and the runner's config directory), offers a fresh sign-in for a configured login that gives no token, treats macOS's git stub as missing, logs in to the dashboard it was given when the saved login is another's, and always names the PATH line; Connect: a new write or an edit clears Saved, the switch keeps a 60x40 tap area, the start hint sits outside the row button in a live region, and the mock keeps room to approve a login (extra states behind ?states=1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 12:31:53 +01:00
David MannandClaude Opus 5.5 fcaf996ac3 Connect page without a Task Runner: only the setup steps and the MCP Connector (a login waiting for approval still shows its card)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 12:18:22 +01:00