Repository navigation
v0.1.11
Highlights
SQL's everyday spellings read as FenecQL. INSERT … ON CONFLICT, UPDATE … RETURNING, NOT IN, LIKE, then JOIN (a lookup, answered as flat rows), DISTINCT, EXISTS, CREATE TABLE/INDEX and pgvector's <->, <=>, <#>. One parser and one AST on every surface; what cannot keep SQL's meaning is refused, naming the FenecQL to write. Agents writing SQL by habit passed on the first try 30–35% of the time against 0.1.10's parser and 74–94% against this one, and within three tries 61–74% and 98–100% (the same 40 tasks, two runs, tools/agent-eval). New page: From SQL.
Typo-tolerant, search-as-you-type match. match … fuzzy [N] and prefix. With a typo in each query, nDCG@10 goes from 0.636 to 0.663 on SciFact and from 0.213 to 0.229 on FiQA. A text index also holds a word in 9 bytes of a table and 16 of a term, not 88 and three allocations: 500 tenants with live text indexes took 375 MB, now 173.
Writes that pick, wait and guard – what an app used a queue for.
set/del … order … limit … returningpicks and answers its rows: a claim of ten over a million jobs takes 18.7 µs against a scan's 132.7 ms; 16 threads move 185.8k jobs/s against 93.8k for read, then compare-and-set.Fenec-Wait: <ms>holds a claim that wrote nothing until it can: 0.38 ms p50 to a held worker, against 0.83 ms polling every 10 ms.ordertakes an expression andputtakesreturning: the nearest of 300 000 ready orders is claimed in 0.059 ms, where three statements took 0.135.put … if absent else setupserts;require <n>makes a write's or aget's row count a condition (412);limit,offsetandtoptake parameters.
Indexes, types and aggregates.
@sorted(owner, created desc),@unique(org, slug): a user's latest 20 of a million posts in 6.3 µs, against 11.8 through@hashand 21 ms by scan.email text nocase: compared by Unicode case folding, kept as written.geopoints withdistance,within,near,@geo: 7.2 µs within 100 m over a million points (Redis 12.6 µs, PostGIS 1.26 ms).- Expressions in
select,groupby several keys,bucket(at, 1d, 'Europe/Berlin'),first/last,count(distinct),having,approx_count_distinct: 60 one-minute bars in 1.7 ms, where 120 queries took 195.
Access control. A JWT reaches only the tenant it names. Grants per operation, update(a, b) and read(a, b) by field, append-only collections, transitions (new.) and rules that read another collection. An empty token is no token.
Writers wait for less. Long reads run on a pinned copy with no lock held (a ledger's reconciliation held transfers 187–512 ms, now 5–29). A hash or text index grows a 256th at a time (longest put at 4 million keys: 235–267 ms, now under 4). A file is compacted before it outgrows the page cache (5M updates in a 2 GB container: 358–511 s, now 80–100).
Regions and tenants. Nodes have a region and a zone; a tenant lives in its node's region, its copy in another zone. A region can keep its own directory and lease and fail over by itself, so one cut off from the global router goes on writing (1 s lease: tenants writing again on replicas 1.41–1.70 s after the cut). A tenant can keep read replicas in other regions; a nearby router answers marked reads from them, never from before the client's own write (Frankfurt to Singapore was 158 ms a read). One URL reaches every region through a Cloudflare Worker. Tenants get quotas, POST /_shard/query merges a read across them, and fenec archive --tenants archives a node over one connection: 1 000 tenants held 16 node threads, a stream each 1 016.
Failover and leases hold under delay. A grant read late gives no lease past a failover; the lease runs on the boot clock, so a suspend counts; a write answered after its lease lapsed returns 500 "outcome": "unknown", not 200; lease rounds no longer drift (1.18 s apart under load, now 1.00 s). A failover ends the requests the router had out to the node it left: in the drill its writers wrote again 1.9–2.5 s after the kill, not 3.9. A replica that failed to attach is retried and counted (fenec_router_tenants_unreplicated); a connection no thread can be made for gets 503 with Retry-After, not a reset.
Around the database. fenec-server --studio serves a grid, query editor, schema and live views at /_studio/, with no authority beyond the token you paste; the site's Playground is the same studio. --mcp and fenec mcp give agents schema, search, query and get tools. Request ids, OTLP traces, Datadog and Grafana packs. deploy/ holds systemd units, a runbook, alert rules and make drill, a two-region failover drill (three runs: 41 577 writes acknowledged, 0 lost). Every SDK can read near a tenant's replica; the Swift, Kotlin and Dart remotes also batch with idempotency keys. New docs pages: Analytics, Geo, Queues, Studio, MCP, Build from source; the Quickstart now starts from what a registry holds (the playground, npm, the image or a release tarball, the shell), each path a few commands with the output to expect, and every code block has a copy button. A collection picked in the studio's query editor goes in only where the caret was put.
Fixes
- A JWT minted for one tenant read every other tenant on a
--dirnode. - Guessing tokens was not slowed: a refusal's wait restarted on any answer but a 401, and
Fenec-Afterheld a thread up to 30 s before its token was asked. - The shell ran each closed line:
del noteswithwhere id = 3under it deleted every row. - The router answered 502 after a quiet minute on macOS, sent a write twice when a node closed, and deadlocked at start and on a refused move.
limit 5000000000wrapped to 705 million in the browser module.
Upgrading from 0.1.10
- Files. 0.1.10 refuses a file with a
geofield, an index over several fields or anocasefield (type tags 15–17, index kind 10); there is no going back. On Linux a durable write also syncs<file>.sync; after a power loss open the database before copying it. - Behaviour.
requiredrefuses an explicitnull.ORDER BY 2andGROUP BY 1(withBY) are places in the list;order 1is unchanged. The slow log is JSON; an admin event'sstatusishttp_status. - Tokens. A JWT needs
exp(--jwt-require-exp off) and, on a--dirnode, atenantclaim (--jwt-unbound-tenantsrestores the old reach).updateanddeletegrants needread. An empty token flag is refused at start. - Defaults. A
--dirnode setting neither--tenant-max-streamsnor--tenant-max-heldgives each a quarter of--max-connections. - Size.
fenec.wasmis 273 KB brotli (279 434 bytes), from 183 (187 831). - Rolling upgrade. Standbys before primaries, nodes a zone at a time, the entry Worker last; every router before regions are turned on. A late grant is covered once routers and nodes both run numbered grants; a node holding a lease term refuses an older router until restarted.
What's Changed
- Where one request's time goes, and the durable gap closed by @furkankinyas in #223
- AGENTS.md is written from CLAUDE.md, and CI holds them together by @furkankinyas in #224
- Site: one menu on a small screen, the sidebar kept in place, the home's dunes on every page by @furkankinyas in #225
- Playground editor coloured as it is typed, every home session in its language by @furkankinyas in #227
- Site: the band under the header rises in and moves on scroll as the home's dunes do by @furkankinyas in #228
- CI runs the highlighter test by @furkankinyas in #229
- Security and correctness gaps from the real-world spike by @furkankinyas in #230
- The site searches itself, with fenecdb in the reader's tab by @furkankinyas in #226
- fenec-server's one-client read gap: a plain get written as JSON from the stored rows by @furkankinyas in #233
- A shop on fenecdb: Next.js over fenec-server, measured and tested by @furkankinyas in #232
- The shop pins the patched tmp and uuid under its Lighthouse CLI by @furkankinyas in #234
- The shop's tmp override goes to 0.2.7 by @furkankinyas in #235
- Security gaps 2: per-operation grants, append-only, list claims, distinct subquery bound, get require, scoped BM25 by @furkankinyas in #236
- Two flaky file tests: a compact's dead copies, and a lock a child process held by @furkankinyas in #238
- The shop's gaps closed: client batches, warm-up, disjunctive and range facets, polling by @furkankinyas in #239
- A payments ledger example: guarded blocks, an append-only journal, reconciliation, a sink by @furkankinyas in #240
- Expressions in select, aggregates over them, group by several keys and bucket, count(distinct), first/last by @furkankinyas in #241
- Close the six gaps the payments ledger hit by @furkankinyas in #242
- The site's fonts come from it, and their fallbacks take the room they will by @furkankinyas in #243
- Trellis: a multi-tenant team workspace with auth, tenancy and security on fenecdb by @furkankinyas in #244
- Kestrel: product analytics and market data on fenecdb, an example by @furkankinyas in #245
- Trellis's six gaps closed: preflight, token expiry, the router's refusal wait, scoped live queries, shape subscriptions, a tenant's schema by @furkankinyas in #246
- fenec studio, part 1: serving, connection, collections and the data grid by @furkankinyas in #247
- Request ids, and fenecdb under Datadog and other monitoring systems by @furkankinyas in #248
- Close the analytics gaps: ordered hash buckets, upsert, put $n, Fenec-Seq on /_changes, approx_count_distinct, having by @furkankinyas in #249
- archive: each verify restores into a probe file of its own by @furkankinyas in #250
- fenec studio, part 2: the query editor, the schema, the live rows and the admin view by @furkankinyas in #251
- OpenTelemetry tracing for fenec-server and fenec-shard by @furkankinyas in #252
- The Playground is fenec studio, over a database in the tab by @furkankinyas in #255
- A long read is pinned, and read with no lock held by @furkankinyas in #256
- A compact holds the writer back less: catch-up off the lock, its file asked for ahead, a look that waits by @furkankinyas in #257
- Write stalls: a hash index grows a 256th at a time, a write waits for no fsync by @furkankinyas in #258
- A job queue's claim: set and del pick their rows and answer them by @furkankinyas in #259
- A text index's terms and a vector index's copies grow a 256th at a time; one hash a lookup by @furkankinyas in #260
- Points: a geo type, distance and within, @geo, and near over a point by @furkankinyas in #261
- Grafana reads fenecdb's data through the Infinity plugin by @furkankinyas in #262
- A health probe asks before any check of the server's configuration by @furkankinyas in #263
- The router's refusal test reads the counts, not the clock by @furkankinyas in #264
- A graph record carries the copies table's hash halves: no pause on the first put after an open by @furkankinyas in #265
- A claim held until a job comes: Fenec-Wait on a write by @furkankinyas in #266
- The browser module hashes as a native build does and takes the halves; a record's halves read beside its lists by @furkankinyas in #267
- fenecdb-datasource: a Grafana data source that binds FenecQL's values by @furkankinyas in #268
- Tests read the clock from below; one lease grant to a node at a time by @furkankinyas in #270
- limit, offset and top take a parameter: every page of a list is one statement by @furkankinyas in #269
- Per-tenant quotas: file bytes and rows as a block lands, streams, requests and rates at the node by @furkankinyas in #271
- Indexes over several fields: @sorted(owner, created desc), @unique(org, slug) by @furkankinyas in #273
- A synced write a tenant's quota refuses is put back, and a 429 waits as long as the server says by @furkankinyas in #274
- A text compared by its case fold: email text nocase by @furkankinyas in #275
- The browser module in features: a core of 145 KB brotli, and what each part costs by @furkankinyas in #276
- What is core, and why one module ships by @furkankinyas in #277
- Instead of Redis: every pattern, its recipe, and what is not done by @furkankinyas in #278
- Every 503 says when to come back in its body; the router test's 200 [] was its claim's wait by @furkankinyas in #279
- fenec-shard --http-cors: the router's own answers and preflights, and one rule on what it forwards by @furkankinyas in #281
- An agent's search and memory over MCP: fenec-server --mcp and fenec mcp by @furkankinyas in #280
- The core's diet: what it held twice or for one use, and count(distinct), first/last and having in it by @furkankinyas in #283
- A refusal's count starts again only where a token is verified by @furkankinyas in #282
- YCSB: Redis beside the others, harness first (roadmap 62.6) by @furkankinyas in #284
- A request's token comes before any wait it asks for by @furkankinyas in #285
- examples/dispatch: Plover, courier dispatch, and the gaps it found by @furkankinyas in #286
- A file is compacted before it outgrows the page cache, and a compact that would not fit writes past it by @furkankinyas in #288
- A node's span outlasts the router's forward by its write; every span on one clock by @furkankinyas in #287
- Scoped access: returning held to the read rules as written, and transitions (new.) in a policy by @furkankinyas in #289
- fenec-shard: look at a pooled connection before using it; send again only what the node cannot have run or may run twice by @furkankinyas in #290
- Claim the nearest in one statement: order by an expression, put returning, the exact walk everywhere, a clash's stored value by @furkankinyas in #291
- lookup over a key of several fields: on (org, order) = (org, id), a run of a composite index by @furkankinyas in #293
- Held claims woken by what they read and given by rank; quotas to the millisecond and by rows; an expiry told at its time by @furkankinyas in #292
- The studio's first load is 63 KB gzipped by @furkankinyas in #295
- CI runs for the merge queue by @furkankinyas in #296
- Every test's servers on ports the system picks by @furkankinyas in #294
- lookup: a level that folds and lookups off groups; bucket by a zone's clock by @furkankinyas in #297
- Held writes: one request looks for every group, among the rows written since by @furkankinyas in #298
- access: read(a, b) shows a row the fields of the rules admitting it, and holds what a statement does with the rest by @furkankinyas in #300
- access: a policy rule may read another collection through an inner get by @furkankinyas in #299
- kotlin, dart tests: offline before the next write, the sync's queue waited for by @furkankinyas in #301
- shard: a query across tenants at the router (POST /_shard/query) by @furkankinyas in #302
- match: fuzzy [N] and prefix -- typo tolerance and search-as-you-type by @furkankinyas in #303
- engine: a block's documents built beside the readers, its buffer written behind the lock (G4) by @furkankinyas in #304
- CLAUDE.md: what had gone stale, checked against the code by @furkankinyas in #305
- ycsb: a size read through a container is read after the cell, not beside it by @furkankinyas in #306
- ycsb: every server cell measured in one night, Redis beside them by @furkankinyas in #307
- CLAUDE.md: the memory trigger beside a ballast, measured again by @furkankinyas in #308
- studio: the scroll test counts a read until its body is in by @furkankinyas in #309
- Stale text: the module's sizes measured again, and comments the code outgrew by @furkankinyas in #310
- The site's search asks for a question's meaning too, and fuses it in the tab by @furkankinyas in #231
- site: the deploy keeps the vectors it embedded by @furkankinyas in #311
- site: every section's vector committed, from the deploy's Workers AI by @furkankinyas in #312
- Bump sharp from 0.35.4 to 0.35.5 in /crates/fenec-bench/beir by @dependabot[bot] in #272
- Bump sharp and wrangler in /integrations/cloudflare by @dependabot[bot] in #254
- Bump source-map-js from 1.2.1 to 1.2.2 in /integrations/react by @dependabot[bot] in #253
- A query across tenants merges text in a collation and by a case fold by @furkankinyas in #313
- Open a checkpointed file on every core, and time make compare's open as SQLite's by @furkankinyas in #314
- A REST insert and the native library's write of many documents build them beside the readers by @furkankinyas in #315
- The native library writes its buffer behind the lock, as a server does by @furkankinyas in #316
- A Durable Object keeps its database in SQL rows, a write one row by @furkankinyas in #317
- A tenant lives in its node's region, and its copy in that region in another zone by @furkankinyas in #318
- A region keeps its own directory, and leases and fails over inside itself by @furkankinyas in #320
- A text index's word takes 9 bytes of a table and 16 of a term, not 88 and three allocations by @furkankinyas in #319
- studio: Chrome's own files are read before its first launch, out of the 30 s it is given by @furkankinyas in #324
- A Durable Object's alarm keeps its database: the @Ttl sweep, an image by rule, a reload by @furkankinyas in #323
- Every tenant of a node archived over one stream: fenec archive --tenants by @furkankinyas in #322
- A move whose flip the directory refuses is put back, not hung on its own lock by @furkankinyas in #325
- One URL for every region: a Worker that sends each tenant to its home region's routers by @furkankinyas in #326
- A tenant keeps read replicas in other regions, and reads near them never come from before the client's own writes by @furkankinyas in #321
- The routers read the client the global entry names (--entry-token) by @furkankinyas in #327
- Archive tests restoring among their writes wait for the image and the line the restore starts from by @furkankinyas in #329
- The router follows a held request's client, reads a node's body into an allocation that can fail, and asks a silent replica's health off the request path by @furkankinyas in #328
- Lighthouse CI slows the CPU to a mid-tier phone on every runner rather than by 4x by @furkankinyas in #330
- Refuse an answer with no length on the router's own calls; allocate a PostgreSQL message fallibly and hold its counts to it by @furkankinyas in #332
- The Swift, Kotlin and Dart remotes read near a tenant's read replica by @furkankinyas in #331
- A subscription and /_changes wait for Fenec-After as a read does by @furkankinyas in #333
- README, the home page and the docs index name regions, the global entry and read replicas; the search cache from the latest deploy by @furkankinyas in #335
- site: the vectors of the six sections #335 changed by @furkankinyas in #337
- An empty token is no token: refused as a flag, unset from the environment, none in the library by @furkankinyas in #338
- FenecHttp.live reads its runs near, after the change its stream at home told of by @furkankinyas in #334
- site: the vectors of the sections #334 and #338 changed by @furkankinyas in #339
- A dead node holds up no other node's lease; a promotion waits out no reconnect by @furkankinyas in #340
- site: search vectors of the sections #340 changed by @furkankinyas in #341
- deploy/: systemd units, runbook, alert rules and a two-region failover drill by @furkankinyas in #336
- site: search vectors of the sections #336 changed by @furkankinyas in #342
- fenec-shard tests: no bound a machine under load can miss where the test means none (read replicas) by @furkankinyas in #345
- The site and README lead with the general database; stale home figures put right by @furkankinyas in #346
- site: search vectors of the sections #346 changed by @furkankinyas in #347
- A grant a node reads late runs no lease past its failover by @furkankinyas in #343
- The quickstart and the home page's language sessions open with what any app does, vectors after by @furkankinyas in #348
- deploy, Dockerfile: an image's binaries are built from the sources it was given by @furkankinyas in #349
- site: search vectors of the sections #343 and #348 changed by @furkankinyas in #350
- tools/agent-eval: agents querying fenecdb in FenecQL against the SQL they know (240 runs) by @furkankinyas in #355
- Fix a router that deadlocks at its start: serve_on read its directory twice beside the leasing thread's first grant by @furkankinyas in #352
- The router counts a request before its answer is written (entry.test.js's move test, one request over) by @furkankinyas in #351
- tools/agent-eval: condition C and A again over the SQL-spellings branch (#356) by @furkankinyas in #358
- The shell runs a statement once nothing after it can go on with it: del notes with where id = 3 under it deletes one row by @furkankinyas in #354
- Fix a router that never read a node's "ran": a node that ran its lease is counted by it, not the record by @furkankinyas in #357
- Leases: the node's lease on the boot clock, a write answered after its lease lapsed is not a success, and a VM paused by its host researched by @furkankinyas in #353
- A failover ends what the router had out to the node it moved tenants off by @furkankinyas in #344
- fenec-ql: SQL's everyday spellings read as the FenecQL they mean, the rest refused saying what to write by @furkankinyas in #356
- site: the search vector cache as #356's deploy left it by @furkankinyas in #359
- CLAUDE.md is the working summary again: each invariant its rule, the long form in docs/design/ by @furkankinyas in #360
- .claude/agents: three subagents, each on the model its role needs by @furkankinyas in #361
- A router following the directory ends what it had out to a node failed over by @furkankinyas in #362
- FenecQL reads SQL's joins, DISTINCT, EXISTS, CREATE TABLE/INDEX and pgvector's distance (SQL spellings, part 2) by @furkankinyas in #367
- site: the search vector cache as #367's deploy left it by @furkankinyas in #368
- Lease tests under load: count renewals, wait as long as the router, two lease-round fixes by @furkankinyas in #369
- Lighthouse CI reads Chrome's files before its first launch (shop, analytics) by @furkankinyas in #370
- read_replicas: a test binary of its own, under macOS's thread cap; four of its tests wait for what they assert by @furkankinyas in #372
- fenec-shard: a replica whose attach failed is tried again, and a file the router left is reported by @furkankinyas in #371
- A connection no thread can be made for is answered 503, not reset by @furkankinyas in #373
- site: the search vector cache as #373's deploy left it by @furkankinyas in #374
- CLAUDE.md: trim from 63 800 to 55 752 bytes, keeping every rule and link by @furkankinyas in #375
- docs: the Grafana page's screenshot keeps to the column by @furkankinyas in #376
- studio: a collection picked in the query view goes where the caret was put by @furkankinyas in #377
- Docs: install first -- a Quickstart of independent paths, Build from source, a build-written version, copy buttons by @furkankinyas in #378
- 0.1.11 by @furkankinyas in #379
- autocompact tests: hold each compact to the writes it met, not the file's peak by @furkankinyas in #380
- swift-binary: build fenec-shard for the Swift tests by @furkankinyas in #382
- Package.swift: the XCFramework of v0.1.11 by @furkankinyas in #385
Full Changelog: v0.1.10...v0.1.11