Repository navigation
Chronos DB 0.8.0
The first release under the Functional Source License (FSL-1.1-ALv2), SERIALIZABLE transactions, transactions that
span worlds, and agent memory. Chronos may now be used, changed and shipped inside anything except a product or
service that competes with it, and each version becomes Apache-2.0 two years after its release; 0.6.2 and earlier
stay under the Business Source License 1.1. SERIALIZABLE refuses a commit whose reads another commit changed
(40001), a transaction may SET its world and commit several worlds' changes at once, and agents get long-term memory
in the engine itself. Also here: a background scrub, VACUUM FULL that frees disk, enum types on the wire, pg_dump
schemas that load, a first batch of hot-path speedups, and security and correctness fixes. 0.7.0 was tagged but
never published: its changes, listed under 0.7.0 below, ship for the first time in this release. Nothing changes
in how rows are stored: 0.8.0 opens and writes data format 8 as 0.6.0 does. Built and signed on the maintainer's
Mac as 0.6.2 was.
Release checks: the supply-chain step (no advisory, every licence on the list; SBOM attached as
chronos-0.8.0.cdx.json); the release gate (crash points, kill -9 under concurrent merges, simulated interleavings,
fuzz tests at 100,000 rounds); a 10-minute soak; the whole suite on the Mac (2,833 tests, no failure outside
tests/known_failures.txt); the Linux gate passed on Ubuntu 24.04, x86_64, against Postgres 16.16 (commit
3a82eeb: 2,853 tests, 2,841 passed, 12 known failures, 17 skipped; S3 against moto, doctests, the installer test and
the latency budgets passed; summary attached as linux-gate-summary.md; a first run failed
pg::a_client_that_stops_reading_lets_its_locks_go on timing and the rerun passed). Drivers and ORMs: psycopg,
SQLAlchemy, Django, Alembic, LangGraph, the pytest fixture, node-postgres, Knex, Prisma, TypeORM, Sequelize, JDBC,
Flyway and Hibernate passed; pgx and GORM were not run (no Go on the machine). The cargo fuzz targets were not run
(no nightly toolchain on the machine).
-
Agent memory. Long-term memory for agents, like mem0 or Supermemory, built on the engine's own search and
versioning: MCP tools and HTTP opsmemory_add,memory_search,memory_update,memory_forget,memory_get,
memory_profileandmemory_history, and SQL'smemory_search(query, scope [, k [, options]]). Memories are rows
ofagent_memory, scoped byuser_id,agent_id,session_idandapp_id. Search fuses BM25 and the vector
index with recency and importance and returns each score's signals for the agent's LLM to rank;memory_add
suggestsupdate:<id>orduplicate:<id>for near memories. The engine makes no LLM or embedding calls: callers
send vectors. Every memory has a history (Core::key_history: every write to a row the log holds, across the worlds
of its line), can be searchedas_ofa past time, and can be written in an agent's own world and merged under its
rules. Seedocs/memory.md. -
Security: a table dropped and made again by the same owner is another table AS OF a moment.
FROM t AS OF <time>andUSE main@<time>told a table apart from the one of its name now by its owner only, so a table its
owner dropped and made again was read in the past with the new table's grants: a role granted SELECT on the old
one was refused, and one granted it on the new one read the old one's rows. Now the stamp of a relation's making
(_sonos_made, kept since DROP ... CASCADE lists objects in the order they were made) tells them apart: an old
table is read with its own grants as they were then, the new one with its grants now. Nothing new is stored: a
table made before those stamps were kept (an older folder) has none, and is told apart by its owner, as before
(CHRONOS-368). -
Security: a user's operator on a built-in symbol no longer replaces the built-in. CHRONOS-357 kept bare
comparisons on the built-in, but any other symbol a role made an operator of (||on text, text;->,&&, ...)
was called for every role's bare use of it. As in Postgres, pg_catalog's operator now hides a user's of the same
symbol and operand types:'a' || 'b'is the built-in for every role, and the user's is called only as
OPERATOR(public.||), or for operands of its own types.OPERATOR(public.+)(and-,*,/,%,^) reaches
a user's operator too, where it read as the built-in (CHRONOS-366). -
Operators in the catalog, and their owners. pg_operator now has a row for each operator CREATE OPERATOR made,
with its schema, owner, operand and result types and function, beside the built-in ones (it had the built-ins
alone). CREATE OPERATOR needs USAGE on its operand types (42501permission denied for type t), as Postgres asks.
ALTER OPERATOR ... OWNER TO rolewas accepted and forgotten; the new owner is now kept, across a restart too,
needs a role the owner may become (42501) that is there (42704), and only the owner may run it (CHRONOS-367). -
Several statements in one string: split at COMMIT as in Postgres, and all or nothing over HTTP too.
Behaviour change. A simple Query of several statements now follows Postgres's implicit transaction block all the
way:insert ...; commit; insert ...commits what came before theCOMMIT(with Postgres's warning that no
transaction was in progress) and makes what comes after it a block of its own; aROLLBACKthere undoes what came
before it; aBEGINthere makes the block the client's, with what ran before it. What can't run in a transaction
block (VACUUM,CREATE/DROP DATABASE,CREATE INDEX CONCURRENTLY,REINDEX ... CONCURRENTLY,DISCARD ALL,
ALTER SYSTEM, ...) fails with 25001 among other statements, as in Postgres (alone it runs as before), and
SAVEPOINT,RELEASE,ROLLBACK TOandCOMMIT AND CHAINthere are 25P01; either undoes what came before it in the
block. Before, a string holding any of these, or its ownBEGIN/COMMIT, or aCOPY, ran each statement on its
own. A world's statement (CREATE WORLD,USE WORLD,MERGE WORLD, ...), which Postgres has none of, commits what
came before it, runs on its own, and the statements after it are a block of their own, socreate world x; use world x; ...works as before. The HTTP API'ssqlop (POST /v1/sql) runs its statements the same way: several are one
transaction, and a failure undoes the ones before it, where each committed as it ran (CHRONOS-369). -
Text search configurations and dictionaries have Chronos's own oids (CHRONOS-371). Each snowball language's
configuration is 15100 up and its_stemdictionary 15000 up (english 15106, english_stem 15006), in place of the
oids one Postgres 16 build's initdb happened to give them (13639, 13638), which differ between Postgres builds;
simplekeeps Postgres's fixed 3748 and 3765. regconfig and regdictionary read and show names through them, and a
value stored with the old oid still names its object. The differential tests compare these objects by name. -
An agent's abandoned transaction lets go after an hour. An agent's Postgres connection (not the guest's, not
the database's own users') idle inside a transaction for an hour, with nomax_idle_msand no
idle_in_transaction_session_timeoutof its own, is dropped (FATAL25P03) and its transaction rolled back, its
row intents and locks let go. Before, it held them until the connection closed.SHOWandpg_settingsstill say
Postgres's0; amax_idle_msor a timeout of its own changes it.docs/production-checklist.mdnow says what is
on by default and why each other limit (statement_timeout,max_worlds,world_idle_ttl, the disk and memory
caps, the idle timeouts for people) stays off (engine #399). -
Dependencies: a stale advisory ignore dropped.
deny.tomlignored RUSTSEC-2026-0386 (tokioAsyncFd
unsound) as having no fixed release, but it is fixed in tokio 1.53.3 and later, and 1.54.1 is locked, so the
ignore went: a new tokio advisory now fails the gate instead of hiding behind it. RELEASING.md says where the SBOM
lands underctest exec(the shared build folder, not the worktree'starget/) and gives the two checks'
commands. The four crates the 2026-11-10 assessment flagged are all at fixed versions:rustls-webpki0.103.17
(RUSTSEC-2026-0382 fixed in 0.103.16),webpki-root-certs1.0.12 (-0383, 1.0.10),ctutils0.4.8 (-0385, 0.4.4),
tokio1.54.1 (-0384, 1.54.1; -0386, 1.53.3) (engine #408). -
Correctness fixes from the backlog (#431). Silent wrong results:
hashoidvectorreads a negative oid spelling
asoidindoes; ADOPT into a world set keeps itsmax_live; DROP COLUMN of a column two unique constraints INCLUDE
keeps the keys that rest on them; a generated column or CHECK naming its table (t.a) keeps working after
RENAME TO; one ALTER TABLE dropping several key columns with CASCADE no longer brings back a foreign key an
earlier action dropped; DROP SCHEMA CASCADE drops another schema's text search configuration that maps one of its
dictionaries, which before lost the token. Undo: a PL/pgSQL block or function SET clause takes back aset_config()
queued inside it, counter restarts and DDL a body ran go with its block or refused statement, and ROLLBACK TO a
savepoint takes back the unique checks put off since. Dependencies: DROP TYPE drops (or without CASCADE is refused
by) its transforms; DROP FUNCTION is refused by (or with CASCADE drops) a CHECK, generated column or default that
calls it; DROP OWNED BY the owner of a built-in function refuses as Postgres does (2BP01). Checks: a partition key's
operator class has to exist (42704), and DROP OPERATOR CLASS of a missing one is 42704 too; ALTER COLUMN TYPE of a bloom
index's column needs a bloom class for the new type; SET CONSTRAINTS keeps the schema it is given and reaches
partitions' copies of a unique constraint. DISABLE TRIGGER ALL's state follows its foreign keys' renames and drops.
An expression index part keeps its made access method's default class, so DROP OPERATOR CLASS sees it and ALTER
COLUMN TYPE swaps it. Attribute notation alone in a statement (SELECT p.f FROM pt p) and a field of an overloaded
call's row ((g(1)).a) are read. pg_proc shows the owner and grants kept for a built-in function. -
Security: five findings of the 2026-11-28 review.
table_to_xml,query_to_xml(and their_and_xmlschema,
schema and database forms),ts_statandts_rewriteran their query in a session of nobody's, the database
owner's: an agent held to one tenant read every tenant's rows, past row-level security, masks and column grants.
They now run as the session that called them, its agent and role. MCP safe mode (and a rehearsal's confined
session) refusedCREATE ROLEand the like at the front door only: aDOblock'sEXECUTE, or a function's body,
ran them as the database's own user; refused there too now (42501). A merge keeps to the world's merge policy, not
only the merging agent's:TRANSFER WORLDby an agent keeps the old owner's policy on the world, and an agent
merging another agent's world keeps to its owner's (admin agents and people as before). Behaviour change: an
agent withoutunmaskmay no longer write values into a column maskedWITH HASHorWITH FORMAT, or set such a
mask: written values read back as their hash, a chosen-plaintext oracle (and a unique violation told whether a
guessed value existed).search(table, words)read whole rows past grants, row-level security and a tenant hold:
it now needs SELECT on the table, and is refused (42501) where row security or a tenant hold limits the session (a
query with@@reads the table through them).chronos servewith no token now says at start that loopback is
trust. -
Drivers and ORMs: smoke scripts, and what they found (CHRONOS-306).
tools/drivers.shruns every client in
tests/drivers/whose toolchain is on the machine (TypeORM, Sequelize, GORM, JDBC with Flyway and Hibernate, beside
the existing ones); RELEASING.md runs it before a tag. Fixed from the runs: a three-part name whose first part is
the current database ("main"."public"."t", as TypeORM writes) reads aspublic.t; a quoted built-in typname
casts (x::"regtype","int4"); catalog columns of typenameare typed so, soarray_agg(attname)is a
name[]; andSET ROLEto the login's own name when it is no role (Flyway, putting a connection back) is taken. -
Faster hot paths, first batch (CHRONOS-372). See
docs/designs/speed-plan.md:- A diff no longer looks up again the rows the tree diff already read.
- A row read by key reads its table's schema once, not twice.
- The memory cap check reads the process's memory at most every 5 ms, not before every statement.
- A commit's sync shares the log file instead of duplicating its descriptor, and with
synchronous_commitoff it
no longer asks for one. - pg_stat_statements does its allocating outside its lock.
- pg_stat_activity's row is updated in place.
- A fork with
max_worldsor a fork limit set no longer counts every world. examples/micro.rstimes single operations in process (p50, p99, p99.9).
-
VACUUM FULLtakes deleted rows off disk. Cleanup rewrites a page file only once less than half of it is in
use, so a deleted row's bytes could stay in one indefinitely.VACUUM FULL(any table list, or none: it is the whole
database's page files) now checkpoints, then rewrites every page file that holds a page nothing needs, here and in
the bucket with--remote. Rows history still keeps (withinhistory_retention, or a pinned checkpoint) and rows a
world still has stay; lowerhistory_retentionfirst to take those too. Checkpoints, cleanup and big statements
wait while it runs. Only a superuser or the database's owner may run it, and an agent needsadmin(42501). Plain
VACUUMis unchanged. Seedocs/security.md, "Data deletion, residency and keys" (CHRONOS-373). -
A refresh on the timer skips MySQL and MariaDB tables with no commit since the last (CHRONOS-291). As beside
Postgres since 0.7.0,serve --refresh-everyfirst reads each attached table'sUPDATE_TIMEandCREATE_TIME
(information_schema.TABLES, MySQL 8's statistics cache off for the read) and doesn't read the rows of tables
where neither moved; their columns are still checked, and the answer lists them inunread. A time in the second
of the read isn't trusted, so a commit in that second is read at the next refresh. Partitioned tables, tables with
noUPDATE_TIME(none kept since MySQL started), the hourly full read andchronos refreshread every row. -
An engine started by a gateway leading several says the lease's epoch (CHRONOS-320):
chronos servewith
CHRONOS_LEADER_EPOCHset printsstarted by the gateway leading at epoch Nas it starts, so its log names the
leader whose engine it is. Only said: writes aren't checked against it. -
License: the Functional Source License (FSL-1.1-ALv2). From this version on, the engine and the
chronos
binaries are under the Functional Source License 1.1, ALv2 Future License, in place of the Business Source License
1.1. Any use is allowed (production, inside a company, free and open projects, contributions) except a Competing
Use: making Chronos DB available to others in a commercial product or service that substitutes for it, such as a
hosted database service. Each version becomes Apache 2.0 two years after it is published (it was four). Versions
up to 0.7.0 stay under the Business Source License 1.1. SeeLICENSEandpublic/TERMS.md. -
Background scrub.
ALTER SYSTEM SET scrub_interval = '7 days'(off by default) has a running database re-read
every page still needed and every log record, checking each against its hash or checksum, atscrub_mb_per_sec
(10 MB a second by default) and without holding up checkpoints. It reports, never repairs:SHOW METRICSgives
scrub_last_run,scrub_errors,scrub_pagesandscrub_running, and the logevent=scrub_corruptand
event=scrub_done.Db::scrub()runs one now. Cloud-backed databases aren't scrubbed. Salvage
(chronos verify --salvage) now keeps each world's owner, expiry, pin and scope too. (CHRONOS-271) -
Enum columns are typed as their enum on the wire. RowDescription now carries an enum column's own type oid
(the onepg_typegives it), as Postgres does, instead oftext's 25, so drivers look its labels up. A client that
read enum columns as plain text may need the enum registered (or a::textcast in the query); psycopg and
node-postgres return unknown types as strings. Arrays of an enum are stilltext[]. The compatibility page now says
whatVACUUMandANALYZErecord (pg_class's counts, nopg_statsrows). (CHRONOS-290) -
SERIALIZABLE isolation.
BEGIN ISOLATION LEVEL SERIALIZABLE(and SET TRANSACTION, SET SESSION
CHARACTERISTICS, default_transaction_isolation) is taken instead of refused (0A000). It runs on REPEATABLE READ's one
snapshot and keeps what the transaction reads (rows, key ranges, scan filters, whole tables); COMMIT checks them, and
if a transaction that committed since it began changed any of it, COMMIT is 40001could not serialize access due to read/write dependencies among transactionsand nothing lands. Write skew (two doctors going off call) and
Hermitage's G2-item and G2 are refused as in Postgres; a transaction that wrote nothing commits as it read. It can
refuse more than Postgres's SSI (any rw-dependency on a committed write, at any level), never fewer.
(docs/designs/qm-fit.md) -
A pg_dump of an app's schema loads. An IMMUTABLE function of the user's in a generated column, an index
expression and an index's WHERE (run read-only in the statement's world where no query runs it);'simple'::regconfig
in an index expression; a schema-qualified call as an index column (btree (public.f(x))); a multi-column GIN with
btree_gin's scalars beside a tsvector (kept with no entries, as a jsonb one is); TRUNCATE statement triggers, BEFORE
and AFTER, withTG_OP = 'TRUNCATE'and tgtype 32; andON DELETE SET NULL (col)on a foreign key whose other
columns are in the primary key. -
Tests: a pg-boss queue over the wire. Eight connections fetching with
FOR UPDATE SKIP LOCKEDtake every job
once; a row held by an open transaction is skipped and comes back on rollback; session advisory locks go when their
connection closes;pg_advisory_xact_lockserializes writers; LISTEN survives a dropped connection
(tests/queue_fit.rs). -
A transaction may switch worlds.
SWITCH WORLD,USE WORLDandSET [LOCAL] chronos.worldinside a
transaction move it to the other world instead of failing with 25001. Each world gets its own fork of the
transaction when first reached, savepoints span every world, andROLLBACKdrops them all.COMMITchecks every
world's changes, then lands them in one step under the log lock: no other commit comes between them, and on
recovery all or none replay (the merges are grouped by an_tx_groupmetadata record; no log format change). An
agent may switch only to worlds it may change, or read in aREAD ONLYtransaction. API:Core::merge_all. -
An array of names goes out as
name[].array_agg(a.attname)and other arrays ofnamewent to clients typed
text[](1009) instead of Postgres'sname[](1003). node-postgres parses atext[]but leaves aname[]as text,
so Sequelize'ssync()failed reading indexes (text.replace is not a function). Found by the 0.8.0 driver run.
0.7.0 (tagged, never published: its changes ship in 0.8.0)
TLS on by default in the container, a round of security fixes, and a supply-chain gate. A Docker container started
without a certificate now exits instead of serving passwords, tokens and rows in plain text; plain HTTP stays
available, said out loud, with the ports bound to 127.0.0.1. No agent decides the review of its own world, a role
that isn't a superuser no longer changes WAL shipping or reads the database's state, a database's files and a world's
transforms and operators are their owner's alone, a table read AS OF a moment is checked as it was then, and the
Postgres and HTTP ports take request and connection rate limits. The release gains a Linux gate and a supply-chain
step: tools/supply-chain.sh fails the build on a vulnerability advisory, an off-list licence or a crate from outside
crates.io, and writes a CycloneDX SBOM; the gate reaches every crash point for the first time, and most test files now
build as one binary. Client certificates authenticate on the Postgres port, and chronos rehearse tries a migration
on a copy first. Nothing changes in how rows are stored: 0.7.0 opens and writes data format 8 as 0.6.0 does. Built and
signed on the maintainer's Mac as 0.6.2 was.
-
Tests: crash points in release test builds. The crash points and fault hooks (
CHRONOS_CRASH_AT,
CHRONOS_ATTACH_CRASH,CHRONOS_FAIL_PAGE_WRITES, the sequence stall) are behind atest-hooksfeature that every
test build turns on (the crate dev-depends on itself with it), so the 12 crash and recovery tests that skipped
themselves in release builds run there too, among them #374's attached-recovery fix
(recovery_applies_intent_payload_without_validation). A shipped binary still has none (no dev-dependencies). The
release gates of 0.6.0, 0.6.1 and 0.6.2 never reached a crash point: theircrashand attached-recovery tests
returned early and were logged as passed. This release's gate is the first to run them. Each crash test now also
fails unless its child stopped at the crash point (aborted), not merely exited with an error. -
Tests: one binary for most test files.
tests/all.rsholds 234 of the 269 test files as modules
(autotests = false); a file's tests are<file>::<test>in it (cargo nextest run -E 'test(/^pgdiff::/)'). The
35 the release gate and CI run by name, that count allocations with their own global allocator, or that set the
process's environment (which plaincargo testwould share acrossall) stay binaries of their own. -
Tests: a merge into MongoDB waits for a majority of the replica set, shown against a real three-member set
(attach_mongo::a_merge_waits_for_a_majority_of_the_replica_set, CHRONOS_TEST_MONGO_RS): with both secondaries
fsync-locked the merge doesn't return; unlocked, it lands. -
review_parse::nested_calls_take_time_by_their_depth_not_its_poweris ignored in debug builds, where 30 levels
pass the parser's stack budget (sized for release frames); release runs it. -
Breaking for the Docker image: TLS by default. The
Dockerfile's default command no longer passes
--insecure-no-tls, so a container started withoutCHRONOS_TLS_CERTandCHRONOS_TLS_KEYexits, refusing to
serve0.0.0.0in plain text, instead of serving passwords, tokens and rows unencrypted to whatever the ports are
published on. Plain text is still there, said out loud:docker run ... chronos serve /data --pg 0.0.0.0:5432 --listen 0.0.0.0:7070 --insecure-no-tlswith the ports published on127.0.0.1(engine #407). -
Tests: the known failures are committed.
tests/known_failures.txtlists the 62 tests that fail against the
release Mac's local Postgres 17 (59pgdiff,copy::same_as_postgres,schemas,index_build), in nextest's
<binary>\t<test>form. The release gate compares a full run against it, and it changes only by a reviewed commit.
Before this a full run onmainreplaced the list with its own failures, so it could never report a new one
(engine #380). -
Dependencies: no known advisories, and a gate step that keeps it so. Bumped
rustls-webpki0.103.17,
webpki-root-certs1.0.12,ctutils0.4.8,quinn-proto0.11.19,quinn-udp0.5.16,url2.5.9 and
tokio1.54.1 (RUSTSEC-2026-0382, -0383, -0385, -0523, -0524, -0538, -0592), andrusqlite0.41 for the
benchmark example (bundled SQLite, RUSTSEC-2026-0459).tools/supply-chain.shrunscargo deny(advisories,
the licence list indeny.toml, crates.io only) andcargo audit, and writes a CycloneDX SBOM; RELEASING.md
makes it a release step and the SBOM a release file (engine #408). -
Security: no agent decides the review of its own world.
REVIEW WORLD(and thereviewop and MCP tool) refused
an agent that wasn't the policy's reviewer or an admin, but an admin agent could approve the merge it had just had
held, and a reviewer its own. Now an agent that owns the world, or whose merge was held, is refused (42501) for
approve, reject and pass, as a proposal's proposer already is; another reviewer, another admin agent or a person
decides. A hold now records the agent whose merge it was (by); holds made before keep only the owner check
(engine #404). -
Corrections to earlier entries. Released sections stay as they were written; these lines correct them.
- 0.5.0's "five security fixes" and "Security fixes from a review of what a role or agent with little can do"
fixed what that review found; they don't close security work. Still open, as
docs/security.md lists: a panic
can leave internal locks poisoned until a restart; an agent made by an older Chronos needs one HTTP request
before it can log in with SCRAM; an md5 role and the mock salts show which names exist; there are no request
rate limits beyond agents' quotas and the login backoff. The storage engine has had no outside review. Since
fixed: SQL nested past 400 levels is refused (54001), and$Npast$65535(42P02). - 0.6.0's "upgrade replicas before the primary": Chronos has no replicas (one process writes a folder). Back up
before upgrading if you may need to go back. - 0.6.0's "Not yet covered by a test": a crash at every step of a merge is now tested
(tests/crash.rscut_at_every_merge_step), and crash recovery beside an attached database too
(tests/attach.rsa_crash_around_commit_is_settled,crash_matrix_postgres,
recovery_applies_intent_payload_without_validation).tests/durability.rsreplays logs the 0.5.5 binary
wrote; one segment mixing 0.5.5 and 0.6.0 records still has no test of its own.
- 0.5.0's "five security fixes" and "Security fixes from a review of what a role or agent with little can do"
-
chronos servenames the limits still off, and a production checklist. As it starts,servewarns of each
limit a server shared by agents wants that is off (statement_timeout,max_worlds,world_idle_ttl,
protect_main,CHRONOS_MAX_DISK_BYTES,CHRONOS_MAX_MEMORY_BYTES). No default changed: a cap has no right value
without the host's size, and discarding idle worlds by default would lose unmerged work.
docs/production-checklist.mdgives a starting value for each, and the tokens, TLS, encryption, anchor and backups
to set up (engine #399). -
Security: a role that isn't a superuser no longer changes WAL shipping or reads the database's state.
ALTER SYSTEM SET wal_shippingandwal_shipping_delaywere open to every role, and so wereSHOW wal_shipping,
history_retention, the system settings (max_worlds,outbox_keep_payloads, ...),STORAGE,DISK,METRICS,
SECURITY AUDIT,READERS,OUTBOX DISCARDED(the payloads of discarded effects),MERGE w EFFECTS,WORLDS,
BRANCHESandASSIGN WORLD: they are now42501 ... needs a superuser. Every statement is now classified one by
one, with no default, so a new one doesn't build until it is. A session's own settings and Postgres's (SHOW search_path,server_version,synchronous_commit, ...) stay open (engine #403). -
An agent merges its world into a table with masked columns. An agent without
unmaskhad every merge refused
(403, 42501) when its world changed a table with a masked column, through the HTTP and MCP API: masking a column made
the table read-only for agents, and failed every Gateway proposal on it (gateway #94). A merge writes rows and answers
with counts, so it now goes through; row-level security and tenants still apply. What shows rows as they are is
still refused (get,find,diff, a dry run), and a merge refused for conflicts shows each row's versions as
(masked)when the table has masked columns in the world or in the one it merges into (and its key too, when a
key column is masked). Any other refusal of such a merge that can quote rows (a conflict over MCP, one with an
attached database, a unique or foreign key, a stale read, a failed merge check) keeps only what can't: how many
conflicts, the first sentence, or the check's name. A merge with nointo
is now checked against the row-level security of the parent it merges into, as one withintowas. -
Tests: the differential tests run against Postgres 16, and only explained failures are known.
tests/PGDIFF.mdnames the reference Postgres (16, C locale, UTC,pg_trgm, port 5416) and how to start one. The
known failures, taken against the Mac's Postgres 17, go from 62 to 15, each with its reason in
tests/known_failures.txt; the five that are Chronos's are engine #450 to #454. The index-build crash test aborts
at a crash point after a known part of the build (CHRONOS_CRASH_LONG_BATCH,test-hooksonly) instead of a
timed kill that could miss (engine #382). -
Release: a Linux gate.
tools/linux-gate.shruns every test on Debian or Ubuntu with the reference Postgres 16,
the S3 store against a local MinIO, the doctests, the installer's test and the latency budgets. It writes a
summary that marks each failing test known or new. The public repository can run it on GitHub's x86_64 runner
(workflowlinux-gate), and RELEASING.md makes it a gate step: 0.6.0 to 0.6.2 were tested on macOS only
(CHRONOS-325, engine #381). -
Release: the Linux gate runs the S3 tests against moto, a local S3 server from PyPI; MinIO no longer
publishes free binaries, so the gate stopped at its download. -
Release: the first full Linux gate run (Ubuntu 24.04 x86_64, 2026-11-24, commit c50bb2f): doctests, the
installer test and both latency budgets pass; 2672 tests ran, 2652 passed, 10 known failures, 10 new. Of the
new ones, 1 was the gate lacking apostgresrole (fixed here), 7 differ by how the reference Postgres was
built (CHRONOS-344), 1 is a stalled client on Linux (CHRONOS-345), 1 a remote test under load (CHRONOS-346). -
Tests: a soak of attached write-back, and a log mixing 0.5.5 and 0.6 records.
tests/attach_soak.rs
(tools/attach-soak.sh <pg|mysql|mongo> <minutes>) merges round after round of random updates, inserts and deletes
beside Postgres, MySQL or MongoDB, killing the merge at a random write-back step or a checkpoint at a random file
step. After each round, main must hold exactly the source's rows, each merge must be in the source and main's
ledger once, and the world must be gone exactly when the source committed. Each round's seed is printed, and a
failure keeps its folder.a_log_mixing_055_and_this_release_replays_beside_postgresopens a folder the 0.5.5
release wrote beside Postgres (tests/fixtures/legacy-055-attach). It merges into the same log segment, merges
0.5.5's open world and is killed after Postgres commits, then checks main against Postgres after recovery, a
reopen and a checkpoint (CHRONOS-296, engine #391). -
A database's files are its owner's only. Its folders are created
0700and its files0600, whatever the
umask(they took it before:0644under the usual022); backups the same. Thechronosbinary sets itsumask
to077as it starts, as Postgres does. A database folder others can read or enter is made0700when it opens,
with a warning line.install.shchecks the build's signature whenevercosignis installed, not only with
CHRONOS_VERIFY=1(which now requires it);CHRONOS_VERIFY=0skips it, with a warning (engine #434). -
A transform is its type's owner's. With roles on,
CREATE TRANSFORMandDROP TRANSFORMby a role that
doesn't own the type are refused (42501must be owner of type ...), as in Postgres; any role could drop another
role's type's transform (engine #431). -
A subquery reading the outer query's aggregate gets its own answers. Its answers were cached by where its
plan sat in memory; a function body planned per call could reuse that place for another such subquery with the
same values and get the first one's rows. They are cached by the query's hash, as every other subquery's are
(engine #431). -
A STRICT SQL function in a CHECK or a generated column keeps its domain parameter's constraints. A NULL
argument skipped the call, and with it the domain's NOT NULL or CHECK:CHECK (f(x))withf(nn)STRICT andnn
NOT NULL let a NULL in. The argument is made the domain's first, as Postgres does (engine #431). -
SQL: DDL a function, trigger or DO block runs is undone with its block, as in Postgres: a DO block that fails,
a statement that fails after a function made a table, and an EXCEPTION handler's block take back the tables,
columns, constraints and functions they made or dropped, as they already took back their rows and index builds.
Each key the body's DDL writes is noted with its old value and put back on rollback (CHRONOS-294, engine #283). -
SQL: the empty text as a primary key, beside keys starting with chr(1): a range read on the key (
pk > '',
pk <= chr(1)) found too few rows, as the empty text's stored key sorts after theirs; such a range now reads
past it and rechecks. And the row is named as it is shown,t/, by the key-value API (HTTPget,put,
deleteandbatchtake an emptyid) and a merge'sRESOLVE ('t/' = ours)(CHRONOS-294, engine #286). The stored form is unchanged: no migration. -
SQL:
DROP OPERATOR CLASS ... CASCADEof a class a unique index uses, with a foreign key referencing that
index, failed with 2BP01; the key is dropped first now, asDROP ACCESS METHOD ... CASCADEdrops it
(CHRONOS-294, TODOS from engine #265). -
An index of a made access method that names no operator class now depends on the default class it took:
DROP OPERATOR CLASSrefuses while it exists, and CASCADE drops it, instead of leaving an index whose definition
no longer replays. Indexes made before this keep no class and aren't found. -
DROP FUNCTION ... CASCADEof a hash operator class's support function is refused when a temporary table
hashes its partition key with the class, as it already was for the world's tables; before, the class went and the
table's new rows routed by the built-in hash while its old rows stayed where the function had put them. -
A schema-qualified call of a set-returning function's row,
s.name(f(x)), is a call again, as in Postgres;
it was read as the fieldnameoff(x)'s rows, so a missing function returned a column instead of an error. -
Attribute notation,
p.fforf(p), findsfalong the search_path, asf(p.*)does; it took public'sf
even when an earlier schema on the path had one. -
GRANT ... ON FUNCTION(andALTER FUNCTION ... OWNER) of a built-in finds it when the search_path has a made
function of the same name, asapp.lower(integer)besidelower(text); it said the function didn't exist. -
DIFF ... AS SQLwrites a UNIQUE constraint'sDEFERRABLEandINITIALLY DEFERRED; replaying the export made
a constraint checked per statement. -
Postgres's regression suite measured again (2026-11-25, 0.6.2): 89.00% of expected lines, 67 of 219 files exact.
tools/regress_split.pysorts every difference into refused, wrong, plan, lenient and message
(docs/regress/2026-11-25.md).tests/regress_ratchet.shallows a file 1 point (none at 100%) instead of 2, and
fails a file with more wrong-answer places thantests/regress_wrong.tsv. -
Security hardening: a cast is its source or target type's owner's to make and drop (42501 otherwise), as in
Postgres. Reading from another Postgres or MySQL:channel_binding=requiretakes a login only once the server has
proved it knows the password; a SCRAM iteration count outside 4096 to 10 million is refused; a malformed URL's
error names the part, never its text. Login failures from IPv6 are counted per /64. A tenant condition sent to an
attached Postgres is an escape string, read the same whateverstandard_conforming_stringsis. The Studio's
Postgres import refuses control characters in host, user and database. -
Remotes: a write right after the remote comes back isn't refused. In
wal_shipping = sync, the upload that
let a waiting commit through cleared the "object storage unreachable" state a moment later, under another lock, so
a write in that gap was refused (58030) as if the remote were still down; a busy machine widened the gap
(remote::sync_shipping_pauses_writes_while_the_remote_is_downfailed under load on Linux). The failure is now
cleared in the same step that records the upload (CHRONOS-346). -
Security: operators are their owners'. Any role could make an operator in a schema it had no CREATE on, or
drop or change another role's; and a role's=(or<, ...) on built-in types replaced the built-in comparison
for every role and every query, soCREATE OPERATOR = (leftarg = int, rightarg = int, function = always_true)
made everywhere id = 5true. Making one now needs CREATE on its schema and EXECUTE on its function; dropping
it, its owner or its schema's owner; changing it, its owner. As in Postgres, pg_catalog's operators come first: a
bare=between built-in types stays the built-in, and a user's is called where its schema is named
(1 OPERATOR(public.=) 2) or its operand types are its own (CHRONOS-357). -
Security: a table read AS OF a moment is checked as it was then.
FROM t AS OF '-1 second'was checked
against the catalog now only, so any role read a table dropped withinhistory_retention, and a role that made
a table again under the old name read the old one's rows as their new owner. Now a table that isn't the table of
its name now (dropped, or made again by another owner) needs SELECT on it as it was then, or the read is refused
(42501), asUSE main@...already refuses it (CHRONOS-358). -
Security: request and connection rates. HTTP requests are limited per token (100 a second, or per client
address for a request with no token;CHRONOS_RATE_LIMIT, 0 for none): past it, 429 withRetry-After. New
connections are limited per client address, both ports together (20 a second,CHRONOS_CONN_RATE): past it, 503
or Postgres's 53300. Clients on loopback aren't limited. Four connections pastCHRONOS_MAX_CONNECTIONSare kept
for the admin token over HTTP, so a flood from many addresses can't lock the owner out./v1/healthand
/metricsrefuse a body over 64 KB from its header (413) instead of reading up to 32 MB before any token
(CHRONOS-305). -
Postgres: several statements in one simple Query are one transaction. Behaviour change. As in Postgres,
insert ...; insert ...; insert ...sent in one Query (psql-c, a driver'sbatch_execute, a migration tool)
now runs as one implicit transaction: a failure in the third undoes the first two, and the rest don't run. Before,
each statement committed as it ran, so a failure left the earlier ones applied with no error about them. One
statement alone, a string with its ownBEGIN/COMMIT, one with a world's statements (CREATE WORLD x; USE WORLD x; ...) or aCOPY, and statements sent inside a block the client began run as before (CHRONOS-304). -
Docs: upgrading and going back. docs/operations.md has a section on it: which releases write which data
format (7 up to 0.5.5, 8 from 0.6.0), backing up before an upgrade, restoring that backup on the old release (there
is no in-place downgrade; an older release refuses a newer folder without changing it), and keeping writes made
since. RELEASING.md says how a bad release is yanked. A test checks that a copy from before the upgrade opens and
that a newer format is refused with the message the docs quote (CHRONOS-298). -
Worlds held for review are durable. A world proposed for merge or waiting for a reviewer is now made a durable
world first, so a crash while it waits loses none of its writes and doesn't flag it. New setting
ALTER SYSTEM SET durable_worlds = held | all | off(SHOW durable_worlds):held, the default, does this;all
makes every new world durable when it's made, at an fsync per write (grouped);offkeeps the old behaviour, where
only worlds made durable by hand were (CHRONOS-262). -
A GIN index on
jsonbsays it isn't used.CREATE INDEX ... USING ginon ajsonbcolumn or expression still
succeeds (dumps restore, ORM migrations run) but now sends a NOTICE that containment queries (@>,?,?|,
?&) scan the table, and suggests indexing an expression such as((c ->> 'k')). GIN indexes on hstore, ltree,
tsvector and pg_trgm, which are used, say nothing (CHRONOS-330). -
Objects that do nothing here say so.
CREATE PUBLICATION,ALTER PUBLICATION ... ADD/SET,CREATE SUBSCRIPTION,CREATE FOREIGN TABLE,CREATE TABLESPACEandALTER TABLE ... SET TABLESPACE(to a tablespace
other thanpg_default/pg_global) still succeed with their usual tag, and now send a WARNING (01000): Chronos has
no logical replication, reaches no other server, and keeps no files in a tablespace. New session setting
chronos.catalog_only_objects = warn | error(defaultwarn);errorrefuses them with 0A000 before anything is
made (CHRONOS-324). -
Fuzz targets.
fuzz/(cargo-fuzz, nightly, its own workspace) has two coverage-guided targets:sql_parse,
any bytes into the SQL parser, andsql_run, parsed SQL run against a small fresh database, each with a seed
corpus. RELEASING.md runs each for 10 minutes before a tag; CONTRIBUTING.md says how. A wire-protocol target waits
on the framing moving into the library (CHRONOS-232). -
Soak test and Studio smoke test.
tests/soak.rs(its own test binary,#[ignore]d): mixed forks, writes,
merges, undone merges, checkpoints and restarts forCHRONOS_SOAK_SECS, every world checked against a model, then
VERIFY DATABASE, memory and open files bounded; run before a release (RELEASING.md).tests/studio_api.rsnow
calls every read the Studio makes on load and checks each answer's shape. An upgrade test from each older data
format still waits on fixtures made with those releases (CHRONOS-332). -
Login backoff counts logins as they begin, and per role. Before, 20 connections opened at once with wrong
passwords each got a try before any failure was counted; now a login counts from its start, and past the free
tries the others wait their turn (up to 10 s), so no more than the free tries reach the check. Failures are also
counted per role or agent name (Postgres port, Studio sign-in), so many addresses guessing one password share its
count. The refusal now saystoo many failed logins from this address or for this role(CHRONOS-359). -
Studio sign-in lists only the worlds a role may connect to. In
chronos studio --login, a role that isn't a
superuser was shown every world (names, owners, sizes) though SQL would not let it connect to them; now the list
holds only those it has CONNECT on (CHRONOS-360). -
Security leftovers (CHRONOS-361): cancel requests are rate-limited per client address (10 a second, 100 from all
together;CHRONOS_CANCEL_RATE), so the 32-bit cancel secret can't be guessed by flooding;GET /v1/healthgives
the exact version only to the server's or the admin token (Gateway sends its admin token for it);
CHRONOS_CLOUD_APImay be plainhttp://only for localhost, since the API key would go in clear;
chronos import postgres://user:password@...warns thatpsshows the password and points toPGPASSWORD;
install.shtakes the old GitHub-workflow signature only for tags up to v0.4.1, and checks the installed
chronos --versionis the release asked for. -
Audit items confirmed (CHRONOS-264), with tests:
UNDO MERGErefuses a put-back that would break a unique key
main took since (23505) and rebuilds the index rows it puts back; the merge ledger names the policy, its hash and
approvedwith the hold's reasons for a reviewed merge, andREVIEW WORLD ... APPROVEof a world written to since
its hold is refused (40001). -
Masking at import (CHRONOS-251):
chronos import ... --mask email=hash,phone=partial(a CSV import or a whole
Postgres database,table.colthere) replaces those columns' values before they are stored, so the folder never
holds them. Modes areSET MASKED's own (hash, format, partial, null), keyed byCHRONOS_MASK_KEYor else the
database's mask key, so hashed columns still join, across tables and with columns masked on read. A rule naming a
column the import doesn't have, or a hash into a non-text column, is refused before anything is copied.chronos attachdoesn't mask at import (merges would write masks back over real data):docs/designs/masking-attached.md. -
A refused merge retried in a loop is bounded (CHRONOS-246): it counts as one of its agent's writes toward
writes_per_minute(past it, 53400, neither counted nor logged), and a world logs at most 1,000 refusals of each
kind;SHOW MERGE OUTCOMES(and themerge_outcomesop) gainrefusals_capped, the worlds whose counts stopped
there. -
The security audit is kept on disk, with logins (CHRONOS-237): a database in a folder appends it to
audit/YYYY-MM.jsonl(sealed when encrypted), so it survives restarts and goes into backups. It now records every
Postgres login, let in or refused, and over HTTP wrong tokens and the admin token's use, each with the client's
address;SHOW SECURITY AUDITgainsSINCEand theaddrandoutcomecolumns. Its ownaudit_retention
(default 365 days, apart fromhistory_retention) only the database's own user may shorten.
chronos audit export <folder> [--since t]prints it as JSON lines. -
Shared sequence counters, pinned and said plainly (CHRONOS-312): a test pins that worlds share the database's
counters through fork, discard, merge andsetval; the worlds docs now say a discarded world's numbers stay used
(use UUIDs for numbering without gaps). Behaviour unchanged. -
ADD COLUMNwith a per-row default fills the rows there (CHRONOS-314, part A):DEFAULT gen_random_uuid(),
nextval('s'),random(),clock_timestamp()or a function of your own on a table with rows was refused (0A000);
each row now gets its own value, as in Postgres, a big table's in parts (Redo::Fill).ADD COLUMN ... serialthere
is still refused, now saying to usebigint DEFAULT nextval(...).RENAME TOstill rewrites every row (part B). -
SET LOCAL chronos.world = 'w', as a transaction's first statement, runs that transaction in world w and puts the connection back in its own world at COMMIT or ROLLBACK, so a pooler in transaction mode (PgBouncer, Supavisor, RDS Proxy) never hands the next client someone else's world.SET chronos.worldisSWITCH WORLD;DISCARD ALLputs the login world back. See operations' "Behind a connection pooler". (CHRONOS-310) -
chronos importbrings Postgres's roles (and memberships), tables' owners, row-level security with its policies, and grants (tables, views, sequences, columns, schemas, functions, default privileges). Passwords only with--with-passwords;--no-roles,--no-privileges,--no-policiesleave each out, as in pg_dump. Anything refused is listed with its statement, and a table protected there but open here prints a WARNING and fails the import unless--allow-open-tables. (CHRONOS-303) -
A world statement refused inside a transaction (25001) has a HINT naming each driver's autocommit setting (psycopg, JDBC, SQLAlchemy) and
SET LOCAL chronos.world. Tests pin that arrays compare element by element and thatROLLBACK TO SAVEPOINTtakes back temporary tables; the compatibility page no longer says otherwise, and says the Docker image has tzdata. (CHRONOS-290, in part: enum columns still reach clients typedtext, andANALYZEstill keeps no statistics) -
chronos verify <folder>checks a closed folder, and--salvage <new folder>copies every row that can still be read of a damaged one into a new folder, world by world, past pages that are missing or fail their hash, and prints the key ranges lost (exit 1 if any). The damaged folder is only read. Operations has a "When a page is corrupt" runbook. (CHRONOS-271, in part: the background scrub isn't built) -
A refresh on the timer skips the rows of tables Postgres shows unwritten (CHRONOS-291).
serve --refresh-everyread every attached table whole each time. It now askspg_stat_user_tablesfirst (rows
inserted, updated, deleted, live and dead, and the table's file, which a truncate replaces; partitions summed),
read before the refresh's snapshot, and leaves the rows of tables whose counts haven't moved since the last refresh
unread (unreadin the answer); their columns are still checked. Every table is still read at least hourly, after a
restart, while a column waits for values, and withtrack_countsoff. Postgres counts a write about a second after
its commit, sochronos refreshand/v1/refresh(asked for, usually right after a change) still read every
table. Postgres only; MySQL, MariaDB and MongoDB unchanged. -
chronos eval: agent tests on copies (CHRONOS-263).chronos <folder> eval <runs.json> [--gold gold.sql] [--jobs N] [--keep] [--json]gives each run its own world forked from main at one moment. A run is a SQL file, or
a shell command that gets its world'sDATABASE_URL(Postgres served on a free loopback port, as the database's
own user; no sandbox). Up to--jobsruns go at once (4 by default). The report has a row per run: rows changed
per table, the rules of its merge policy it breaks, the merge checks it fails, conflicts with main, and with
--goldthe rowsDIFF WORLD gold TO runreturns. Nothing is merged, and the worlds are dropped unless--keep.
A run that fails (SQL error, non-zero exit) fails the eval. The agent evaluation guide uses the command. -
chronos rehearse: a migration tried on a copy first (CHRONOS-261).chronos <folder> rehearse <migration.sql> [--checks checks.sql] [--json]forks main and runs the migration there a statement at a time, each
timed, stopping at the first that fails. The report has the rows it rewrote per table, the rows left breaking a
constraint (first 5), the checks of--checksthat return rows (a check is a query that should return none), and
whether it would merge. A NOT NULL that fails says how many rows hold the null. The copy is dropped and main is
never written; exit 1 when it fails. See docs/guides/migration-rehearsal.md. -
Docs: data deletion, residency and keys (CHRONOS-339). The security guide's new section says what a
DELETE
removes, and when: queries at once; history and the log at the first checkpoint afterhistory_retention;
backups only when you delete them. Pages on disk are not scrubbed: a deleted row's bytes stay in a pack file
until the cleanup rewrites that pack, with no time limit. It also says how to purge sooner, that the data is
wherever you run the server and its bucket, and that the encryption key is yours. A new test checks that a
deleted row leavesAS OFonce the window has passed and a checkpoint has run. -
Client certificates on the Postgres port (CHRONOS-308).
chronos servetakes--tls-client-ca ca.pem
(CHRONOS_TLS_CLIENT_CA) and--tls-client-cert off|optional|require(CHRONOS_TLS_CLIENT_CERT; off by default, a
CA alone means optional). A certificate signed by that CA whose CN is the user name logs that role or agent in with
no password, as Postgres'scertlogin does. Withrequire, a connection without one fails the handshake, and
one naming another user is refused (28000). Without a certificate underoptional, logins work as before,
channel binding included. The HTTP port verifies the same certificates but still identifies requests by token.
Not yet: CRL/OCSP, LDAP, GSSAPI. -
Docs: two-phase commit is refused (CHRONOS-331). The Postgres compatibility page now names it beside
SERIALIZABLE.max_prepared_transactionsis 0,PREPARE TRANSACTIONrolls back (55000 inside a transaction),
andCOMMIT PREPARED/ROLLBACK PREPAREDfind no such transaction (42704). A test reads
max_prepared_transactionstoo. -
Postgres compatibility: four catalog and output differences closed. pg_settings no longer lists
extension_destdir, a setting only Debian's Postgres packages add (#451).xpathreturns a namespace node as libxml
writes it,xmlns:foo="uri", not its URI alone (#454).'x'::bpcharis a bpchar, not text: a view comparing a
char(n) column with a literal is written back asc = 'x'::bpchar, as Postgres writes it, where it read
(c)::text = 'x'::text(#453). hstore's and ltree's types and functions, and pgvector's and bloom's index handlers,
are rows of pg_type and pg_proc once CREATE EXTENSION made their extension, in its schema and its members in
pg_depend, as Postgres has them, so pg_dump writes the CREATE EXTENSION and no CREATE TYPE; before, they were in
pg_catalog whether it was made or not (#450). A column of hstore or ltree in a world that never made the extension
still finds its type, in pg_catalog. The values work either way, as before.
Every change in detail: https://github.com/2090-labs/Chronos-DB/blob/main/CHANGELOG.md