Turso 0.7.2 executable capability report

Copy Markdown View Source

This report is the Roadmap 2 compatibility baseline corrected for Tursox 0.2.1. It records behavior observed through public Elixir APIs against the exactly pinned turso = 0.7.2; current web documentation is a checklist, not the authority. Statuses are supported, partial, unsupported, platform_limited, or unsafe. Named ExUnit files are the executable source of each claim.

Core SQL

Proof: test/core_sql_regression_test.exs plus the focused statement, transaction, pool, and manager suites.

CapabilityStatusApplicability and observed contract
DDL and schema changessupportedFile/memory, direct; tables, indexes and ALTER TABLE ADD COLUMN
CRUD, UPSERT and RETURNINGsupportedBound DML on file/memory; RETURNING rows must use the query/cursor API
Five storage classessupportedNull, signed 64-bit integer, IEEE real, UTF-8 text and tagged blob round-trip
Expressions and relational queriessupportedOrdered joins, grouping, HAVING, subqueries, UNION and scalar expressions
ConstraintssupportedPrimary key, unique, check, not-null and opt-in foreign keys; stable :constraint errors
Prepared statementssupportedPositional/named values, reset/reuse, one active bounded cursor
Transactions and visibilitysupportedUncommitted writes are hidden; commit becomes visible; rollback is atomic
File persistencesupportedCommitted data survives reopen, rolled-back data does not; integrity is ok
Shared in-memory databasesupportedConnections derived from one database share state; independent opens do not
Pool and manager paritysupportedRepresentative ordered create/insert/query behavior uses the same database model

The suite deliberately does not claim exhaustive SQLite conformance. SQL errors are classified without depending on unstable engine prose, and every fixture closes its native resources back to a measured baseline.

PRAGMAs

Proof: test/pragma_capability_test.exs. Connection.pragma_query/3 safely renders {:identifier, name}, non-negative integer, and quoted string arguments; raw SQL fragments are not accepted. Settings are direct-connection operations; pools can issue generic SQL when checkout-scoped policy is intentional.

Family / namesStatusObserved 0.7.2 behavior
Metadata: database_list, page_count, page_size, max_page_count, freelist_count, encoding, schema_version, application_id, user_versionsupportedOrdered scalar rows; application/user versions persist; page size is configurable before schema creation
Schema: table_info, table_xinfo, table_list, index_list, index_info, index_xinfosupportedDocumented 6/7/6/5/3/6-column shapes; quoted hostile identifiers cannot inject SQL
function_listsupportedSix columns and runtime function inventory
pragma_listpartialReturns one-column inventory but 0.7.2 omits pragma_list itself
journal_modesupportedWAL and opt-in MVCC are configured and read back during database open
cache_size, cache_spill, synchronous, temp_store, busy_timeoutsupportedQuery/update scalar shapes; connection-local
query_only, foreign_keys, ignore_check_constraintssupportedConnection-local and enforcement tested; query-only write is classified :misuse by 0.7.2
data_sync_retry, require_where, i_am_a_dummysupportedConnection-local query/update; unqualified update/delete rejection tested for require_where
integrity_check, integrity_check(N), quick_checksupportedRepresentative WAL workload returns exactly [["ok"]]
wal_checkpointsupportedWAL returns one [busy, log_frames, checkpointed_frames] integer row
mvcc_checkpoint_threshold, mvcc_gc_thresholdsupportedMVCC-only non-negative query/update; WAL access errors
capture_data_changes_connunsupportedDocumented argument is accepted but returns no rows and creates no capture behavior on this pin
cipher, hexkeysupported via open optionsUse features: [:encryption] plus encryption: [cipher: ..., key: raw_binary]; all eight cipher modes persist/reopen and wrong keys fail. Secrets are not issued through PRAGMA helpers
list_typespartialBase inventory is available; custom-type depth is recorded below
legacy_file_formatunsupportedAccepted as an unknown/compatibility pragma and returns no rows

