aiongg
f2c76aa9e5
Feature code's Db has no query methods; effects inside a transaction or wave throw in tests; reads of bytes in a wave must be alone; idle transactions end after 10 s
2026-11-25 14:25:01 +00:00
aiongg
ee05b0800f
Conversation cards send their command and refusal; the approver's hand-over merges again; operators' write permission is kept fresh like maintainers'; dead prompt text and stale imports are gone
2026-11-25 14:13:08 +00:00
aiongg
3a8191df14
Merge r1: data-layer phase 3
2026-11-25 14:07:37 +00:00
aiongg
14a5b8c4c3
Merge r1b: data-layer phase 3
2026-11-25 14:07:11 +00:00
aiongg
1148e50df6
Merge g2: data-layer phase 3
2026-11-25 14:06:51 +00:00
aiongg
404ba282e4
Retired decision paths leave the planner, the runner, the MCP tools and their tests
2026-11-25 13:12:39 +00:00
aiongg
4721879dab
Upgrade test: a Postgres database of an earlier schema generation comes to the current schema and switches once
2026-11-25 13:12:04 +00:00
aiongg
a1d007bd1b
The local call path's idle watchdog and process-group tracking, the retired inference-mode calls in tests and scripts, and the account docs are removed
2026-11-25 13:06:56 +00:00
aiongg
ff9583e3d7
Generated Postgres schema; the Act stage's registry text; retired decision files carry no closing answer
2026-11-25 13:05:49 +00:00
aiongg
1e6883f835
Conversation, queue and held follow-up tests cover command, comment and label cards
2026-11-25 12:32:08 +00:00
aiongg
d00af87eca
Phase 2 seams: feature code calls the modules that replaced removed files and exports
...
- Callers of the removed quiet, pilot, push-outcome, live, area-store, settled and plan-read helpers call the security, workflow,
control, triage, merge and views modules and db.seqs(); the pipeline page reads the runner heartbeat from lane_state.
- Planner item facts load triage, implement, workflow and control state through the modules; an implement answer round after the
open question or stuck blocker counts as the answer.
- The review module's stored recommendation type matches what the review writes (merge, close).
- Retired decision, duplicate-answer, flow, needs and flip code compiles against the modules; its decision execution hooks are
inert, since no decision reaches it.
- Server files the web build reaches have no unused locals; tests of surviving behaviour call the modules.
2026-11-25 07:51:53 +00:00
aiongg
2af164445b
Change log and live topics: trigger sources registered per module, trigger generators in src/db, planner reads through the planner module
...
Live topic sources are registered by each data module (src/data/<module>/triggers.ts, loaded by src/trigger-sources.ts), so src/db names no module's table. src/live.ts moves to src/db/live.ts; the change-log trigger generator moves to src/db/plan-triggers.ts and src/core/plan-changes.ts keeps only calls into the planner module. Topics and plan inputs of retired tables are gone; the classification run and classify failures are classify_state rows, per-repo step approvals, review state and merge state are plan inputs. Postgres notifies the settings channel when a page setting commits. Db.seqs replaces readSeqs. held_followups gains workflow_id and approved_at.
2026-11-25 07:09:09 +00:00
aiongg
e9580bb683
Data layer scaffold: kx JSON row helpers, one key-source type, external module, boundary test in warn mode
2026-11-25 05:25:36 +00:00
aiongg
2dac4bc6fc
The throwaway test Postgres allows 300 connections, enough for the whole suite running one file per CPU
2026-11-25 02:33:04 +00:00
aiongg
ff811ce73f
Migration review fixes: the review_blockers rebuild locks opus_reviews in SHARE mode and ignores conflicts; a schema generation stored with the stamp keeps older versions from migrating a newer database back; the pg-schema generator refuses column type changes, drops and renames that the scoped views would block; copy targets with no other sessions build indexes plainly; the counters test names the new-PR full cause from the planner inputs
2026-11-25 01:46:06 +00:00
aiongg
ca08603f92
Dashboard pages on Postgres: a GET shares identical reads, and the slow routes batch or parallelize their reads
...
- Db.shareReads: within one read-only request, a Kysely SELECT with the same text and parameters is read once and handed out as copies; any write forgets them. The server runs every API GET in it.
- Stuck items: one title query instead of one per item; liveness reads together.
- Build tasks: batch PRs and item kinds read in one query each; artifacts, batches and the confidential check together.
- Repo settings list: each repo's parts read together, four repos at a time; label plan and seen checks read their inputs together.
- Decisions: toDecision starts its reads together; one decision and the item's decision read their rows through decisionPage; the list reads its counts alongside the page.
- Needs: feedback, counts and stopped rows together; feedback items in one query.
- Item page: a first load reads the stamp alongside the page, parts start as their inputs arrive; trace context, header and fingerprint read in one wave each; itemCore reuses its files and checks reads.
- Settle memo: concurrent callers wait for one roles read.
- scripts/page-bench.ts: route timings and round trips on a seeded Postgres through the latency proxy.
2026-11-23 04:32:36 +00:00
aiongg
034af865d2
Raw-SQL guard: catches the sql tag with nested type arguments, an import that renames the tag, and CompiledQuery.raw, and exempts sqlite_master only in statements that select from it
2026-11-22 01:02:37 +00:00
aiongg
88d1a88bd0
Raw SQL guard: exec counts as SQL only when its literal starts with a statement keyword; the batch stage passes the gh command name as a plain literal again
2026-11-21 22:18:20 +00:00
aiongg
a440a9c200
kx.cols: a table's whole row as a typed select list, from the column lists the schema generator writes into src/db/types.ts
2026-11-21 21:22:23 +00:00
aiongg
f1e654b078
Typed Expression twins of the shared SQL-text fragments (hidden-repo filters, quiet PRs, public status, run columns, phase, current head, picks, manual only, tracked repos, open groups, command work, unsure review), checked against their text versions on SQLite and Postgres; pnpm test:pg runs the kx and portable tests by default
2026-11-21 20:34:26 +00:00
aiongg
06f5e97c3b
Guard test: raw SQL in src/ only in the database layer, the migrations, code on other SQLite files, and the files listed as not yet converted (scripts/raw-sql.ts writes the list; it may only shrink)
2026-11-21 20:11:06 +00:00
aiongg
55f823c4fa
Typed schema for Kysely: scripts/gen-db-types.ts writes src/db/types.ts from a freshly migrated SQLite database (checked by pnpm check); DB is the typed interface; main./temp. table names in Kysely queries are rewritten on Postgres as raw statements are
2026-11-21 20:09:11 +00:00
aiongg
53a7609f05
Merge G1: db copy and db verify in both directions with per-table digests; the copy migrates its target with migratePg
2026-11-21 18:34:44 +00:00
aiongg
423179c984
Merge E0: portable SQL helpers, the suite on Postgres (test:pg:suite), sqliteOnly skips
2026-11-21 18:32:16 +00:00
aiongg
a577c2fc1d
pg suite reporter: take a suite's hook error and a crashed file's stderr error as the first error; void the redirect's cleanup promise
2026-11-21 18:31:34 +00:00
aiongg
14e447642b
Item snapshot: build it from the Postgres app database through the Db handle (keyset-paged reads in one snapshot, one transaction into the local SQLite file); refreshSnapshot and the item-tools snapshot command work on either engine
2026-11-21 18:28:43 +00:00
aiongg
cdad9b309a
Portable SQL helpers (src/db/portable.ts) with tests on both dialects; pnpm test:pg:suite runs the SQLite suite on a throwaway Postgres: a test preload redirects connectDb on SQLite paths to per-path databases copied from a migrated template, dropped at exit, a reporter prints totals and failures per file; sqliteOnly skips for tests that need SQLite itself
2026-11-21 18:28:03 +00:00
aiongg
d465403621
db copy: autocraft-server db copy|verify copies a whole database between SQLite and Postgres in either direction (schema without triggers, keyset-paged batched copy keeping rowid and identity values, sequences set from the source's counters, triggers installed after the rows through installPgTriggers, search index and review_blockers rebuilt on SQLite) and compares two databases by row counts and SHA-256 digests of canonical rows read through each side's Db; plain-text agent_run_texts are gzipped into bytea and compared unpacked; --replace, --skip-extra for retired tables and columns SQLite kept; pg-test.sh tmpfs size option
2026-11-21 18:13:15 +00:00
aiongg
6d32ef9d17
Merge D2: schema translator, schema.pg.sql, migration under lock
...
# Conflicts:
# package.json
# tsconfig.json
2026-11-21 17:58:12 +00:00
aiongg
7e268b01ba
Postgres schema: src/db/pg-schema.ts translates schema.sql and the added columns and indexes into src/schema.pg.sql with a strict allowlist (bigint identity keys, identity rowid on rowid tables, text COLLATE "C", citext for NOCASE, tsvector columns with GIN for FTS5, hand-written plpgsql triggers pinned to their SQLite text, compat functions instr/julianday/json_valid/group_concat); pnpm check fails when the file is stale; applyPgSchema runs it under pg_advisory_xact_lock; scripts/pg-schema-compare.ts lists the differences from the SQLite schema
2026-11-21 17:57:16 +00:00
aiongg
4940e4d6ab
Postgres engine for the Db handle: PostgresDialect on pg.Pool (pool size per process role, TLS verify-full to remote hosts, statement_timeout startup parameter, node:sqlite value shapes), reads as REPEATABLE READ READ ONLY snapshots, writes as READ COMMITTED under one advisory writer lock with lock_timeout, ? and :name rewritten to $n, query events on both backends; AUTOCRAFT_DB_URL selects Postgres (refused when AUTOCRAFT_DB differs); isLockTimeout/isConflict; scripts/pg-test.sh throwaway Postgres in Docker and pnpm test:pg; scripts/latency-proxy.ts; testDb helper and Postgres behaviour tests
2026-11-21 17:54:05 +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
20061c88d9
Apply async codemod: node scripts/codemod-async.ts over the program
2026-11-21 17:00:38 +00:00
aiongg
99cd1cd07d
Async codemod for the Db interface: awaits database calls and calls of functions that become async to a fixpoint over the program (TypeScript 5 as the ts5 tool dependency), rewrites BEGIN IMMEDIATE/BEGIN blocks into db.write/db.read, array callbacks into sequential helpers (src/async-seq.ts), and the API to Db/Statement, script, inTransaction, for await, connectDb/openDb; reports residue and read-then-write candidates per subsystem (scripts/codemod-async-report.md, from main). test/no-floating-promises.test.ts fails on unawaited promise statements outside test/floating-promises.allow
2026-11-21 16:41:31 +00:00
aiongg
250fb13584
Load rig runs its Task Runners at nice 15 so the dashboard gets the CPU first, as with runners on users' machines
2026-11-20 04:51:40 +00:00
aiongg
970cfa8e8e
Merge rs-t3: long-polling claims
2026-11-20 02:15:44 +00:00
aiongg
bbbbe23ef3
Long-polling claims: a protocol 4 claim with nothing to take waits up to its hold for a call, woken by the remote-queue topic; shutdown answers held claims before closing; X-Held-Ms; rig scenario 7
2026-11-20 02:15:04 +00:00
aiongg
2013dc030a
Merge rs-t2: Task Runner autocraft 1.3.0
2026-11-20 02:11:20 +00:00
aiongg
8fcf84bb23
Task Runner autocraft 1.3.0: rename from autocraft-task with a shim at the old path, device login, long-poll claims with protocol 3 fallback, migration of 1.2.0 installs
2026-11-20 02:10:06 +00:00
aiongg
a9bb9fb6f3
MCP Connector and Task Runner credentials: kind-aware tokens, device login for runners, /api/runners session routes, connector tokens refused on runner routes and runner credentials on /mcp, MCP server named autocraft
2026-11-20 02:04:55 +00:00
aiongg
860eec1bfc
Load rig: per-scenario time scale, scenario 6 at 0.5 in its own process with calls queued over 25 s, scenario 5 gives the failing helper 5 slots, scenario 3 checks that no requeued lease's reply is accepted; claims take a leased call out of the cached queue order instead of rebuilding it
2026-11-20 00:08:10 +00:00
aiongg
cbb212fde7
Merge branch 'rb-timescale' into rb-int
...
# Conflicts:
# src/remote/calls.ts
# worker/autocraft-task.mjs
2026-11-19 23:52:03 +00:00
aiongg
2b28a23aa4
Test-only time scale for the user-local mode (AUTOCRAFT_REMOTE_TIME_SCALE) and a --time-scale option in the load rig
2026-11-19 23:50:40 +00:00
aiongg
d0a85d75cd
Review fixes for the user-local robustness batch
...
- A tarball archive is cached only when the copy was written in full.
- Claim permission reads use the helper routes' short busy timeout.
- A 404 from the app's permission check falls back to the session
instead of counting as no permission.
- The load rig reads cool-offs per login and the helper's last error.
- A lease that never had a heartbeat is no drop toward the cool-off;
the helper resends a claim's request id after a failure in transit.
- A reply whose lease ended during the submit is answered 410.
- The fast lane is not counted as planner room.
- A follow-up waits on the helper that ran its parent call.
2026-11-19 23:46:06 +00:00
aiongg
d77fb3d7ea
Merge branch 'rb-t6-load' into rb-int
...
Lease tombstones, old lease drops and spent cool-off rows go with the
minute maintenance (pruneRemote); requeue and unlease drop the cached
queue order; the liveness stamp uses the helper routes' connection.
2026-11-19 23:23:40 +00:00
aiongg
664f12ae8b
Keep the dashboard light under many helpers: seen_at every 30 s, remote maintenance on a minute timer, a short busy timeout with 503 on the helper routes, a cached queue order with authors stored at enqueue, per-token limits and the trusted proxy depth
2026-11-19 23:18:30 +00:00
aiongg
41965027be
Load rig for user-local helpers: fault-injection proxy, fake harness, scratch instance driver, scenarios and acceptance report
2026-11-19 23:15:13 +00:00
aiongg
18c3e886cc
remote-bundle script: set up a scratch database for a local dashboard and queue a call for a helper
2026-11-19 19:01:55 +00:00
aiongg
ebde14d6c2
The user-local helper runs on macOS: sandbox-exec with a deny-by-default profile, one slot per parallel run whose path root the claim names, a canary before the first claim, Claude Code's Keychain login as an option, and a try command with a bundle script for testing
2026-11-19 18:59:00 +00:00
aiongg
26ae4e15e2
Idle triaged issues wait as an open request for a person to pick up and count as parked; the gate's fake GitHub keeps PR heads; the gate script is type-checked
2026-11-08 06:51:29 +00:00