Skip to content

Releases

Chronos DB 0.6.2

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 18 Nov 23:02

Strict proposals for payments, safer attached databases, and fixes from an audit of 0.6.0. A proposal that would
send a payment, payout, transfer or refund is now strict: only a person approves it, within 15 minutes, and any commit
to main since it was proposed supersedes it. Beside Postgres or MySQL, merges into main are refused when the source
may lose a commit it acknowledged; beside MongoDB, merges commit to a majority, journaled, and a merge whose outcome
was lost is no longer dropped when it in fact committed. chronos refresh --check compares main with the source and
changes nothing. Nothing changes in how rows are stored: 0.6.2 opens and writes data format 8 as 0.6.0 does. Built and
signed on the maintainer's Mac as 0.6.1 was.

  • Attached databases: merges into main are refused when the source may lose a commit it acknowledged (Postgres with
    fsync or synchronous_commit off; MySQL with innodb_flush_log_at_trx_commit not 1, or sync_binlog not 1
    with the binary log on), nothing written, saying which setting. CHRONOS_ATTACH_UNSAFE_SOURCE=1 merges anyway.
  • Attached MongoDB: a merge's commit is acknowledged by a majority of the replica set, journaled, and its reads use
    read concern majority. The probe that settles a merge whose commit outcome was lost now runs in a transaction it
    always aborts. The old probe took a merge still committing for one that never would, and dropped it, so a merge
    that then committed in MongoDB never reached main; it also could leave a probe document behind. A probe that can't
    tell yet (the merge's transaction still open) keeps the merge in doubt, and merges into main wait.
  • chronos refresh <folder> --check: the reconciliation scan. Compares main with Postgres as a refresh does and takes
    nothing: per table, rows only in Postgres, rows that differ, rows only in main, and tables whose columns differ.
    Exit 1 if they differ. Postgres sources only for now.
  • Fixes from an audit of 0.6.0.
    • A Postgres client that stops reading (a big result it never takes) no longer blocks its session, and keeps its
      locks, forever: a write that waits a minute ends the connection. TCP keepalive finds clients gone without a word.
    • One address can no longer fill every connection slot with connections that never log in: at most 64 from it may
      be logging in at once; the rest are refused as "too many clients".
    • A new agent can't take the name of a dropped one while grants on worlds still name it: it would have had them.
      An agent a merge policy names as its reviewer can't be dropped until the policy changes.
    • An agent's max_worlds holds against forks sent at once (each counted before any landed, and all went through).
    • SHOW WORLDS (and the HTTP branches op) to an agent held to a tenant lists main and its tenant's worlds only.
    • A merge retried by its operation id while the first try is still merging returns the first's result, not "no
      such world".
    • While the checkpoint that upgrades a folder to format 8 fails (a full disk, a store down), merges into main are
      refused instead of landing with no ledger row; each merge tries the upgrade again.
    • With a transaction left open, commits no longer slow down as row locks pile up: the list is pruned again only
      once it doubles.
    • Statistics of dropped, merged and discarded worlds are freed, as a process running millions of short task worlds
      kept them all.
  • Attached databases: chronos attach and chronos serve say at the start when the source may lose a commit it
    acknowledged, and so refuses merges into main, instead of leaving it to the first merge.
  • Attached databases: a merge the source committed before a crash cut it short is made in Chronos as it was decided.
    Recovery no longer judges it again by a merge policy, merge checks, scope or stale reads, which could refuse it and
    leave the world open with its rows already in the source; nor as the agent whose merge happened to start the
    recovery. Its effects keep their delay, and its rows the taint the merge gave them. A merge recorded by 0.6.0, which
    doesn't name the world's version it merged at, is judged as before.
  • chronos refresh <folder> --check works beside MySQL, MariaDB and MongoDB too, comparing main with the source as
    their refreshes do.
  • ASSIGN WORLD writes the whole tree's tenant in one change: an ALTER WORLD, a discard or a fork of one of its
    worlds can no longer land between its checks and its writes and leave the root assigned with a descendant not. A
    world forked from the tree meanwhile refuses the assignment (40001, try again), and a fork that
    started before the assignment landed refuses itself instead of staying unassigned under an assigned world. The same statement (tenant and
    reason) run again after a crash cut one short finishes the worlds left.
  • CONSOLIDATE: its scratch world (_consolidate_<p>) can't be dropped while the consolidation runs. A drop between
    marking the children and the scratch world's merge into p, then a crash, discarded children whose rows never
    reached p. CONSOLIDATE given a world's id works as given its name (it found none of the world's children).
  • Strict proposals for payments (rules E7 and E8). A proposal whose world queues an effect on a payment-like
    channel (payment*, payout*, transfer*, refund*, or a policy's review_channels or new strict_channels)
    is strict: only a person approves it, within the policy's new strict_window (15 minutes unless set; then it's
    expired), and any commit to the world it merges into since it was proposed supersedes it, at approval or at the
    merge (40001, strict_target), so a payment never goes out against a state nobody approved. It merges whole into
    its parent. SHOW PROPOSALS shows strict and strict_until; SHOW MERGE POLICIES the two settings;
    EXPLAIN MERGE a strict line before anything is proposed.