Potentially crash-prone passive MVCC checkpointing is publicly selectable only through unsafe_features and never runs in the main ExUnit VM. Raw secret keys are accepted at open but never retained in metadata, telemetry, inspect, or reports.

Experimental feature switches

Proof: test/experimental_capability_test.exs and the disposable bin/capability_probe.exs. The machine-readable authority is Tursox.Capabilities.experimental_features/0; a drift test aligns every exposed option with Database.builder_features/0.

Documented featureRust builder / Tursox optionStatusDisabled/enabled finding
Viewsexperimental_materialized_views / unsafe_features: [:views]unsafeOrdinary views are always on; the documented flag controls materialized views, whose CREATE reaches SIGBUS after open/connect on 0.7.2/macOS
Materialized viewsexperimental_materialized_views / unsafe_features: [:materialized_views]unsafeBackwards-compatible alias for :views; exact child probe reaches the same native memory fault
Custom types and domainsexperimental_custom_types / unsafe_features: [:custom_types]unsafeA fresh enabled database reaches SIGBUS during open on 0.7.2/macOS; exact type-family probes are child-only
Encryptionexperimental_encryption + with_encryption / :encryption and :encryption optionssupportedEvery build includes portable crypto; raw keys are size-checked/redacted and all eight pinned ciphers pass create/write/reopen/wrong-key tests
Index methodsexperimental_index_method / :index_methodsupportedParser gate works and every build deliberately includes the Cargo fts feature
Autovacuumexact-source adapter / :autovacuumpartialThe core/SDK gate exists but the public 0.7.2 Builder omitted it. Tursox exposes that existing switch; enabled updates execute, but the pinned fresh-file early-halt leaves mode 0
Vacuumexperimental_vacuum / unsafe_features: [:vacuum]unsafeThe switch is accessible. Initialized-file probes have both completed and reached SIGBUS on 0.7.2/macOS, so execution remains child-only
Attach/detachexperimental_attach / :attachsupportedDisabled gate and enabled attach/list/detach pass
Generated columnsexperimental_generated_columns / unsafe_features: [:generated_columns]unsafeFull create/insert/read returns [[4, 5]] on macOS; Linux has produced SIGSEGV, so exact child evidence is retained
WITHOUT ROWIDexperimental_without_rowid / :without_rowidsupportedDisabled gate and enabled create pass
Multiprocess WALexperimental_multiprocess_wal / :multiprocess_walplatform_limitedRejected with MVCC; real-process/platform results are in the release section
MVCC passive checkpointexperimental_mvcc_passive_checkpoint / unsafe_features: [:mvcc_passive_checkpoint]unsafeThe switch is accessible; PASSIVE checkpoint reaches SIGBUS after open/connect/write on 0.7.2/macOS and is child-only
Triggerscompatibility no-op / nonesupportedAlways enabled in 0.7.2
STRICTcompatibility no-op / nonesupportedAlways enabled in 0.7.2

All eleven flags on the current experimental-features page are accepted at Database.open/2. Known process-killing flags use unsafe_features; generic SQL remains available after opt-in. No experimental result is a production-stability promise.

STRICT tables, custom types, and domains

Proof: test/type_capability_test.exs; enabled experimental probes use a fresh child BEAM per type family.

Type capabilityStatusObserved contract
Ordinary affinitysupportedNumeric/text affinity conversions and deliberately flexible storage match ordered typeof results
STRICT base typessupportedINTEGER, REAL, TEXT, BLOB, and ANY accept convertible values and atomically reject incompatible storage classes
Prepared/transaction/index/reopen behaviorsupportedBound writes, constraint rollback, multiple connections, index planning, durability, and integrity pass
PRAGMA list_typespartialExactly six columns for five base rows; no custom definitions on the safe configuration
sqlite_turso_typesunsupportedCatalog virtual table documented by newer web docs is absent on 0.7.2
Documented built-in semantic typesunsupporteddate, time, timestamp, varchar, numeric, smallint, boolean, uuid, bytea, inet, json, and jsonb are absent from the pinned inventory
User-defined CREATE TYPEunsafeDisabled gate is stable; enabled encode/decode probe can terminate 0.7.2, so defaults/operators/drop cannot be advertised
ArraysunsafeDisabled gate is stable; enabled constructor/table probe is child-only
STRUCT and UNIONunsafeDisabled gate is stable; enabled create probes are child-only
DomainsunsafeDisabled gate is stable; enabled create/constraint probe is child-only, so chaining/casts/drop rules are not advertised

