Chronos DB 0.3.0
Reviews you can trust with production data, from the first week of feedback on 0.2.0
Reviews you can trust with production data, from the first week of feedback on 0.2.0. Every change here was asked for in the 0.2.0 release threads on r/AI_Agents and r/LLMDevs: a dry run against your live Postgres, reads checked against it too, destructive changes shown first with a typed count to approve big deletes, and effects (NOTIFY ON MERGE) shown in the review, traced to the merge that sent them, and recorded when they're vetoed. Still a beta for staging copies of your data.
Upgrading from 0.2.0: some output gained rows or columns. MERGE ... DRY RUN leads with a summary row per table, lists deleted rows first, and has a new last column, postgres; DIFF WORLD lists deleted rows first (unpaged); SHOW REVIEWS, SHOW OUTBOX, CLAIM OUTBOX, SHOW MERGE POLICIES and SHOW MERGE OUTCOMES have new columns (changes, effects; merged_from, approved; confirm_deletes_over; effects_discarded). Clients that read these by position should read by name. The macOS builds need macOS 13 or later, as for 0.2.0.
- Outbox: effects in the review, tied to their merge, and a record of those never sent.
DIFF WORLD(a NOTICE),SHOW REVIEWS(aneffectscolumn), the HTTPdiffcount, MCP'sdiffcount and the Studio's Changes view list what a world's merge would send. Inmain,SHOW OUTBOXaddsmerged_fromandapproved(a merge policy's rules, a person after review, a person, or an agent with no policy), andSHOW MERGE world EFFECTSlists what a world's merges sent and where each is now (queued,claimed,ambiguous,done). An entry turning ambiguous is announced once per attempt by a NOTIFY onchronos_outbox_ambiguous. Effects discarded with their world (a rejected review, a drop, the sweeper) are recorded, never sent:SHOW OUTBOX DISCARDED [SINCE ...](channel, payload SHA-256, the payload itself only withALTER SYSTEM SET outbox_keep_payloads = on, world, who and why), counted per agent inSHOW MERGE OUTCOMES(effects_discarded). Kept beside the log for the history window. Raised on r/AI_Agents (issue #30, issue #31). - The stale-read check is faster with many filtered scans: a scan run again with the same conditions is kept once (it no longer counts toward the 1,000 filtered scans after which a table counts as read whole), and at merge each changed row is decoded once for all of a table's filters, with the table's schema read once. The benchmark's merge after 1,000 filtered scans, with 1,000 rows changed in main, took 1,825 ms and now takes 2.7 ms (
examples/readsets.rs, 100,000 rows; issue #29). - Review: destructive changes first, and a typed count for big deletes.
DIFF WORLD,MERGE ... DRY RUN,SHOW REVIEWS(a newchangescolumn), the MCPdiffandmerge_previewtools, the HTTPdiff(summary, anddeletesto page the deleted rows first) and dry run, and the Studio's Changes view now lead with what each table loses (leads: 4,812 deleted, 69 updated, 0 inserted, the tables that delete most first) and list the deleted rows before the other changes, marked (DELETE, and in the Studio in red with every value they held). A new merge-policy rule,confirm_deletes_over = n: a merge deleting more rows waits for a person, who approves it only by giving the count,MERGE WORLD x CONFIRM DELETES 4812(HTTP and MCPconfirm_deletes; the Studio asks you to type it). A missing or wrong count is refused (55000) with the real one, counted from the merge's own plan, before anything is written (to Postgres too, when attached); an agent can't give it for its own merge. PlainCONFIRM(a world open during a crash) is unchanged. Updates that null out a column across many rows are a follow-up. Raised on r/AI_Agents (issue #27). See merge policies. - Attach: reads are checked against live Postgres. A world that checks its reads (
check_reads) has them checked against Postgres too, inside the write-back's transaction and before anything is written: keys read are compared as written rows are, and a table read by a range, a filtered scan, whole, through an index, or by a key that found nothing is read whole from Postgres (at most 100,000 rows; past that the merge is held for a person). A row changed or added in Postgres that the read would have found, an empty result included, holds the merge (read rows that changed in Postgres since it forked), with nothing written; a row it couldn't have found doesn't. Before, reads were checked only against Chronos's copy. Raised on r/AI_Agents (issue #28). See Working beside your Postgres. - Attach: a dry run checks live Postgres.
MERGE WORLD x DRY RUNinto main of an attached folder now compares the rows the merge would write with Postgres as it is now, in one read-only transaction (the write-back's settings, source check, shape check and compare), then rolls back: nothing is written to Postgres, and main doesn't take Postgres's rows. A newpostgrescolumn shows each row as Postgres has it; a row changed there since the copy has outcomechanged in postgresandblockedsays the merge would be refused; apostgresrow says when it was read (no locks: a snapshot) and which triggers weren't run. In the HTTP preview aspostgres, and in MCP'smerge_preview. Asked for on r/AI_Agents (issue #26). See Working beside your Postgres.