# StreamBrew readiness on current BoxDB
The current working tree supplies the core primitives needed by StreamBrew: **exact native decimals with rounded division, asynchronous TypeScript transactions, Go access, structured errors, safe writable-transaction defaults and enforced read-only transactions**. Same-client auth requests wait for their transaction; cross-connection auth writes now acquire the writer before invoking the callback. The Unicode text_like defect is also fixed locally. No additional mandatory BoxDB capability was identified when application/query rewrites are allowed. Full application parity still requires real auth/session, money-query, worker, deployment and recovery integration. [Decimal contract](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/native-decimal.md#L19-L58), [current TS transaction contract](../../packages/typescript/README.md), [current Go contract](../../packages/go/README.md).
Sources checked on 2026-10-14: the original BoxDB assessment used [`119e53600394201f0038d4537189e7e4fa5c3d43`](https://github.com/lebedev-nikita/boxdb/tree/119e53600394201f0038d4537189e7e4fa5c3d43), with integration rebased and rechecked on [`e95f6c4987eed0222956e06d3ba9ef835a38ed0c`](https://github.com/lebedev-nikita/boxdb/tree/e95f6c4987eed0222956e06d3ba9ef835a38ed0c). StreamBrew was inspected at [`9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2`](https://github.com/streambrew-app/streambrew/tree/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2). This is a capability assessment, not a completed migration. This branch fixes the text_like matcher and changes the TS/Go transaction helpers to immediate by default, with enforced read-only support and public regression tests. The earlier source links describe the original inspected commit; updated temporal/JSON contracts are linked below. No application schema or deployment was changed. Backward compatibility is not a requirement, so callers/schema declarations should adopt current APIs directly.
## Capabilities already covering the workload
| StreamBrew need | Current BoxDB capability and boundary |
| --- | --- |
| Exact donations/queue money, arithmetic/order/constraints | Native DECIMAL supports ordinary operators, comparison, grouping, indexes, aggregates and exact calculated values. decimal_div and decimal_round provide explicit scale/modes. Money travels as exact strings in TS/Go. NUMERIC is no longer supported; use DECIMAL(38,18)/DECIMAL(20,2). [Native decimals](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/native-decimal.md#L19-L58), [Go values](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/go/README.md#L119-L124), [current source domains](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/db/schema.sql#L70-L98). |
| Nonblocking web queries, exclusive transaction ownership, cancellation and backpressure | Each TS connection owns a native worker; explicit begin/commit/rollback handles, nested savepoints, AbortSignal, busyTimeoutMs, maxPendingQueries, readOnly, drain/abort close and diagnostics exist. Unrelated root queries and begin requests wait until the whole transaction finishes, then execute independently. Writable helpers default to immediate; readOnly transactions use deferred with a native write guard. Default TS transaction lifetime is five seconds, with client/per-begin overrides and rollback on expiry. [Current transaction contract](../../packages/typescript/README.md), [options](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/typescript/README.md#L139-L166). |
| Go chat/donations/video/alert persistence | database/sql over the same Rust engine provides contexts, prepared/named parameters, pooled connections, transactions, affected rows, typed validation/extensions and interruption of queries/lock waits. [Go contract](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/go/README.md#L71-L110), [current Go store usage](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/internal/videoingest/store.go#L8-L36). |
| Distinguishable constraints, busy/cancel and logical failures | Rust/TS/Go expose BOXDB_* plus optional primary/extended numeric codes. Go retains cancellation and engine failure via joined errors; causes and cleanup failures are preserved. No missing Go metadata bridge remains. [Cross-language errors](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/client-errors.md#L3-L56), [Go error object](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/go/boxdb.go#L17-L27). |
| Auth models, field/date/boolean mapping and atomic auth operations | A direct Better Auth adapter exists, with schema generation, transactions, consumeOne/incrementOne, mapped fields and result conversion. Tests cover email sign-up/sign-in/session/sign-out, rollback, mappings and atomic counters/consumption. This removes the former need for a synchronous Kysely driver; it does not yet prove StreamBrew's Google/imported-session integration. [Adapter](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/better-auth-adapter/README.md#L21-L41), [auth tests](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/better-auth-adapter/test/integration.test.ts#L12-L187). |
| Russian/English donation search | text_lower/text_casefold, text_nocase, text_like, regex and FTS5/trigrams exist. The local text_like fix handles zero-length percent matches and backtracking; lower+LIKE with ESCAPE remains available for literal wildcard searches. [Functions](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/extensions.md#L8-L15), [source search](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/apps/web/src/server/sensors/db/store.ts#L50-L86). |
| Shared local persistence, constraints and durable jobs | Binary WAL, foreign keys, checks/partial indexes, transactions, SQLite triggers, conditional UPDATE/RETURNING and generated columns already provide the required primitives; typed migrations and logical dumps exist. [Storage](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/storage.md#L3-L25), [migrations/dumps](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/migrations.md#L30-L102), [generated columns](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/tests/generated_columns.rs#L3-L100). |
## Monetary parity requires the correct existing API
StreamBrew currently uses `round(amount * numerator / denominator,2)`. BoxDB's ordinary DECIMAL division deliberately rejects a nonterminating quotient **before** outer round can execute; PostgreSQL's numeric pipeline does not have that same restriction. Native exact arithmetic therefore does not make the current SQL unchanged-compatible. [StreamBrew conversion](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/apps/web/src/server/video-queue/postgres.ts#L479-L489), [division policy](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/native-decimal.md#L26-L42).
Use the existing `decimal_div(amount * CAST(? AS DECIMAL), ?, 2, 'half_up')` for configured numerator/denominator conversion: exact multiplication, then one rounding of the rational quotient. half_up rounds ties away from zero, matching the intended money policy; do not substitute half_even by default. Bind text for exact rates, cast parameters where a native decimal expression requires it, and never introduce JS Number/REAL conversion. Column scale is validated without implicit rounding. [Rates](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/packages/src/currency.ts#L23-L31), [exact one-rounding implementation](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/src/decimal.rs#L70-L110), [parameter/precision contract](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/native-decimal.md#L14-L17).
Priority affordability can avoid division entirely: compare `queue_amount * 60 >= min_price_per_minute * duration_seconds`. Positive duration makes this equivalent at the exact threshold; plain native DECIMAL ORDER BY now supplies numeric priority order. This is a query rewrite using existing functionality, not a remaining engine addition. [Current priority formula](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/db/schema.sql#L204-L211), [duration constraints](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/db/migrations/20260909000000_initial_schema.sql#L275-L286).
**Acceptance:** reverse-rate recurring fractions, positive/negative ties, values beyond JS-safe integer range, scale-18 donation values, DECIMAL(38,18)/(20,2) bounds, exact threshold equality and both sides, whole-currency-change rollback and one-rounding consistency across CLI/Rust/TS/Go.
## Shared auth requests and cross-connection writer contention are covered
Root requests queue behind the entire active TS transaction. Transaction work bypasses blocked roots; after commit or rollback, roots execute independently in submission order. A shared-client probe previously confirmed overlapping adapter transactions, findMany, getSession HTTP 200 and rollback isolation. The current defaults additionally address independent writers. [Root scheduling](../../packages/typescript/src/database.ts), [waiting tests](../../packages/typescript/test/api.test.ts).
Both TS db.begin() and Go Begin/BeginTx acquire the writer with BEGIN IMMEDIATE by default. The Better Auth adapter already calls client.begin(), so it receives the policy without a separate transactionMode option. A new public adapter regression holds another connection's writer transaction: the callback stays uninvoked while waiting, then runs exactly once and creates one user after release. The earlier default-deferred BOXDB_BUSY reproduction is therefore addressed through the SDK. Waiting uses the existing busy timeout/cancellation, not transparent repetition of the callback. [SDK implementation](../../packages/typescript/src/database.ts), [auth regression](../../packages/better-auth-adapter/test/integration.test.ts), [Go helpers](../../packages/go/boxdb.go).
Read-only work uses TS begin({readOnly:true}) or Go sql.TxOptions{ReadOnly:true}: deferred acquisition plus a native query_only guard. Tests confirm stable binary WAL snapshots alongside an independent writer, prohibition of writes through prepared/tagged queries and scripts, resistance to PRAGMA query_only=OFF, savepoint inheritance, cancellation/timeouts and writable reuse after cleanup. TS preserves a pre-existing query_only setting. Go's normal pool reset clears its managed restriction. Typed metadata is refreshed for reads while writer-validation installation is deferred until writes are permitted again; an INSTANT concurrency regression verifies both reading and later write validation. [TS regressions](../../packages/typescript/test/options.test.ts), [Go regressions](../../packages/go/boxdb_test.go), [shared core](../../src/lib.rs).
A reusable pool remains optional for parallel reads. SQLite still has one writer per database file. Read-only connections automatically start read-only TS transactions; explicit deferred/exclusive writable modes remain available in TS. Native SQL BEGIN retains SQLite's own semantics. None of these changes introduce an engine pool, row-lock engine or callback retry requirement.
## Transaction deadlines and caller scope
Transactions have a configurable five-second default lifetime starting after BEGIN succeeds. Savepoints inherit the outer deadline. Expiry interrupts SQL, cancels queued transaction work, rolls back and only then releases waiting root requests. A fresh probe confirmed that running and queued transaction statements fail with BOXDB_TRANSACTION_TIMEOUT while a waiting independent root write succeeds after rollback. This covers the required deadline primitives; longer import operations can set an appropriate timeout. A total request deadline including queue wait uses the existing AbortSignal separately. [Deadline contract](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/typescript/README.md#L92-L129), [deadline tests](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/typescript/test/options.test.ts#L7-L128).
Work intended to belong to a transaction must use its tx handle/adapter. Awaiting the root BoxDB from inside its own transaction waits until the transaction ends, which can mean timeout/rollback followed by the root operation executing independently. This is documented caller behavior, not a demonstrated StreamBrew defect; the Better Auth callback correctly receives a transaction-scoped adapter. Automatic async-context routing or misuse guards would be optional ergonomics. [Caller contract](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/typescript/README.md#L84-L111).
## Auth version, schema and session verification
The BoxDB adapter declares Better Auth **^1.7.7**, while StreamBrew is locked to **1.6.29** and uses PostgresJSDialect/search_path=auth with custom auth model names and Google OAuth. Upgrade the application dependency/configuration and test it; do not claim the current lockfile can adopt the adapter without changes or introduce a legacy compatibility layer by default. [Adapter peer](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/better-auth-adapter/package.json#L32-L35), [actual locked version](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/bun.lock#L833), [current auth configuration](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/apps/web/src/server/lib/auth.ts#L7-L33).
The adapter's generated schema is an initial schema, not an existing-schema migration. Dates/booleans are transformed through Better Auth's factory. Verify actual auth_user/auth_session/auth_account/auth_verification mapping, imported IDs/tokens/dates, Google login/refresh, expiry/sign-out and auth-to-app user references. Reusing transformed TEXT dates instead of INSTANT is an auth-schema choice requiring a tested data mapping; no new general date type is missing. [Generation boundary](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/better-auth-adapter/README.md#L21-L41), [factory flags/conversions](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/better-auth-adapter/src/index.ts#L87-L115).
## Unicode text_like matching is fixed in the working tree
The matcher now first treats % as matching zero characters, and advances the text position only when backtracking must consume another character. The public SQL regression first failed with 0 for text_like('%донат%','ДОНАТ') and passed with 1 after the two-line C fix. Additional cases cover Latin/Cyrillic/Ё, multiple and internal %, single-code-point _, suffix backtracking, anchored failures, empty strings and NULL propagation. [Local matcher](../../vendor/sqlean/text/rstring.c), [SQL regression tests](../../tests/extensions.rs).
The two-argument function still has its existing wildcard contract; this fix does not add an escape parameter. For user-entered literal %/_ searches, use text_lower(coalesce(author,'')) LIKE text_lower(?) with a chosen ESCAPE character and correctly escaped patterns. PostgreSQL production locale was not inspected, so broader locale parity remains an integration question. [Unicode functions](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/extensions.md#L39-L53).
## Value and deployment gates; optional library ergonomics
| Boundary | Required verification / optional addition |
| --- | --- |
| TS raw values changed intentionally | Every integer/count/ID now returns bigint; decimals exact text; JSON/arrays/INSTANT remain strings; BOOLEAN is bigint 0/1. StreamBrew Zod user/count/boolean models and camelCase transform need explicit mapping; Date/array/object binds need serialization. Decoder/Scanner helpers remain conveniences, not missing native types. Test computed booleans, opaque JSON documents, direct columns, safe numeric conversion and exact decimal JSON. [Current TS values](../../packages/typescript/README.md), [source models](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/packages/src/schemas.ts#L3-L20), [source JSON codec](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/packages/src/pg.ts#L1-L25). |
| Go raw codecs and temporal precision | time.Time binds UTC INSTANT, but temporal reads are canonical strings requiring Scanner/parser. INSTANT, DATETIME and interval time components now use microseconds; finer input rounds with ties to even. Test nullable dates, rounding/carry boundaries, arrays, Decimal and encrypted BLOB round trips. JSON/arrays/UUID remain strings and booleans can scan from 0/1. A typed result mode is optional. [Current Go contract](../../packages/go/README.md), [temporal precision](https://github.com/lebedev-nikita/boxdb/blob/e95f6c4987eed0222956e06d3ba9ef835a38ed0c/docs/temporal.md#precision-across-language-clients). |
| JSON assembly in SQL | JSON is validated opaque text; SQL JSON/JSONB functions and operators are disabled. StreamBrew's jsonb_build_object projections/RETURNING must return scalar fields and assemble objects in application code. Serialize complete JSON documents for storage. This is an accepted query rewrite, not a required engine addition. [Current storage contract](https://github.com/lebedev-nikita/boxdb/blob/e95f6c4987eed0222956e06d3ba9ef835a38ed0c/docs/storage.md#extended-schema), [settings projections](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/apps/web/src/server/sensors/db/store.ts#L254-L283), [donation projection](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/apps/web/src/server/video-queue/postgres.ts#L228-L242). |
| Native binary representation | Standard SQLite pages/records are retained using BLOB envelopes; native DECIMAL, UUID and temporal operators/indexes require BoxDB's patched engine. Stock SQLite is not a compatible writer/SQL executor for these schemas. Use typed BoxDB clients; test snapshot/schema/Litestream restores with native/BLOB metadata preserved. [File/engine boundary](https://github.com/lebedev-nikita/boxdb/blob/e95f6c4987eed0222956e06d3ba9ef835a38ed0c/docs/storage.md#extended-schema). |
| Go/native production target | Go SDK needs CGO_ENABLED=1 plus matching native library; StreamBrew uses CGO_ENABLED=0 and Alpine. Build/run the chosen musl/native image and test all services; reproducible packages help but the SDK already exists. [Go prerequisites](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/go/README.md#L9-L34), [current build](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/Dockerfile#L16-L34). |
| Recovery volume and large media | Binary database size is not RAM-limited, but query results are materialized and readable YAML storage is limited to 256 MiB. The public byte-buffer snapshot API has been removed; file conversion uses `Database::convert` or `boxdb convert`. Verify external Litestream/consistent backup recovery at realistic asset volume. [Limits](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/storage.md#L3-L15), [media](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/db/migrations/20260913000000_donation_alerts.sql#L14-L28), [replication](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/docs/replication.md#L3-L35). |
## Worker invariants to prove with existing primitives
Use short immediate transactions or conditional UPDATE/RETURNING instead of writable CTEs/SKIP LOCKED. Across independent Go/TS processes verify unique valid-generation claims, expiry/reclaim, stale completion rejection, atomic donation/deduplication/enqueue, atomic video completion, per-user alert ordering and stale-player fencing. These are workload acceptance tests, not evidence a new queue/row-lock engine must be built. [Claim/fences](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/internal/videoingest/store.go#L50-L158), [alert-order rationale](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/internal/donationalert/store_queue.go#L83-L92).
The BEFORE trigger fills an omitted NOT NULL queue ID and validates owner/priority references; an AFTER trigger is not interchangeable. Preserve this through explicit transactional writes/shared write rules or an appropriate schema design, covering every writer. Native DECIMAL now supplies exact priority arithmetic. PL/pgSQL/mutable NEW are not required additions. [Current trigger](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/db/schema.sql#L150-L219), [Go insert](https://github.com/streambrew-app/streambrew/blob/9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2/internal/videoingest/store.go#L111-L126).
Same-host services can share one local **binary WAL** database via the existing Go/TS engine clients. A server/pure-Go remote client is conditional on different hosts or preserving a no-cgo deployment; readable YAML remains single-writer. Do not add PostgreSQL wire/catalog/search_path, old API facades, unchanged historical migrations, row locks, arbitrary writable CTEs, distributed queues or built-in replication solely to avoid accepted application rewrites. [Go pool/storage](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/packages/go/README.md#L71-L82), [format contract](https://github.com/lebedev-nikita/boxdb/blob/119e53600394201f0038d4537189e7e4fa5c3d43/README.md#L62-L67).
The confirmed library gaps are closed in the current working tree: safe TS/Go writer defaults, enforced read-only transactions, auth request scheduling/deadlines and Unicode wildcard matching. The next useful work is StreamBrew behavioral integration. Other work is behavioral migration integration using existing capabilities. Add failing public-behavior tests for any demonstrated defects before changing code. Full library checks and workload probes are recorded below; they do not prove production capacity, Google/session parity or crash/recovery behavior. No production volume/latency/recovery objectives were available.
## Validation on the inspected revisions
Rebased the implementation onto origin/main without conflicts, at e95f6c4987eed0222956e06d3ba9ef835a38ed0c. The workload probes below used the original BoxDB revision 119e53600394201f0038d4537189e7e4fa5c3d43 and the locally implemented fixes. StreamBrew's inspected main was 9a1d1f4c186871beb3a6528ec7283ca7f8ddedd2.
- **Full library checks passed on the rebased code:** just check, including Rust formatting/Clippy/tests (14 extension tests), TypeScript client tests (77), adapter tests (Better Auth 7, Drizzle 5, db0 1), Node/Bun runtime smoke checks, Go formatting/vet/race tests and all 11 Python tests. The external ignored Litestream test was not rerun; this branch does not change binary page/record formats or replication implementations.
- **Go cancellation cleanup:** the existing short-deadline test exposed interrupted pool cleanup discarding an in-memory database. Cleanup now completes independently of the next request's deadline; the query itself remains cancellable. Short-deadline, read-only and publication/cleanup error tests passed 50 race-enabled repetitions before the final full check.
- **Money:** six current-client currency conversions matched independent Python Decimal expectations at precision 100 with ROUND_HALF_UP, including 1/90, a recurring 1/3 quotient, a 0.005 tie and values beyond JavaScript's safe-integer range. Native ORDER BY returned the expected order and SUM was exactly 611655790304830017.47. This validates decimal_div rewrites, not unchanged PostgreSQL SQL.
- **Deadlines:** a 40 ms transaction timeout cancelled a long recursive query and a queued transaction write with BOXDB_TRANSACTION_TIMEOUT; the first transaction's row rolled back, only the queued independent root row persisted, and the transaction became inactive.
- **Cross-language values:** on the original inspected revision, the TS client read the Go-written binary fixture with exact ID 9007199254740993, DECIMAL(38,18) value 12345678901234567890.123456789012345679, BOOLEAN, nanosecond UTC INSTANT and a 2 MiB BYTEA with all bytes intact. The latest upstream changes intentionally replace nanosecond temporal output with microseconds; current SDK/core tests cover that contract. Raw date/JSON/array codecs still need the documented application mapping.
- **Atomic claims:** four independent TS connections claimed eight jobs via conditional UPDATE/RETURNING. All IDs were unique, all generations advanced to 1, and a stale generation-0 completion updated no row. Full service-specific lease/fencing/recovery scenarios remain integration work.
- **Unicode fix:** the public SQL test reproduced text_like('%донат%','ДОНАТ')=0 before the patch, then returned 1. The wildcard-contract test passed 30 non-NULL cases plus NULL propagation. The patch only changes zero-length percent matching and progress during backtracking.
- **Auth:** ordinary sign-up/sign-in/session/sign-out and the new independent-writer adapter regression pass. The callback is invoked once after writer acquisition; shared-client scheduling and rollback isolation remain covered. Google OAuth and imported production sessions were not exercised.
The working tree changes the text matcher, shared query-only guard, TS/Go transaction helpers and regressions. Better Auth inherits the SDK default and gains a contention regression test. Temporary research fixtures stay outside the repository.