Tursox still transports only the five engine storage classes. It does not infer Elixir date, decimal, UUID, array, or composite values. Unsafe findings are valid pin results rather than emulated features or weakened tests.

Views and advanced schema

Proof: test/view_capability_test.exs, test/table_feature_test.exs, and test/storage_schema_test.exs.

Schema capabilityStatusObserved contract
Ordinary viewssupportedFiltered/aggregate views query and introspect as view; writes fail; drop leaves base data
Materialized viewsunsafeDisabled definitions fail without schema damage; enabled creation remains child-only, so no incremental-maintenance claim is made
Generated columnsunsafeDisabled gate is stable; reading enabled generated values can segfault on 0.7.2/Linux and runs only in a disposable child BEAM
TriggerssupportedAlways-on update trigger and audit effects commit/roll back atomically; schema introspection/drop pass
WITHOUT ROWIDsupportedPrimary key is mandatory, hidden rowid is absent, ordering and reopen pass
Attach/detachsupportedOpt-in file schema has isolated names/data, appears in database_list, persists independently, and detaches cleanly
VacuumunsafeExplicit opt-in; initialized-file probes have both completed and SIGBUSed on 0.7.2/macOS, so no production compaction claim is made
AutovacuumpartialExact 0.7.2 wrapper adapter reaches the core gate; query metadata is empty and fresh-file FULL mode remains zero due the pinned early halt

Materialized-view IVM, unsupported query shapes, dependencies, and refresh are not advertised because the enabled pin is unsafe. File fixtures use unique local paths and close attached/database resources before cleanup.

Proof: test/fts_test.exs; the no-Rust consumer smoke also creates and queries an FTS index, enforcing source/precompiled parity. All builds use turso/default-features = false plus features = ["fts", "pure-rust-crypto"]; the opt-in :index_method database switch remains required.

FTS capabilityStatusObserved 0.7.2 behavior
Index and matchingsupportedCREATE INDEX ... USING fts(cols) and fts_match(cols, query) return deterministic ordered IDs
Rankingsupportedfts_score returns real BM25-like scores with deterministic relative ordering
Highlightingsupportedfts_highlight(cols, open, close, query) returns text and preserves unmatched text
Query syntaxpartialTerms, boolean AND, and phrases pass; documented prefix behavior is not advertised on this pin
TokenizerspartialGlobal raw, simple, whitespace, and ngram options create; newer per-column WITH tokenizer=... syntax is rejected
Field weightssupportedGlobal WITH (weights = 'column=weight,...') creates and ranks
Bounded/bound querysupportedParameters and incremental cursor chunks preserve limits and order
DML and transactionssupportedInsert/update/delete maintain the index; rollback removes index changes; unlike newer docs, 0.7.2 has read-your-writes on the writer
Optimize/drop/reopensupportedNamed optimize succeeds, index survives reopen, delete/drop cleanly remove indexed/schema state
Invalid queries/methodssupportedStable Tursox errors without SQL/row leakage

Turso FTS is Tantivy-backed and is not advertised as SQLite FTS5 compatibility. The exact upstream oneshot 0.1.13 source is vendored only because Tantivy's required crates.io index entry is unavailable; licenses and attribution ship in the package.

Built-in and loadable extensions

Proof: test/extension_inventory_test.exs and test/runtime_extension_test.exs, derived from runtime inventory and real native loading rather than documentation presence.