Every change in detail: https://github.com/2090-labs/Chronos-DB/blob/main/CHANGELOG.md

Chronos DB 0.6.1

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 18 Nov 17:11

Two fixes for merges cut short by a crash. Beside Postgres or MySQL, recovery from a crash after the source
database committed a merge could put rows in main that never reached the source: it now settles exactly the merge the
source committed. And MERGE WORLD ... IN CHUNKS OF n refused the version confirmation a world open at a crash asks
for, so such a merge could only finish all at once; it now goes on in chunks. If you merge into an attached database,
upgrade. Nothing changes in how rows are stored or merges are written: 0.6.1 opens and writes data format 8 as 0.6.0
does. Built and signed on the maintainer's Mac as 0.6.0 was.

  • MERGE WORLD ... IN CHUNKS OF n takes CONFIRM and AT VERSION, so a chunked merge cut short by a crash goes on
    in chunks: a world open at the crash merges only with its version confirmed, which IN CHUNKS used to refuse. The
    version is checked by the first chunk, and each chunk after checks from where the one before left it (before, a
    version given through the API failed the second chunk).
  • Attached databases: a merge into main whose outcome was lost in a crash after the source database committed it is
    now settled as the merge that was written there, and no other. Recovery used to merge the whole world again, so
    after a partial merge (ONLY KEYS, ONLY TABLES), or a write to the world after the crash, main took rows that were
    never written to Postgres or MySQL. Recovery now merges at the world's version and keys as the merge had them; a
    world written since keeps those writes, and main takes the source's rows.

Every change in detail: https://github.com/2090-labs/Chronos-DB/blob/main/CHANGELOG.md

Chronos DB 0.6.0

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 18 Nov 11:33

Merges are logged as what they did, agents are kept to their tenant, and worlds gain what long-running agents
need.
A merge now writes the rows it set as one log record, chained into a ledger VERIFY LEDGER checks, so
recovery replays what happened instead of judging the merge again. Merges check constraints they bring against rows
they never saw. Agents held to a tenant are kept to its worlds and rows everywhere, and new agents read only their
own worlds and main. Worlds gain durable checkpoints, grants, transfer and budgets; coordinators gain delta columns,
CONSOLIDATE and arbitration; reviewers gain certified proposals; and world sets fork, rank and merge the best of
many tries. Built and signed on the maintainer's Mac as 0.5.5 was.

Upgrading. The first checkpoint or merge after 0.6.0 opens a folder writes data format 8, which 0.5.5 and older
refuse ("is from a newer Chronos"): back up first if you may need to go back, and upgrade replicas before the primary. VERIFY DATABASE
returns two more columns. Agents made from now on without rights read only their own worlds and main (ALTER SYSTEM SET agent_default_read = 'read' keeps the old default); existing agents keep theirs.

