Commit Graph
121 Commits
Author SHA1 Message Date
aiongg 3ac7dc840c Classified items: a row without a label counts as no verdict on both paths instead of a non-null assertion, dirty marks go in one kx.tupleIn delete and settled rows in one INSERT ... SELECT, no handle alias or limit on the run-key lookup; settledOnExpr checked against settledOn 2026-11-21 21:26:05 +00:00
aiongg 754ebffc5a Convert classify/settled.ts to the typed query builder: verdict runs, per-item and per-run lookups, the item_settled refresh; settledOnExpr twin of settledOn 2026-11-21 21:05:49 +00:00
aiongg c5325d030e Typed twins of shared SQL-text fragments (pilot scope, duplicate and backlog holds, settlers, answer locks, prepare state, snooze, fast-track score, contributor stats, classification verdicts, quiet PRs), each checked against its text version on both databases; kx.jsonObject 2026-11-21 20:34:57 +00:00
aiongg 465c5e84c0 Merge pg-e3: decisions, conversations and top-level files portable to both dialects
# Conflicts:
#	src/classify/settled.ts
2026-11-21 19:39:24 +00:00
aiongg 17d666ebde Merge pg-e5: planner and runner SQL portable to both dialects
# Conflicts:
#	src/classify/settled.ts
#	src/schema.pg.sql
2026-11-21 19:39:09 +00:00
aiongg de266e97cd item_settled is a real table per classification run: triggers on classifications mark changed items, settledTable builds a run once and then works out only the marked items under one write, before the caller's read; the per-connection temp tables are gone 2026-11-21 19:15:50 +00:00
aiongg 4ddcc4a408 Postgres: classify verdicts replace by delete and insert (new rowid), access, outside, whitelist and author ids portable, sync runs and proposals return their ids, tests insert with RETURNING and explicit upserts 2026-11-21 18:58:23 +00:00
aiongg 107243e7a2 Postgres: planner facts, flow counts, plan reads, rank and runner queries portable; ref pairs read as JSON values; INDEXED BY, OR REPLACE, lastInsertRowid and untyped NULL tests rewritten 2026-11-21 18:58:19 +00:00
aiongg 1880e9f4b3 Settled verdicts: the run and rowid stamp lives in temp.item_settled_seen so a rolled-back read takes it back with the table; item list parameters are checked before the table is filled 2026-11-21 17:53:58 +00:00
aiongg 0d85cd64bd Async interleaving on one connection: temp-table fill and use in one read snapshot (item_settled, flow_pick); copy-on-write remote queue cache; overlap guards on interval passes (exclusive); GitHub read identity held in memory and refreshed on the settings counter, shared read handle opened once; owner reloads keep the latest load; held claims are not answered empty while a try may be leasing; codemod keeps the item-tools snapshot and the read handle local 2026-11-21 17:28:37 +00:00
aiongg 4c383b2d1a Hand-convert the transaction residue, initializers, accessors and type predicates; settings snapshot per async context; connect()'s migrations keep synchronous helpers 2026-11-21 17:09:04 +00:00
aiongg 20061c88d9 Apply async codemod: node scripts/codemod-async.ts over the program 2026-11-21 17:00:38 +00:00
aiongg 4284e43078 Merge main: the planner pass byte cuts on top of the change log; the loaders' new item reads filter refs by (repo, number) pairs 2026-11-21 12:56:58 +00:00
aiongg b6895fa2bf Pass reads: settled verdicts without unused text, stale-review rows once per change, pre-merge rows at review heads, stacked-PR heads that are a base 2026-11-21 09:03:25 +00:00
aiongg 2ee5924784 Fact loaders filter refs by (repo, number) pairs, so a load of a few refs uses the item keys; loadPlanSet takes refs 2026-11-21 07:54:44 +00:00
aiongg 98c6e50fb9 Merge main into planner-sets
Main CI texts take main's set-based autocraftTexts; main-fix approvals read through the pass-scoped settings reads (settings() for many keys). blockersLoader reads through blockerReads, the batch read blocksIndex uses. limits.ts imports the pipeline switch keys from autopilot.ts.
2026-11-21 06:51:08 +00:00
aiongg abd6ac41b0 Merge Jev through Cloudflare Workers AI as an optional backend 2026-11-21 06:31:36 +00:00
aiongg b35d9240cd Dashboard reads lists in sets: settled table in one insert, Now feed, health, home and decision inbox read each table once per response 2026-11-21 06:20:10 +00:00
aiongg 1131d6fdfb PR facts: read push outcomes, verifications, decisions and classifications once per load 2026-11-21 06:16:02 +00:00
aiongg 076c886144 Call Jev through Cloudflare Workers AI when configured 2026-11-21 05:01:28 +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 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 75ced6211b Dupes: pairs of a repo no Task Runner takes are not sent to Jev and pairs of skipped Haiku batches do not count as handled; batches split by repo only in the user-local mode 2026-11-20 07:06:27 +00:00
aiongg 841beeb712 Merge pool-skip: one taker rule (takers.ts) for pools, job starts, the sweep, the health check and the planner's taker signature; a withdrawn call's pool unit counts as skipped 2026-11-20 06:45:46 +00:00
aiongg 9c0d110bc8 Skipped pool units: not counted as sent, not stored by prioritize, Haiku usage rows kept per batch; collect pools start units without a taker; the planner's input and fingerprints carry which Task Runners could take calls 2026-11-20 06:43:35 +00:00
aiongg 44dbcafaa1 Queued model calls with no taker for 10 minutes are withdrawn and their pool unit skipped without a failure; remote-no-taker health check goes by pipeline-on repo 2026-11-20 06:40:22 +00:00
aiongg d4785ca21e Model call batches hold one repo's items: classify, prioritize (tiered steps), referee and duplicate-pair batches 2026-11-20 06:33:05 +00:00
aiongg 546419749d Pools start the first unit whose repos have room and never start a unit no Task Runner may take, ending without such units; the runner leaves a job queued while no Task Runner may take its repo 2026-11-20 06:31:39 +00:00
aiongg 144e500d36 Repo-aware model queue room: only Task Runners that may take a call on the next call's repos count, and only queued calls they may take come first; pools pass the next unit's repos, the runner the job's repo; remote-no-taker health check 2026-11-20 05:26:24 +00:00
aiongg c77b23a302 Rename the server admin CLI to autocraft-server; document the MCP Connector, Task Runner login, long-polling claims, model call queue and Manual only 2026-11-20 02:17:48 +00:00
aiongg 2f940fd344 A fix turn gets 3 turns, so a tool call the model makes despite the instruction is denied and answered instead of ending the turn 2026-11-19 22:31:52 +00:00
aiongg f0fa4f4c63 review.opus and cifix.patch allow 40 turns; a run that uses them all fails as a turn limit, by name 2026-11-19 22:17:14 +00:00
aiongg 8ade9b2a41 Reviews, pre-merge and post-merge reviews, duplicate comparisons and prepared decisions name the model that ran; full ids show as Claude or Codex Astra names 2026-11-19 19:02:01 +00:00
aiongg 0d3a6ee7f8 Marker characters are removed from data and follow-up messages in remote prompts 2026-11-19 18:37:45 +00:00
aiongg a1f1e02468 Merge branch 'ul-codex' into ul-int 2026-11-19 18:27:07 +00:00
aiongg 7fa065f41e Per-lease tools of remote calls: item, reference and check tools over HTTP and MCP, the tarball and helper routes, and the helper's tool command 2026-11-19 18:07:11 +00:00
aiongg 9b2945dbb3 User-local prompts carry harness wording that the claim fills; reference docs named as tools
A remote call's prompt marks the phrases that name Claude's tools; the bundle and the run's prompt fill them for
the claiming harness, with exactly the server's text for claude. Calls with the reference server get the
reference input flag and a sentence that names reference_search and reference_around instead of /reference.
2026-11-19 18:03:43 +00:00
aiongg 482f498563 Helper follows the merged wire format; the harness's cost reaches the run
The helper keeps a session when the bundle's keepSession says so, submits
usage per model id (explorer included) and the CLI's total cost, and gives a
lease back through the release route when the fault is its own: too old,
wrong platform, missing harness or token, file setup failure, or stopped by
the user. The work loop stops when it can take no call and pauses after a
release. Submit carries costUsd; the server stores it with the call's usage
and records it as the run's cost.
2026-11-19 17:54:45 +00:00
aiongg 19bdcdcbae User-local inference mode, server side: remote calls that maintainers' helpers claim, run and submit
The inference setting (server | user-local) is set with `autocraft inference` or the operator-only
GET|PUT /api/settings/inference, which also holds the accepted model families per tier. In user-local mode
askClaude queues each Claude turn in remote_calls with a task bundle (prompt parts, claude arguments, checkout
and workspace mounts, repo docs inline, per-lease MCP servers) and polls for the result; follow-up turns go to
the helper that holds the session. Helpers claim with an agent token that may run tasks, in the model queue's
order filtered by tier, repo, write permission and author exclusion, and use a per-call lease secret for the
bundle, heartbeat, release and submit routes. Lost leases return to the queue up to the prompt's attempts.
Queue time does not count toward a job's deadline or no-progress stop, and accounts are not consulted.
2026-11-19 17:51:55 +00:00
aiongg a5be498300 Code replies are parsed as written and refused when they hold a fixed-shape credential; the scrub keeps URLs, paths, quotes and backticks and hides named values only when they look generated 2026-11-15 00:02:05 +00:00
aiongg ee966e7afa Code-carrying model replies reach their parsers with only the known credential shapes hidden; stored copies and every posted GitHub text get the whole scrub 2026-11-14 23:52:35 +00:00
aiongg a1a52e0453 Merge branch 'sec3-patch-guards' 2026-11-14 23:31:13 +00:00
aiongg 0729847458 Model patches and replies are judged on what really lands
- The CI-fix guard applies the patch with git and judges git's own diff and the files before and after it, so a hunk header that names other lines cannot hide a change to test code. Attributes that switch off a lint or a test, and cfg! calls, are read from the patched file's Rust tokens, however they are split over lines or commented.
- Conflict resolutions: a Rust answer is read as tokens; a line on neither side may add no item word, attribute, unsafe code or item macro, and the answer may hold no more of them than its two sides in their own files, so uncommenting a side's code counts as new. Manifest answers keep each line in the table and under the keys it had in its side, and each side's lines in order. A file whose head or base has marker-shaped lines is refused.
- One trust-path rule (build scripts of either parent, CI and tool configuration, agent-instruction files) is shared by every model-patch lane, conflict resolution included.
- Every lane reply parser reads through the strict single-value reader; a fenced reply with a second answer (a value with the same keys) outside the fence is void.
- When the first reply is used after its fix turn is skipped, fails or cannot be merged, it gets every lint check, the model checks the first lint put off included. A fenced first reply can take the fix turn's fields.
2026-11-14 23:30:36 +00:00
aiongg 5a3b165c1d Merge branch 'sec3-runner'
# Conflicts:
#	docs/operations.md
2026-11-14 23:27:17 +00:00
aiongg f5bdb64c5e Runner hardening: per-repository installation tokens, a github.com-only credential helper, an allow-listed jev environment, pinned git attribute source and explicit repositories, absolute deny rules, a wider output scrub, and a deploy of the pushed commit
- Installation tokens for a write are minted for the write's repository (a transfer's also for its target); reads across repos and pushes to a contributor's fork keep the installation-wide token. Reading the app's keys checks the secrets file's mode like every other reader.
- The app's git credential helper is set for https://github.com only, after every configured helper is dropped.
- jev children get only the search path, home, locale, temp, cache, TLS and proxy variables and Jev's own.
- Git on the cached clones names the repository with GIT_DIR, runs with safe.bareRepository=explicit and reads attributes from the empty tree.
- The sandbox denies /proc and the credential directory in the absolute (//path) form as well.
- The scrub hides hex keys that are not digests, URL user:password, three-part dotted tokens and credentials inside hex or base64.
- The dashboard unit sees the settings file, releases, the bare repo and .local read-only.
- post-receive resolves the pushed commit once and the hook deploys that commit; the image build runs pnpm installs without install scripts.
2026-11-14 23:23:21 +00:00
aiongg 31b7fbba75 Dashboard readers get only what they may see of the planner's stored text, and expensive GETs are limited by the matched route
- One reader helper (src/dash/api/reader.ts) cuts queue rows, plan reasons, waits and status lines per reader: viewers get no review reason, verification text, plan note or refusal text and the reasons without their quoted part; a quiet pull request gives viewers none of it; nobody reads an item of a repo hidden from them ("another item, which blocks its review").
- The merge queue endpoints and their member lookups filter with the requester's allow-list, so batches and queued PRs of untracked repos are left out for everyone but operators.
- Decision facts name no PR of a hidden repo; the item API leaves out owner statements of hidden repos and gives viewers no excerpt or reason.
- The Needs feed blanks feedback about a quiet pull request for viewers; stopped fix reasons are staff only.
- Agent runs recorded without items are shown to operators only; duplicate comparisons are bound to the items they compare.
- The expensive-GET budget is spent by the matched route, so every spelling of a path counts.
- Limiter maps are capped: expired keys go at most once per window, then the oldest.
- /healthz/checks gives anonymous callers check names and states; signed-in operators and maintainers also get times and counts.
2026-11-14 23:21:57 +00:00
aiongg a9dfea2531 Claude calls get an exact environment and scrubbed output; preapproval, revocation and lease claims are re-checked atomically; held outside items are skipped when proposals apply; the public health probe reads cached state only 2026-11-10 15:10:49 +00:00
aiongg 4c5c2a747e Reply lint fix turn: one tool-less turn that returns only the flagged fields, skipped when every problem is in internal text 2026-11-07 03:56:16 +00:00
aiongg faa08ba595 Pools: unsettled-push gate counts only live recent pushes and is a plain skip at item start, StoppedError ends a job as done, halts are rethrown in every step catch, pool room formula 2026-11-07 03:19:52 +00:00
aiongg 7506afe4e8 Pools: per-pool cap, stop check before each model call, cancelled items leave no failure rows, unsettled-push limit, one PR's items in sequence, exact issue-ref log prefix, reservation ends when the PR audit row exists 2026-11-07 03:15:16 +00:00