Extension familyStatusPinned inventory / smoke
UUIDsupportedUUID4/7, blob/string conversion; representative blob/text widths pass
Regexppartialregexp and REGEXP operator work; newer substring/capture/replace functions are absent
Vectorsupportedvector32 extraction and L2 distance return blob-backed vector/text/real shapes
TimesupportedOpaque blob values, date formatting, and duration constants pass
Percentilesupportedmedian, percentile, continuous, and discrete aggregate shapes pass
generate_seriessupportedModule yields inclusive ordered integer rows
CryptounsupportedNo functions in the embedded registry
FuzzyunsupportedNo functions in the embedded registry
IP addressunsupportedDocumented family absent (an unrelated validate_ipaddr scalar exists)
CSVunsupportedNo CSV module; virtual table creation fails safely
Runtime loadingunsafeunsafe_features: [:runtime_extensions] enables Connection.load_extension/2. A real Turso-ABI fixture loads and executes. Native code runs inside the BEAM
SQLean 0.28.3incompatible ABIThe official macOS arm64 zip (SHA-256 dd0ee79dc1f3ee03c1b5dd4f766a4ab36c395862c3d068f0b2f3c882196d3288) was downloaded. All 14 libraries export sqlite3_*_init and none exports Turso's required register_extension; loading fuzzy.dylib returns the exact symbol not found error

Malformed UUID/regexp/percentile inputs return NULL on 0.7.2, and a zero series step uses the default positive step; vector dimension and invalid time inputs return errors. These tested differences are retained rather than normalized.

Multiprocess WAL

Proof: test/multiprocess_access_test.exs, test/multiprocess_recovery_test.exs, and repository-owned bin/multiprocess_probe.exs. Claims require 64-bit Unix, Turso's default file-backed I/O, and a local filesystem; other targets explicitly retain platform_limited status rather than reporting a skipped test as success.

Multiprocess capabilityStatusObserved contract
Independent process reads/writesplatform_limitedSeparate BEAM OS processes open one file and commit ordered rows
Writer serializationplatform_limitedFile barriers prove a second process cannot complete its immediate write until the first commits
Reader snapshotsplatform_limitedA read transaction retains its count across another process commit and sees the commit after ending its snapshot
Checkpoint/schema refreshplatform_limitedChild checkpoint returns the WAL three-integer shape; an existing prepared statement executes after sibling ALTER TABLE
Process death/recoveryplatform_limitedSIGKILL of an uncommitted writer leaves no row, a later writer acquires the slot, and integrity remains ok
Sidecarsplatform_limited.db-wal and .db-tshm are observed; .db-tshm can remain after close and must not be manually treated as stale corruption
Memory databasesunsupportedTursox rejects the combination before native allocation because shared mmap coordination requires a file
MVCC combinationunsupportedTursox rejects multiprocess WAL with MVCC before allocation
Mode mixingpartialContrary to newer docs, 0.7.2 on macOS permits a legacy open while a multiprocess opener is live; Tursox records and avoids claiming this unsafe mix
Network/distributed filesystemsplatform_limitedNot exercised in CI; rely on the engine's open-time filesystem rejection and use only supported local filesystems

Child waits are deadline-bounded and synchronized by atomically renamed barrier files. Crash children are killed and reaped. The on-disk coordinator is experimental and is not a cross-version stability promise.

0.2.1 correction release verification

Release workflow 31009283567 built and directly smoke-tested all seven NIF 2.16 targets, including encrypted create/reopen behavior, then published v0.2.1 at commit 6ae70348a9c736cf3595120aa73e77cc78fc447d. The checked-in checksum manifest was generated only by downloading those published assets. Follow-up CI 31010606843 passed logic QA and no-Rust consumers on every non-musl target.

0.2.0 release verification

Release workflow 31002711851 built and directly smoke-tested the exact NIF 2.16 set for macOS aarch64/x86-64, Linux aarch64/x86-64 GNU and musl, and Windows x86-64 MSVC. Its aggregate job validated all seven archive names and published v0.2.0 at commit 836c5f6a498734d02abb72dbfe81f2f03d157968. The checked-in checksum-Elixir.Tursox.Native.exs was generated only by downloading those published assets. Follow-up CI runs the no-Rust public API/FTS/extension consumer on every non-musl consumer target; musl artifacts were smoke-tested in matching Alpine containers before publication.