Not yet. Tested on macOS only: the full suite on Linux, the S3 store and the performance budgets were not run
for this release. Not yet covered by a test: replaying logs that mix 0.5.5 and 0.6.0 records in one
segment, a crash at every step of a merge, and crash recovery beside an attached database.

  • The public repository moved to the 2090 Labs organization: github.com/2090-labs/Chronos-DB. The Studio's README
    and issue links and the TypeScript client's package links name it. The old addresses still redirect, so the
    install command of earlier releases keeps working.
  • Merges are logged as what they did. A world merge, partial merge or rebase now writes one physical log record
    holding every row it set (data after relayout, index entries, outbox rows as delayed), the merged world's fate and
    a blake3 digest; opening the database writes those rows again and judges nothing, so recovery no longer depends on
    merge rules that may since have changed. Transaction commits keep their old record, and logs written by 0.5.5
    still replay as before. A checkpoint writes manifest format 8 (the first merge on a folder writes one first): from then on
    0.5.5 refuses the folder ("is from a newer Chronos"), so back up before upgrading if you may need to go back.
  • Every merge into main writes a ledger row (_sonos_ledger/<seq>: who merged what, under which policy and the hash
    of its row, the rows and deletes, the digest) in the same log record as its data, chained by hash. VERIFY LEDGER
    recomputes the chain and returns a row per entry (seq, ok, detail). A merge given an operation id
    (MergeOptions::operation) records it: asked again with the same id and request it returns the first result, and
    the same id with another request is refused. A database kept in memory has no log, and so no ledger.
  • Merges check the constraints they bring to rows they never saw. A world that adds a UNIQUE or FOREIGN KEY
    constraint, or sets NOT NULL, has the whole table checked when it merges, so a duplicate, an orphan or a null main
    added meanwhile refuses the merge (it went through before); merged, the new constraint's index rows cover main's
    rows too. A world that deletes a row, or changes a value, that a foreign key to a UNIQUE column references refuses
    to merge while main has added a row referencing it. UNDO MERGE is checked as a merge is: it refuses to delete a
    parent a row added since references, and SKIP CHANGED leaves that parent. Recovery never runs these checks: a
    log that holds a merge they would refuse opens to the same state.
  • VERIFY DATABASE lists rows that break a constraint. Two more columns, world and problem: one row per
    NOT NULL, UNIQUE, FOREIGN KEY or CHECK violation in any world (none: the counts alone, as before). The verify
    command and HTTP call list them too.
  • Merges into another world keep to the world's line. MERGE WORLD g INTO w past g's parent refuses rows the
    parent changed and never merged there (g's rows carried the parent's change along). An agent may merge a world
    only into its parent or a world forked from it, and may not merge part of a world (ONLY TABLES, ONLY KEYS,
    INTO) while worlds are forked from it; a person may. A diff and MERGE ... DRY RUN list grants, owners, rules and
    casts, which merged without being shown.
  • A world's life is held to at every use. An expired world is read-only at once (writes, merges from and into it, forks,
    and a COMMIT of a transaction that wrote in it get 55000), not only when the 30 s sweeper discards it; it reads until
    then, and the sweeper discards it with its forks, deepest first. A fork's expiry is capped at its parent's, and
    shortening a parent's TTL shortens its forks'. New: max_depth and max_children (ALTER SYSTEM, and per agent;
    54000); GRANT {READ | WRITE | MERGE | FORK} ON WORLD w TO agent [UNTIL ...] and REVOKE ... ON WORLD, rights in one
    world and its forks, never main; TRANSFER WORLD w TO agent, which moves the world's lease epoch on and fences the old
    owner (55P03); and world budgets, budget_rows and budget_statements (53400), a fork's at most its parent's left.
    See SQL.
  • Durable worlds: CREATE WORLD w WITH (durable) (or ALTER WORLD w SET (durable = true)) makes every write the
    world acknowledges wait for the disk, as main's do, so a crash loses none and doesn't flag the world. A durable
    world that checks its reads keeps its read set in the log, so its merge is checked as usual after a crash instead
    of held. CHECKPOINT WORLD w AS label PIN '1 day' keeps the world's state past history_retention until the pin
    runs out, and ROLLBACK WORLD w TO CHECKPOINT label returns to it. SHOW WORLD STATE w and
    RESUME WORLD w TOKEN '<id>:<version>:<epoch>' say where a world is for an agent coming back to it.
  • Negotiable merges for worlds that work under one coordinator. ALTER TABLE t ALTER COLUMN c SET MERGE AS DELTA [ESCROW (MIN n [, MAX m])] makes a number column merge as parent + (ours - base) where two worlds both changed it,
    refused (23514) past an escrow bound; SET MERGE AS DEFAULT takes it away. FORECAST CONFLICTS [FOR WORLD w]
    lists rows sibling worlds (and a world and its parent) both changed, or one read and another changed.
    CONSOLIDATE PREVIEW p says per row what merging all of p's children would do; CONSOLIDATE p [ONLY CHILDREN (...)] [USING ARBITRATION] merges them into p as one, all or nothing. A new merge policy setting, arbitrate
    (priority, newest, oldest, fail), settles rows two children both changed, and records the losing value in
    the coordinator's metadata (_sonos_arbitration). See SQL.
  • Certified merges: ATTACH EVIDENCE TO WORLD, PROPOSE MERGE WORLD (a proposal bound to a certificate hash of
    every row the merge would write, its read set, evidence, scope and merge policy; the world is fixed for agents while
    it's open), APPROVE / REJECT / WITHDRAW PROPOSAL, and MERGE PROPOSAL, which derives the certificate again
    (refused with 40001 if anything changed) and merges as the proposing agent, its policy judged again with only what
    the approval covers lifted. EXPLAIN MERGE WORLD (counts, conflicts, policy verdict, readers, effects, evidence and
    the certificate in one answer), SHOW DECISION PROVENANCE, SHOW PROPOSALS, and SHOW TOMBSTONES (agents'
    worlds discarded, refused or rejected). Merge policy setting require_evidence. MCP tools propose,
    attach_evidence and explain_merge; HTTP ops propose, attach_evidence, proposals, decide_proposal,
    withdraw_proposal and merge_proposal.
  • Cross-world reads: FROM t AT WORLD w reads a table as another world has it, joined with this world's tables
    (read only; an agent needs the right to read that world, and row security applies there as here). AT WORLDS OF SET s reads it in every world of a set with a _world column.
  • World sets: CREATE WORLD SET s FROM WORLD b, FORK WORLD SET s COUNT n RUN $$...$$ SEED k (deterministic, as
    SIMULATE), ADOPT WORLD w INTO SET s, COMPARE WORLDS a, b [SUMMARY], RANK WORLD SET s BY (...) [WITH CHECKS],
    PRUNE WORLD SET s WHERE rank > k OR failed, and MERGE BEST OF SET s INTO b [DRY RUN], which merges the best
    world into the set's base, never straight into main. Objectives: CREATE OBJECTIVE o MINIMIZE $$...$$ SUBJECT TO CHECKS (...) and OPTIMIZE o FROM WORLD b RUN $$...$$ COUNT n KEEP k SEED s. See docs/sql.md.
  • A proposal merged into main is marked merged in the merge's own log record, beside its ledger row: a crash can no
    longer leave it approved with its world gone (a merge into another world still marks it after). While
    CONSOLIDATE p merges its last step into p and discards the children, each child is held: a write to it, a fork of
    it, or a transaction's commit into it is refused (55000) instead of being lost with it. A durable world's read set is
    logged only once the folder's manifest is format 8, so a 0.5.5 Chronos refuses the folder rather than misreading it.
  • A merge into a world that changes it (a child's merge, a partial merge, a transaction's commit) moves that world's
    version on, as a write does: a RESUME token, a reviewed or proposed version, and a world set's ranking all see it
    (40001). MERGE PROPOSAL of an agent's proposal checks the agent's rights as they are when it merges: rights taken away since
    give 42501, a world transferred away from it 55P03. CONSOLIDATE p holds its children from before it copies them,
    so a transaction committed into one meanwhile is...
Read more

Chronos DB 0.5.5

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 16 Nov 21:10

Deeply nested statements run again, and nested calls no longer take minutes. A release build refused 80 nested
parentheses or function calls where 100 are meant to run, and coalesce nested in its own argument doubled in time
with each level (22 deep: 3 seconds). Both are old, in every release build since the parser grew past its stack
budget; both are fixed. Answers are the same; nothing changes in how rows are stored or merges are written. Built
and signed on the maintainer's Mac as 0.5.4 was.

  • Statements nest as deep as they are meant to again, and nested calls no longer take minutes. A release build
    refused 80 nested parentheses (and 80 nested calls) as too complex, where 100 are meant to
    run: the parser's stack frames had grown, and the tests that measure it run only in release builds, which nothing
    ran after the build machine went away. The heaviest frames are out of the nesting path: 150 parentheses,
    140 calls on a 2 MB stack. And coalesce, greatest, least, mod and array[...] nested in
    their own arguments were typed twice a level, so each level doubled the time (22 deep: 3 seconds; 30: minutes);
    each argument is typed once now (60 deep: 19 ms). The release gate runs those tests.

Every change in detail: https://github.com/Abhishekxdg/chronosdb/blob/main/CHANGELOG.md

Chronos DB 0.5.4

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 16 Nov 19:18

Faster scans, GROUP BY and one-key joins. A filter on an integer column is checked as each row is read, a text
column read row after row allocates once, and a join on one whole-number column keeps its keys as numbers. Over
200,000-row tables on one core a filtered count is 25% faster, a GROUP BY 23% and the joins 20%; on two cores
GROUP BY is now faster than Postgres 18. Answers are the same; nothing changes in how rows are stored or merges
are written. The speed tables of 0.5.3 were measured on a busy machine and are measured again here. Built and
signed on the maintainer's Mac as 0.5.3 was.

  • Faster scans and one-key joins. A condition that compares an integer column with a whole number
    (amount > 500) is checked as each row is read, without the expression being worked out; a text column read row
    after row for a GROUP BY or a join allocates once, not for each row; a hash join on one whole-number column
    keeps its keys as numbers. On one core, over 200,000-row tables: a filtered count 13.5 to 10.1 ms, GROUP BY
    with max of a text 24.0 to 18.4 ms, a join + GROUP BY 95 to 75 ms. Answers are the same. BENCHMARKS.md's
    2026-11-16 tables (sections 4 and 16.2) are measured again on an idle machine, with what is still slower than
    Postgres.

Every change in detail: https://github.com/Abhishekxdg/chronosdb/blob/main/CHANGELOG.md

Chronos DB 0.5.3

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 16 Nov 14:48

Faster undo of big merges, and faster analytical joins. Undoing a merge by its id read the whole table for each
row it checked: a 10,000-row undo beside Postgres took about a minute and now takes under 3 seconds. A join followed
by GROUP BY no longer keeps every joined row before grouping: CH-benCHmark Q18 is 4.3 times faster on one core and
Q3 twice. Answers are the same; nothing changes in how rows are stored or merges are written. Built and signed on
the maintainer's Mac as 0.5.2 was.

  • Undo by merge id is about 20 times faster on big merges. Each row's check ("is it still as the merge left it")
    read the whole table; it now finds the row by its key. Undoing a 10,000-row merge of a 20,000-row table beside
    Postgres went from 57 s to 2.7 s (preview: 52 s to 2.8 s), measured through the gateway on an M2.
  • Faster analytical joins. A join followed by GROUP BY groups each joined row as its last table is joined instead of keeping every joined row first (each as wide as all the tables together), for count, min/max of a column and sum/avg of an integer or numeric column; a join on several whole-number columns keys on them without a list for each row; a joined table is read at the width the join holds. CH-benCHmark Q18 over one TPC-C warehouse went from 1,393 to 323 ms on one core and Q3 from 442 to 219 ms (Postgres 18 on two cores: 355 and 102 ms); the join reports of examples/report.rs are 18–30% faster on one core. Answers are unchanged. cargo run --release --example ch reruns Q3 and Q18 (BENCHMARKS.md, sections 4 and 16.2).

Every change in detail: https://github.com/Abhishekxdg/chronosdb/blob/main/CHANGELOG.md

Chronos DB 0.5.2

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 16 Nov 07:39

A merge undone in part can be undone again. Beside Postgres, MySQL, MariaDB or MongoDB, an undo that left rows
changed since could never be finished: the rows it had put back read as "changed since" themselves. They are now
told apart, inside the undo's own transaction. serve and refresh name the database they work beside, and the
help covers all four. Nothing changes in how merges are written. Built and signed on the maintainer's Mac as 0.5.1
was.

  • Undo knows rows already put back. undo_merges (HTTP undo_merge with ids, UNDO MERGE by id) no longer
    counts a row that is as it was before its merge as "changed since": it is already, neither undone nor skipped,
    and never refuses the undo. So a merge undone but for rows changed since can be undone again for those rows once
    they hold what the merge wrote, with the check still inside the undo's own transaction. The reply has already
    (a count), and rows with status: "already". Undoing a merge twice finds nothing to do instead of failing.
  • serve and chronos refresh name the database a folder is attached to ("refreshed from MongoDB", "column added
    in MySQL") instead of always Postgres. chronos usage and chronos attach help cover MySQL, MariaDB, MongoDB,
    --follow, --refresh-every, --lazy-tenant and refresh --tenant.
  • HTTP 500 and 502 answer with their own reason phrases ("Internal Server Error", "Bad Gateway"), not "Error".
  • Docs: the CLI reference gains attach, refresh, studio, their flags and the environment variables; the
    security page documents ALTER AGENT ... ROTATE TOKEN (it said there was no rotation) and uses the admin token
    in its examples; the HTTP API and errors pages cover MySQL, MariaDB and MongoDB, the review op, 502 and 507.

Every change in detail: https://github.com/Abhishekxdg/chronosdb/blob/main/CHANGELOG.md

Chronos DB 0.5.1

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 15 Nov 23:49

Follow MongoDB's changes as they happen, and a fix for least-privilege MySQL users. chronos serve --follow
now works beside MongoDB, through change streams. chronos attach beside MySQL or MariaDB no longer needs the
right to create tables when an administrator has made Chronos's two tables: 0.5.0 failed there. Nothing changes
for a folder attached to Postgres. Built and signed on the maintainer's Mac as 0.5.0 was.

  • Fixed: chronos attach beside MySQL or MariaDB failed for a user with no right to create tables ("can't make the
    table chronos_merges"), even where an administrator had made Chronos's two tables from the statements attach
    prints. Attach now uses the tables where they exist and makes them only where they don't.
  • MongoDB: serve --follow. Beside MongoDB, chronos serve --follow now reads a change stream on each attached
    collection (the user needs find and changeStream on those, and on no other): main takes the
    documents MongoDB changed a moment after they change, without a refresh's read of every document. The place in
    the stream is kept in the folder (mongo-follow.json); the first follow, and one whose place the oplog no longer
    reaches, begins with a refresh. chronos refresh --unfollow forgets the place. attached says follow: true
    for MongoDB in a build with it.
  • Fixed: chronos serve on a folder attached to MySQL, MariaDB or MongoDB warned at each start that merges into
    main were refused. They weren't; the warning is gone.

Every change in detail: https://github.com/Abhishekxdg/chronosdb/blob/main/CHANGELOG.md

Chronos DB 0.5.0

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 15 Nov 14:43

Attach beside MySQL, MariaDB and MongoDB, undo a merge by its id, and five security fixes. chronos attach now
works beside MySQL 8.0 or later, MariaDB 10.5 or later and MongoDB 5.0 or later (a replica set), as it does beside
Postgres: a merge is written to the database first, in one transaction, every row compared. A merge can be undone
by its id for 30 days. The security fixes are below; upgrading is recommended for anyone with more than one role or
agent.

The released binaries have MongoDB in them. The macOS builds need macOS 13 or later, as for 0.2.0. While the
build service is offline, this release was built on the maintainer's Mac with the release's own toolchain (Rust
1.95.0, zig 0.15.2 for every target) and signed as before, as the chronos-release service account.

Not yet beside MongoDB: following changes as they commit, sharded clusters, array elements changed one by one.
Tested against MongoDB 5.0 and 7.0 run locally, not against Atlas.

Security fixes from a review of what a role or agent with little can do. All need a login; none is reachable
without one.

  • A rule (CREATE RULE, DROP RULE, ALTER TABLE ... ENABLE / DISABLE RULE) is its table's owner's to make, drop
    and switch, as in Postgres. Any role could before, and a rule's actions run as whoever writes the table next.
  • ALTER AGENT ... ROTATE TOKEN is a superuser's, as the other agent statements are. Any role could run it, and it
    answers with the agent's new token.
  • The MCP diff tool checks the world it compares against (to) as well as the branch, as POST /v1/diff and SQL's
    DIFF do; check_merge_policy asks for the right to see the world's changes. An agent held to a tenant could read
    other tenants' rows of main through a diff from a world it forked.
  • A role dropped, renamed or given another password while its login is under way is refused (28P01). It was logged
    in as a name that is no role, which is a superuser.
  • An agent held to a tenant may not drop or rename the tenant's column of a table in its world, nor drop the
    foreign key a table is held to the tenant through: the table then counted as shared by every tenant, and showed
    their rows.
  • The HTTP API's attached says which database a folder is attached to (kind: postgres, mysql or mariadb)
    and what that source can do besides the write-back and the refresh (capabilities: follow, dry_run,
    check_reads, act_as, lazy_tenant, source_checks), so a program can ask rather than learn from a refusal.
    Each table's name in the source's SQL is source_table (postgres still holds it too). A folder attached to
    MariaDB from this release on says mariadb; one attached earlier says mysql, and works the same.
  • A world that checks its reads has them checked against MySQL or MariaDB too, inside the write-back and by
    CHECK READS, as against Postgres: what it read that changed there since its fork holds the merge, and nothing is
    written. Before, check_reads beside MySQL refused every merge. A table read by a filtered scan is read whole from
    MySQL to check it (for the world's tenant, when it read for one). attached says check_reads: true for MySQL.
  • MERGE WORLD x DRY RUN works beside MySQL and MariaDB: each row the merge would write compared with the
    database's in one snapshot, the world's reads checked, the tables' triggers named, nothing written. attached
    says dry_run: true for MySQL. Rehearsals are still Postgres's only.
  • Rows can be inserted into AUTO_INCREMENT tables beside MySQL and MariaDB. A new row has a provisional id in its
    world (negative, from -1,000,000,001 down); the merge inserts it without one, takes the id MySQL gives, and writes
    that in the row and in every row that refers to it through a foreign key MySQL declares. A provisional id anywhere
    else is refused with nothing written. Not for columns narrower than INT or BIGINT UNSIGNED, and not in a
    folder attached before this (attach again). attached says inserts for each table.
  • Attach beside MySQL takes generated columns (read and compared, never written, MySQL's value taken back with the
    row), and brings column defaults over: a constant or CURRENT_TIMESTAMP as the copy's own default, any other
    expression written as DEFAULT at the merge. Before, a NOT NULL column with a default made every insert fail.
  • A merge written to an attached database can be undone by its id for 30 days (CHRONOS_UNDO_WINDOW_DAYS), not
    only within the folder's history. Each write-back keeps the rows it wrote, before and after, in the database and
    in its transaction (chronos.merge_rows; chronos_merge_rows in MySQL). HTTP merge answers the id (merge);
    undo_merge with ids puts those merges' rows back through the database in one transaction, with skip_changed
    and dry_run. attached says undo: {ready, window_days}. Works beside Postgres, MySQL and MariaDB.
  • An undo by merge id that would make Postgres change rows besides its own (an ON DELETE CASCADE under a row it
    removes, a trigger) is refused (409, 2BP01) unless it says allow_cascade. Its dry run now runs the writes in
    the database and rolls them back: it names those tables (cascades) and finds rows changed only in the database.
    The effects the merges queued are listed (effects_not_undone). Rows changed since answer 409 with 40001, not
    400. In SQL: UNDO MERGE ID '...' [SKIP CHANGED] [ALLOW CASCADE] [DRY RUN]. MySQL can't count cascades.
  • chronos attach works beside MongoDB 5.0 or later (a replica set, or Atlas), in a build with --features mongo.
    A collection is a table (_id, the fields named by --fields, and doc as jsonb); a merge is written to MongoDB
    first in one transaction, each document compared with main's; an update sends only the fields that changed
    ($set/$unset by path), and a number keeps the type of the field it replaces. Refresh and undo by merge id
    work. Not yet: follow. See the guide.
  • Attach beside MySQL 8 refused columns with an expression default: DEFAULT CURRENT_TIMESTAMP and
    DEFAULT (expr) were taken for generated columns (MySQL marks them DEFAULT_GENERATED) and the table refused.
  • Beside MongoDB, a merge's dry run compares each document with MongoDB's in one snapshot, and a world that checks
    its reads (check_reads) has them checked against MongoDB: in the write-back's transaction and by CHECK READS.
    A condition on a field inside doc counts as a read of the whole collection; one on a --fields column doesn't.
  • mongodb+srv:// URLs connect. The MongoDB driver was built without its DNS seed-list support, so every
    such URL (Atlas's usual one) was refused before any connection. Not tested against Atlas.

Every change in detail: https://github.com/Abhishekxdg/chronosdb/blob/main/CHANGELOG.md

Chronos DB 0.4.10

Choose a tag to compare

@Abhishekxdg Abhishekxdg released this 09 Nov 22:13

Rules for agents that run on their own. Merge policies gain rules on values, a breaker for a fleet, a guard
against prompt injection, and a reviewer agent that can decide every merge without being able to approve what only a
person should.

The macOS builds need macOS 13 or later, as for 0.2.0. While the build service is offline, this release was
built on the maintainer's Mac with the release's own toolchain (Rust 1.95.0, zig 0.15.2 for every target) and
signed as before, as the chronos-release service account.

  • row_rules: conditions on the rows a merge changes, over old.col and new.col, read as a CHECK
    ('payments: new.amount >= -50; prices: new.price <= old.price * 1.2'). Reasons name rows by key, never values.
  • max_nulled: most values one merge may empty.
  • all_rows_per_hour, all_deletes_per_hour, all_effects_per_hour: limits on every merge into main by any
    agent keeping to a policy, together, a reviewer's approvals included.
  • untrusted_columns, untrusted_guards: a world that may have read text from outside (tickets.body) and
    changes a guarded table waits for a person. The policy's worlds keep their reads without holding for stale ones.
  • spot_check: one merge in n, at random, waits for a person.
  • review_every: every merge waits for review, so a reviewer agent decides each one.
  • person_only: the rules whose holds a reviewer agent may not approve (by default deletes, schema, untrusted
    reads, the fleet limits and spot checks); an admin's agent can't merge those either. SHOW REVIEWS has a
    needs_person column.
  • Holds notify chronos_review_held, so a reviewer listens instead of polling.
  • untrusted_columns = '*' and trusted_columns: every text column untrusted by default, with exceptions.
    'tickets.*' takes every text column of one table.
  • Tainted rows: rows a merge writes after its world read untrusted text are tainted, and reading one counts as
    reading untrusted text. Kept in the tallies file; a person's own merge or a delete clears a row.
  • Reasons without values for agents: row keys that are text, what a merge check found and what a SELECT gave show
    as … to agents, a reviewer among them, in refusals, SHOW REVIEWS, CHECK READS and check_merge_policy.
    People see them as they are.
  • watch_totals, max_shift: scalar queries run before and after a merge; one that moves more than max_shift
    percent (10 by default) holds it, for a person by default.
  • max_unusual: a merge far bigger than the policy's usual (the median of its last 50) waits: drift.
  • canary, canary_wait: a big merge lands a few rows first (55000), the rest after the wait.
  • effects_delay: effects an agent's merge lands are delayed: no claim, no NOTIFY, and UNDO MERGE
    meanwhile takes them back unsent.
  • A run's own row_rules: CREATE WORLD ... WITH (row_rules = '...') adds conditions on top of the policy's.
  • Changed: another agent with no policy can't merge a world held for person-only rules, but the world's own agent
    whose policy an admin removed still can.

Every change in detail: https://github.com/Abhishekxdg/chronosdb/blob/main/CHANGELOG.md