Что нового

Версия 0.9.1-beta.1

Изменения, заметки о миграции и совместимость этой версии.

Для v0.9.4 Исходник на GitHub ↗

0.9.1-beta.1 is a prerelease based on 0.9.0. It delivers document sources and multigranular evidence retrieval, named graphs, automatic parsing and staged publication, the QuIVer INT8 SSD runtime, and hardening for SDK access, error locations, request completion, and lifecycle boundaries.

Installation, formats, and upgrading

The Rust crate, CLI, Server, and npm use 0.9.1-beta.1. Python uses 0.9.1b1 and supports Python 3.9–3.12. The Git tag is v0.9.1-beta.1. npm uses the beta channel. Published artifacts identify their validated commit.

Shell
cargo add [email protected]
pip install "triviumdb==0.9.1b1"
npm install [email protected]

The current checkpoint format is .tdb v13 and the WAL format is v6. Document candidates, parser archives, named graphs, and bounded edit receipts persist with database facts. Close the database and back up the complete file group before upgrading. Use a Writer for legacy recovery and checkpoint publication. ReadOnly/Immutable retain physical zero-write semantics. Restore the complete pre-upgrade backup when rolling back.

.qssd is a fact-bound derived index configured and queried through explicit INT8 entry points. Building, generation refreshes, and residency transitions require peak capacity. Original vectors, the primary hot graph, and reader routing each consume resources. The sections below document interfaces, budgets, backups, and operating scope for documents, named graphs, and SSD retrieval. CI, native I/O, sanitizers, and installed-artifact conclusions identify their actual commit and execution scope.

Isolated resources for parallel acceptance

Document field, position, and vector budgets, build quotas, and cancellation cases use independent ResourceRuntime instances. Resource-release assertions inspect each case's own ledger while retaining full-result, budget-rejection, cancellation, and retry checks. The default shared runtime continues serving hosts that share quotas across database instances.

SSD window-reuse checks use warmed single-record queries and verify complete results and read statistics. Database-close checks cover database reservations, workspaces, tasks, and files. CPU pools retained by an explicit Runtime follow that Runtime's lifetime.

ICDE reproduction and measurement archive

Git distributes evaluation/ with the paper, frozen experiment sources, protocols, provenance manifests, complete measurement tables, and offline data browsing. It contains 1,056 operating-point observations, 116 index configurations, 423 parameter curves, and 31 methods. Original content hashes remain bound to experiment identities. Research configurations and production runtime behavior are interpreted against their corresponding sources. Prepare vector matrices, built indexes, and complete execution artifacts using the archive's input instructions. Cargo selects the Rust package contents.

Run python evaluation/tools/verify_data.py to check file identities and consistency between CSV, structured snapshots, and offline data copies. See the ICDE archive.

QuIVer INT8 database entry points, caches, and residency runtime

  • Direct I/O queries alignment through generation-pinned handles. Windows uses file storage sectors and file alignment information, while Linux uses statx DIO requirements and filesystem block size. Missing query support selects a conservative 64 KiB alignment followed by a native probe. The backend supports alignment up to 64 KiB. Batches merge adjacent records and overlapping windows. Each backend reuses up to 64 KiB of read-window storage within its existing I/O reservation. Fully contained requests avoid system calls, failed or short reads invalidate old contents, and larger requests use temporary buffers. cache_bytes separately controls Ready rows. New statistics expose alignment, retained window bytes, reuse counts, and copied bytes. Hot switching and closing release windows. Validation covers independent full-byte comparisons, cross-boundary and tail reads, short-read retries, pinned generations, and zero-row-cache resource contracts.
  • Reranking now uses bounded batches of up to four candidates. Adjacent records and overlapping Direct I/O windows are merged, while remaining ranges are submitted before completion waits. Every record is validated and restored to candidate order. Failures, cancellation, and preparation-time budget rejection clear all owned Pending entries. After validating a hot snapshot, the Reader retains its query routing state and releases BQ construction data, upper graph layers, and maintenance workspaces. New counters report cold-section system read attempts and returned bytes. A production-path benchmark measures cache capacities, complete result equivalence, and recall against an independent cosine reference.
  • After Hot prewarming, release the asynchronous I/O backend, its worker threads, and their reservations. Statistics expose io_active. Returning to SSD prepares and admits the backend again. A failed transition preserves Hot queries and can be retried after resources become available.
  • Add explicit INT8 configuration, retrieval, statistics, and close methods to Rust Database/Reader. Python quiver_request and Node quiverRequest share the Core JSON protocol. Database entry points derive source identities from dtype and committed fact/hot-graph binding metadata, publish .qssd as needed, and refresh derived generations after writes on the first query or checkpoint. Binary fingerprints, unknown fields, and invalid configuration receive structured rejection. IDs travel as decimal strings.
  • Add an LRU Ready cache, same-row Pending coalescing, runtime cache resizing, independently retained row leases, and Hot/SSD switching. Warming follows peak-budget admission and retains the active state on failure. Shrinking and closing release cache ownership while callers retaining rows preserve their data and reservations. Local and shared budgets cover records, directory overhead, aligned transfers, and transition peaks.
  • Add bounded asynchronous reading. Windows uses generation-pinned OVERLAPPED/NO_BUFFERING handles. Linux uses O_DIRECT and native kernel AIO. Buffers remain owned through native completion. Error draining and closing wait for native I/O and join workers. I/O workers and CPU pools share Runtime thread limits. auto falls back on explicit capability rejection, direct preserves OS errors, and statistics report the actual backend.
  • Each publication candidate owns an OS lease. Writable configuration, publication, and explicit collection reclaim candidates left by exited processes while preserving active publishers. Validation covers native Direct I/O, arbitrary tail dimensions, row leases and cache shrinking, Pending coalescing, residency roundtrips, budget retries, checkpoint/read-only reopening, and Rust/Python/Node contracts. Native I/O and sanitizer conclusions identify their platform, features, and validated revision.
  • INT8 capabilities use explicit entry points. Existing hybrid, document, and TQL strategies keep their own routes. The database retains original facts and its primary hot graph, with a separate hot graph for the SSD reader. Residency changes and generation refreshes require transition-peak capacity. .qssd is rebuildable after restoring a fact snapshot. Usage, backup, and resource conditions are documented under QuIVer runtime.
  • With a thread limit of one, the caller performs native submission/completion waits while CPU maintenance retains its worker capacity. After deleting the last vector and completing a checkpoint, caches, resident rows, I/O, and file resources are released. Subsequent writes reuse the configured runtime policy.
  • Database admission combines the base heap, SSD residency, and query reservations. Building and refreshing account for both the old state and its candidate. Flush, closing, manual compaction, and background compaction refresh derived generations at the same file-group publication completion point. Configuration and installation execute as serialized maintenance operations.

QuIVer SSD artifacts, generation-pinned readers, and positional reads

  • Add the low-level Rust index::quiver::ssd module. It streams vectors from stable slots and an existing QuIVer graph into a single QVSSD v1 artifact containing a directory header, QUIV v2/QDSM hot state, and INT8 cold records. A source-manifest digest and publication UUID identify the generation. Each cold record also binds NodeId, slot, internal ordinal, and tombstone state.
  • Publication uses an exclusive UUID temporary file, file synchronization, atomic replacement, and parent-directory synchronization. The last atomic replacement wins when publishers overlap. Existing readers retain their opened file generation, and source mismatches are explicitly rejected. Directory-sync failure carries publish/unknown; build failures and cancellation retain the actual pre-commit stage. Existing QuIVer saves reuse the streaming hot writer and use atomic replacement plus directory synchronization.
  • Readers load the directory and hot section during opening, then validate cold rows through cross-platform positional reads. Explicit INT8 retrieval reuses default SM navigation and stable ordering. I/O errors, short reads, and cancellation retain structured categories. Query-owned workspaces are released on completion. Reader-local and shared-runtime budgets jointly cover hot data, active queries, and retained row leases. Closing releases the file and hot reservation.
  • Independent binary fixtures, complete content/score checks, format mutation, concurrency and budget cases, fault retries, and killed subprocesses validate the artifact contract. Database/SDK runtime integration is described above. Source constraints, conservative memory admission, temporary files, and usage conditions are documented under SSD readers.

QuIVer SSD cold-vector codec foundation

  • Add the low-level Rust index::quiver::cold module with dimension-aware layouts, caller-buffer encoding, validated borrowed rows, and scalar integer scoring. Coverage includes dimensions 1 through 3072, partial groups, f32/f16 inputs, zero vectors, and extreme finite magnitudes. Binary fingerprints receive structured rejection with the dtype field.
  • Codec 1 uses stable normalization before group128 minmax affine INT8 encoding, followed by reconstruction-norm correction. Queries use global symmetric quantization and integer-norm correction. The scalar path computes grouped i32 dot products and restores approximate cosine scores using f64 arithmetic. Archived research uses a separately identified raw-magnitude encoding implementation. Integrated quality and resource measurements follow in subsequent stages.
  • Add a 40-byte layout header carrying version, codec, geometry, and CRC. Rows contain codes, group parameters, norm correction, row CRC, and zero padding. Readers validate the complete representation and canonical norm correction. Row-section address calculations check bounds and overflow. Encoding and query workspaces are bounded by the per-row dimension limit.
  • The SSD artifact and database runtime reuse the low-level codec API. Format details, examples, and usage conditions are documented in QuIVer.

Automatic document parsing, source mapping, and staged publication

  • Core and Reader add plain-text, Markdown, HTML, JSON, and JSONL parsing with UTF-8 logical ranges and stable parser/configuration identities. Selection follows explicit format, known media type, then source extension. Leaf blocks support bounded splitting and optional line children. Hosts supply real root vectors and optional block representations. Whole-document and represented-block retrieval reuse the existing document query pipeline.
  • Parsed text and source text retain separate SHA-256 identities. Evidence includes exact, covering, or synthetic source spans, source line/column coordinates, and optional page, paragraph, and fixed-point region metadata. Host PDF, Office, and OCR results use the same ParsedDocument contract. Hosts maintain original binary artifacts and their declared digests.
  • Durable begin, append, status, list, publish, and abort operations support identical-content retries and stable conflicts for upload identity, sequence, digest, and root revision. Candidate representations remain isolated until one transaction installs the root pointer, represented nodes, hierarchy edges, and publication state. Replacement and root deletion reclaim archives. Confirmed candidates survive close and reopen.
  • Parsed and original text each support 64 MiB, with 100,000 logical blocks, one million source mappings, and 4,096 batches per upload. A database supports 128 pending candidates and one million pending/published archives. Final publication assembles an owned snapshot and follows memory/workspace admission. Represented-node Payloads retain the 8 MiB limit.
  • The development checkpoint advances to v13 and WAL to v6. Document archives use bounded length/CRC-protected records and a checkpoint sequence watermark. Independent v12/v5 decoding preserves historical named-graph commits. The watermark makes retained WAL replay idempotent across checkpoint overlap. Snapshots include candidates. Complete or abort candidates before dimension migration, which preserves published archives in the destination. Retain the complete pre-upgrade file group for rollback.
  • The shared SDK JSON protocol, Python, and Node expose the same parsing/upload operations, decimal-string IDs, f16/u64 numeric rules, and structured errors. Applicable validation covers functionality, recovery, read-only behavior, resource release, types, and installed artifacts. Platform evidence follows the actual delivery record. See document ingestion for fields and operating conditions.

Named graphs, shared members, and graph-local edges

  • Adds authoritative named-graph records, graph metadata, shared global NodeId membership, and edges identified by (graph_id, src, dst, label). Core provides conditional creation/replacement, batched editing, reading, listing, and deletion. Reader exposes the same read semantics. Python graph_request and Node graphRequest use the shared SDK protocol with canonical decimal-string node IDs.
  • Explicit scopes support individual graphs, graph unions, and outgoing breadth-first traversal. Union nodes are deduplicated while independent edges retain their graph identities. Results and graph revisions use deterministic ordering. Existing default-graph APIs retain their scope. Structural revisions combine a creation UUID and a monotonic counter. Conditional conflicts return TDB_GRAPH_REVISION_MISMATCH, and recreating a deleted graph generates a new incarnation.
  • Deleting a graph or membership removes its graph-local relationships and preserves global nodes. Global node deletion atomically removes every named-graph reference and advances affected revisions. Mixed node/graph transactions share ordered preflight and WAL transaction seals. Named-graph memory participates in admission and query budgets. Limits are 10,000 graphs per database, one million members and edges per graph, and 64 MiB encoded graph writes. Current writes persist a complete target-graph snapshot.
  • Document and graph JSON response-encoding errors use Core completion-state classification. Active synchronization groups report response/unknown, while ordinary committed transactions report response/committed. Callers confirm the outcome using group-tail synchronization results and reread facts.
  • Checkpoints advance to .tdb v12 with a length- and CRC-protected named-graph block. WAL advances to v5 with an independent historical v4 decoder. Writers upgrade through the existing open/checkpoint protocol, and historical edges belong to the default graph. Preserve a complete file-group backup before upgrading and use that backup for rollback. Named graphs participate in the existing atomic main-file publication. Replaying overlapping WAL records preserves final revisions across graph recreation and cascading node deletion.
  • Functional acceptance covers three dtypes, Rom/Mmap, independent shared fixtures, mixed transactions, controlled cancellation, application-failure recovery, checkpoint/WAL overlap, historical v11/v4 fixtures, format corruption, physical read-only behavior, and Windows resource release. Actual Python wheels, npm tarballs, and type consumers use the public entry points. Named scopes for TQL and existing graph algorithms remain scheduled for a subsequent batch. Full contracts are documented in named graphs.

Document vector and hybrid grouped retrieval

  • Core and Reader add search_documents_vector and search_documents_hybrid, exposed as search_vector and search_hybrid through the shared document JSON protocol. Document-level retrieval uses root vectors and block retrieval uses represented-block vectors with the database dimension and dtype. Floating-point vectors use cosine similarity, while u64 preserves complete bit patterns and uses Hamming matching-bit scores. Empty-text representations participate in vector retrieval.
  • Source, level, metadata, membership, and positional conditions constrain the shared candidate set. Exact retrieval scores all eligible representations before grouping. ANN uses the ready QuIVer BQ query-time scorer interface and doubles candidate width according to document-group coverage. Responses report the actual route, approximate scope, candidate and scoring counts, navigation visits, and stop reason. Configured candidate limits and hard resource budgets have distinct outcomes.
  • Hybrid retrieval reuses the existing RRF pipeline and exposes field BM25 ranks, original vector scores, branch ranks, and a positive finite text weight. Dual-branch fusion uses a fixed smoothing constant of 60. A vector-only result branch retains original scores, while a text-only result branch uses weighted reciprocal ranks. Shared RRF computes the smoothing ratio before multiplying by the weight, keeping output finite for large finite weights. Document groups use their highest fused hit score with deterministic group and hit ordering. Evidence feeds the existing reference and context APIs.
  • New limits bound vector scoring and ANN navigation work. Candidate and ANN workspaces are admitted before execution, and each round releases its owned visited maps, candidate heaps, and reranking buffers. QuIVer control checkpoints observe cancellation and propagate the failure to the requesting thread. Independent fixtures cover three dtypes, Rom/Mmap, RRF, candidate constraints, f32/f16 at dimensions 2 and 384, group-aware expansion, candidate limits, physical read-only behavior, Windows resources, complete vector recovery after unknown WAL outcomes, and actual wheel/npm artifacts. SDK and storage-core responsibilities retain their established boundary, and document facts persist through ordinary nodes and the WAL.

Document field scoring and metadata membership filters

  • DocumentSearchQuery.fields selects represented block kinds and maintains independent field term frequencies, lengths, and full-corpus statistics with positive finite weights. Title/body fields use weighted BM25, document groups use the highest block score, and responses expose sorted field_corpora. Phrase and proximity evaluation stays within each block and retains original-source offsets.
  • document_filter and block_filter evaluate caller data on roots and candidate blocks respectively. Explicitly scoped members conditions support any/all scalar array membership with set semantics for duplicates. Empty all selects array-valued fields, while empty any produces an empty result. Missing, null, scalar, and integer/floating-point representations have defined behavior. Existing $in and $all retain their public contracts.
  • Derived membership postings generate candidate intersections/unions, followed by complete predicate verification against original data before text-candidate accounting, document grouping, and truncation. Field and membership caches are built on demand and invalidated by fact mutations. Cold and warm queries share logical budgets. New limits bound member-value visits and intermediate filter sets, text and member postings share an aggregate limit, and execution checkpoints observe cancellation.
  • Rust Core, Reader, shared SDK, Python wheels, and native Node/npm packages expose the same existing document protocol. Document fields and durable facts reuse manifests, ordinary nodes, and the current WAL. Independent fixtures cover field scoring, scope, array boundaries, full integers, evidence, physical read-only behavior, cache upgrades, cancellation, unknown WAL outcomes, and complete facts after reopening.

Document positions, phrases, and ordered proximity

  • Document retrieval adds match_mode=any/phrase/ordered_near, cumulative skipped-token allowance max_gap, optional exact details through include_matches, and analyzer identity validation. Defaults use token-union retrieval and unit-level evidence. Exact details return DocumentTextMatch and DocumentTokenMatch, including actual windows, source revisions, normalized terms, unit-local ordinals, and original UTF-8 ranges.
  • The shared analyzer uses identity tdb-text-ascii-cjk2-v1, groups ASCII letters/digits, emits CJK bigrams, and retains original character ranges through lowercase conversion. Phrases validate consecutive ordinals and CJK overlap relationships. Ordered proximity limits the total skipped ordinals along the chain. Each start returns the earliest-ending complete window, with the earliest ordinal sequence breaking ties. Punctuation and newlines follow analyzer delimiter rules, and block queries use their own boundaries.
  • Positional conditions run before source grouping and truncation. Bounded posting-based dynamic programming builds successor tables, with repeated terms requiring distinct occurrences. Match windows feed the existing reference and context APIs directly. Batch source coordinates use one scan and shared CRLF, Unicode-scalar, and tab semantics.
  • The first positional condition or detail request upgrades the derived in-memory index from current facts, reclaiming the earlier frequency cache before construction. Position tables participate in memory estimates and per-token admission. New limits bound stored positions, query terms, position visits, and match windows. Exhaustion uses existing structured QueueFull fields, and execution checkpoints observe cancellation. Updates, deletions, WAL recovery, and read-only reopening derive positions from current facts. General text snapshots use TIDX v2.
  • Rust Core, Reader, and the shared SDK provide the same semantics through the existing Python/Node JSON entry points. Independent fixtures cover three dtypes, Rom/Mmap, repeated terms, Unicode lowercase width changes, CJK overlap, newlines, and block boundaries. An exhaustive combination model checks shortest windows, while controlled cancellation and WAL failures verify resource release and complete recovery.

Grouped document text retrieval and context

  • Added search_documents, document_context, and clear_document_index to Core and the Rust Reader. The shared JSON protocol adds search/context/clear_index, with Python and Node using the same implementation through their existing request entry points.
  • Full documents and represented blocks maintain separate BM25 corpora using the existing tokenizer with k1=1.2 and b=0.75. Source, document, and kind filters retain global corpus statistics. All eligible matches are grouped by document-root identity before deterministic group and hit truncation. Hits carry current revisions, original byte ranges, line/column positions, and complete source evidence.
  • Context expansion validates multiple references within one fact read view, traverses mixed-kind siblings and manifest-only ancestors, and merges overlapping or adjacent windows. Stale revisions, invalid ranges, integrity failures, and budget exhaustion return structured public errors. Requests deliver complete results.
  • The derived in-memory document index builds on first retrieval, invalidates after fact changes, and rebuilds from recovered content and manifests after reopening. Its estimate contributes to memory statistics. Cached and transient execution use identical scoring and logical budgets, explicit clearing reclaims memory, and the existing file layout remains in use. Manually registered general text indexes retain their established registration and persistence contracts.
  • Search and context add limits for node visits, encoded Payload bytes, corpus text, edges, postings, candidates, and output. Defaults and conservative encoded-output accounting are described in the document retrieval contract. Automatic parsing and dedicated CLI/TQL/HTTP integration follow in later batches.

Document sources, structure, and atomic updates

  • Added document-root identity, host source keys and revisions, parser identity, SHA-256 content hashes, and UTF-8 half-open ranges. Logical directories use versioned Payload manifests, while optional fragment representations reuse ordinary vector nodes. Hierarchy edges connect the nearest represented ancestor and retain logical parent and order metadata.
  • Core supports creation, revision-guarded replacement, reads, reference resolution, and revision-guarded deletion. Document revisions persist through the existing WAL and checkpoints. Content, fragments, hierarchy edges, and obsolete nodes update in one transaction. Reused nodes retain business edges, and identical vectors retain their bit patterns. Stale references and revision conflicts return TDB_DOCUMENT_REVISION_MISMATCH with document identity and expected/actual revisions.
  • Rust provides typed APIs and a shared SDK JSON adapter. Python and Node expose document_request and documentRequest. JSON IDs use decimal strings, f16 vectors use numeric values, and u64 retains complete integers. Requests, planning, and responses follow existing resource budgets and completion outcomes, with Core owning transaction and recovery semantics. Content and manifests remain subject to the 8 MiB per-node Payload limit. Dedicated CLI/HTTP integration follows in later batches.
  • Fixed QuIVer reload rejecting a historical tombstone and an active row sharing an ID after a small vector update. Loading distinguishes tombstone and active identities while enforcing a single active node per ID. Strict-index reopening preserves updated vectors and relationships. Functional contracts cover three dtypes, Rom/Mmap, Unicode/CRLF, complete structure, physical zero-write reads, revision rejection, cancellation, budgets, WAL failure recovery, and actual binding artifacts.

Database reopening and default SM snapshots

  • After fully validating a Mmap checkpoint, opening reuses that operation's main-file and vector CRCs for QuIVer fact binding, reducing repeated full-file reads. Each separate open performs complete validation. Corrupt facts and mismatched indexes follow the structured rejection and missing-index policies.
  • .quiver v2 stores the default SM routing bitplanes, amplitudes, reconstructed norms, and exact normalization scales with the graph. Complete snapshots restore compact rows after geometry, identity, and CRC validation. v1 indexes and empty snapshots use streaming reconstruction, and explicit checkpoints save v2. WAL recovery continues to update or invalidate indexes according to committed writes.
  • The routing snapshot adds 36 + index_node_count_including_tombstones × (16 × ceil(dim/64) + 20) bytes within the existing QuIVer file. Older kernels supporting v1 apply their own index policy to v2, and downgrade-related derived indexes are rebuilt by the target version.
  • Added bench_open to report actual database reopening, first-query cost, query recall and throughput, memory components, and complete results separately. Functional regressions cover an independent historical layout, truncation and corruption, f32/f16 Rom/Mmap reopening, physical zero-write reads, WAL updates, and moving file groups on Windows.

Pipeline benchmark provenance and soak resource validation

  • Fixed bench_pipeline_gate stopping on the property_origin difference between scoring before and after property filtering. The benchmark validates each plan's expected property entry, then compares every remaining row field in its original order. Regressions cover complete analytical scores, provenance, membership, and an absent score versus an explicit zero score. Public documentation defines the field's physical-plan semantics.
  • The five-minute bounded soak uses explicit kernel and Payload-cache budgets, verifies resource return after maintenance, checks complete records, and reopens after two persistence cycles. Initial, peak, and final RSS observations support working-set and memory-composition analysis. Failure paths release objects and clean up fixtures before propagating the failure.
  • Added a release-contracts profile that inherits release optimization settings and disables LTO for Windows optimized fault contracts. CI executes allocator, targeted I/O, and publication-kill suites with this profile. Original release and toolchain diagnostics retain their respective configurations and results.

Kernel SDK layering, shared access, and request rejection

  • Added the sdk module with SharedDatabase and WeakDatabase. Callers share one storage kernel and prepare independent TxBuilder transactions outside host locks. The kernel performs atomic validation and commit after SDK admission. Admission failures caused by contention, reentry, or closing preserve the pending builder.
  • The DatabaseReader, DatabaseWriter, and ConsoleHost host adapters now live in the SDK, with existing import paths retained. ConsoleHost::attach_shared uses weak ownership. Dropping one handle releases that handle; explicit shutdown affects all shared handles. The storage kernel continues to own WAL semantics, file leases, recovery, and mmap release.
  • Added TDB_BUSY, TDB_REENTRANT_ACCESS, and TDB_HOST_LOCK_POISONED for admission contention, same-instance reentry, and poisoned host locks following unwinding. Search Hook guards identify the database instance: same-instance operations managed by admission are rejected, while other databases retain their own admission checks. Shutdown inside a group-commit callback returns a reentry error. The public Node loader rejects synchronous callback reentry before N-API.
  • TriviumError::info() and Python/Node kernel errors expose schema_version: 1, code, message, and details. CLI JSON mode writes kernel error objects to stderr. Nightly HTTP responses preserve Core codes and details and expose former HTTP categories as legacyCode; for example, QUERY_PARSE_ERROR becomes TDB_QUERY_PARSE. Node/HTTP encode error integers outside the JavaScript safe range as decimal strings.
  • Console lock contention and HTTP concurrency admission now return TDB_BUSY instead of TDB_IO/WouldBlock. details.resource identifies host_database, shared_database, console_request_id, or console_in_flight. Node synchronous callback reentry returns TDB_REENTRANT_ACCESS. Consumers should update their structured error handling accordingly.
  • Completed Python stub-generator return mappings for existing CAS, atomic batch deletion, unique-index, and n-gram query APIs, together with substring and equality-filter argument types. The delivered stub is regenerated against the current wheel.
  • Completed the public Node error union with edit revision conflicts, idempotency key conflicts, and unknown write outcomes, allowing callers to narrow detail types by error code.
  • Python database instance methods now acquire PyO3 borrows explicitly and fallibly. Same-database callback reentry returns TDB_REENTRANT_ACCESS, and cross-thread borrow contention returns TDB_BUSY. Batch-query workers retain the callback's database identity; shared read borrows continue to allow concurrent reads.
  • Fixed Python transaction commits consuming the builder before borrowing the database and panicking on borrow conflicts. Commit now acquires the borrow and passes kernel admission before consuming operations. Contention, reentry, closure, or recovery protection preserves pending operations for later submission or rollback. Closed instances reject creation of new transaction objects.
  • Once standalone Server shutdown begins, new reads and writes return TDB_DATABASE_CLOSED with empty details. HTTP status remains 503, legacyCode: "SERVICE_UNAVAILABLE" preserves the former category, and retryable is false.

Scope Shared access uses the single-writer transaction model. Format changes appear in the unified request contexts and cross-reopen confirmation section. Other wrappers and remaining public entries follow the phased contract. Poisoned host locks require releasing related handles and checking recovery. Shutdown timeout ends the current wait. See the kernel SDK guide for usage.

Prepared parameter diagnostics and public error catalog

  • Missing, unexpected, named JSON conversion, vector-slot type, and Rust non-finite Prepared parameter errors now include stage=bind and target.parameter. Parameter names retain their literal mapping keys, while missing and unexpected names continue to be selected in stable name order.
  • Conversion and binding diagnostics preserve the original code, details, and cause. Rust adds the QueryParameter context variant and underlying() for matching the original variant. ErrorTarget provides distinct query-location and parameter-name representations. Python preserves exception inheritance, and Node, standalone Server, embedded HTTP, and Console data transport preserve the same diagnostic fields.
  • Python stubs, Node public declarations, and type-consumption checks include the binding stage and parameter targets. Shared cases cover invalid arrays and objects, vector parameter types, sorted missing and unexpected names, and literal special-character names, with valid queries after rejection, unchanged WAL bytes, and complete facts after reopening.
  • Adds a public error catalog for opening, shared access, transactions, Prepared queries, and closing, recording validation layers, fields, and completion boundaries. It documents the facts available at WAL, application, grouped synchronization, and response-delivery stages. General write outcomes and other API field locations remain phased work.

Transaction write outcomes and failure delivery

  • Transaction commit errors add optional write metadata with phase, outcome, and applicable transaction_consumed. Core distinguishes admission, validation, WAL, application, and response stages while preserving the original code, details, and cause. Rust adds the WriteFailure context variant, with underlying() exposing the original category for pattern matching.
  • SDK admission checks lifecycle, write permission, and WAL writability before consuming a transaction. Shared Rust builders and active Python transactions retain buffered operations after admission rejection. Core validation and later failures report consumption. Known Node transaction-construction checks and callback reentry expose the corresponding state, while callers retain their parameter arrays.
  • WAL append and application failures report unknown. Grouped commits report group_sync/unknown when final synchronization fails. Server delivers this result to successfully executed requests awaiting confirmation and preserves independent validation or execution errors. Group admission failures explicitly reject pending requests.
  • Server queue saturation and expiration before execution report not_committed. Response-wait timeouts and lost response channels after enqueueing report unknown. HTTP errors carrying write context set retryable=false, allowing callers to decide retries using the phase, consumption state, and reconciliation result.
  • Response-budget failures when replaying an already committed Console transaction retain details.committed=true and add response/committed. The original transaction remains confirmable through its receipt. Python stubs, Node declarations, CLI JSON, HTTP, and Console data adapters carry the same fields. Controlled faults cover WAL, application, and recovery in Rom and Mmap modes, plus Server grouped synchronization and background-task failures.

Direct writes and pre-commit TQL boundaries

  • Direct node and edge CRUD, Payload patches, and CAS provide write phases and outcomes. Admission and validation failures report not_committed, while WAL or application failures report unknown. Direct entry points omit transaction-buffer consumption. Original error codes, details, exception inheritance, and single-entry WAL encoding remain in use.
  • Direct writes share recovery protection during application after WAL append. Failure quarantines the current instance and already admitted shared queries. Callers release resources, reopen, and reconcile recovered facts. Existing index synchronization remains in use, and resource diagnostics retain budget and I/O classification through write context.
  • TQL mutation lexing, parsing, planning, and budget-admission failures report validation/not_committed. Once transaction submission starts, its inner phase is preserved. CLI mutation pre-parsing provides the same outcome, and Python, Node, HTTP, and Console carry the Core fields.

Validation scope Independent complete-fact fixtures cover three dtypes, Rom and Mmap, WAL synchronization faults, application faults, rejection of later writes, file-group moves, reopening, and another persistence cycle. Language argument extraction and external transport confirmation remain phased work. Durability follows the synchronization mode, and grouped results depend on the final group completion point.

Text and index maintenance completion points

  • Text registration, keywords, warmup, full rebuilding, property-index creation and removal, explicit Rust QuIVer construction, flush, and compaction provide write outcomes. Maintenance admission checks permissions, lifecycle, and WAL writability before changing text or index definitions.
  • Adds phase=publish, recorded by the storage kernel at the file-group publication boundary. Publication failures before the commit marker completes report unknown, while later WAL cleanup failures report committed. Unique-constraint candidate rejection preserves the previous definitions. Publication failure quarantines the instance, and reopening restores constraints and complete facts according to the actual commit point.
  • Text and keyword updates check instance budgets and reserve shared workspace before tokenization, conversion, and index growth. Budget rejection preserves previous text and WAL contents, and temporary reservations return on completion. Unique-index construction uses the existing ordered active-ID directory to produce deterministic existing and conflicting node identities.
  • Node declarations add publish. Shared cases cover Rust, installed Python wheels, Node native modules, and installed npm tarballs, checking complete nodes, vectors, Payloads, edges, index definitions, text queries, read-only file groups, reopening, and another persistence cycle.

Entry-point scope Rust and Node cover Rom and Mmap. The current Python constructor uses default Mmap. All three cover f32, f16, and u64. Explicit QuIVer construction, captured tasks, and runtime modes are existing Rust entry points.

Background maintenance and independent destination publication

  • Captured QuIVer tasks and explicit builds recheck WAL writability and recovery protection before installing a candidate, rejecting publication when the writer fails during construction. Execution or cancellation returns workspace and admission resources. Admitted tasks retain their existing file-lease lifecycle.
  • Runtime QuIVer modes, automatic-build toggles, and periodic-compaction configuration provide write metadata and WAL admission. A replacement compaction registration is installed after creation succeeds, preserving the previous registration on configuration failure. Background last_failure adds canonical code, details, and optional write, with compaction reporting its actual publication progress.
  • The outermost write on snapshot creation, restoration, manifest publication, and dimension migration describes the destination. Source-checkpoint or staging failures before destination publication report validation/not_committed and retain the original error chain. Snapshot directory synchronization failure after rename reports publish/unknown.
  • Migration reserves the final database quota before exposing the destination, preventing another instance from taking that capacity between commit and return. Completed pre-commit rollback reports publish/not_committed, synchronization failure after marker rename reports publish/unknown, and cleanup failure after durable commit reports publish/committed. Snapshot and manifest operations validate generation_id before checkpointing the source.
  • Acceptance extends existing maintenance contracts and fault suites with controlled build interleavings, real background compaction, destination-quota contention, complete recovered facts, and another persistence cycle. Public declarations and actual Python and Node artifacts are checked together.

Management entry points and ordinary field diagnostics

  • Adds target.field for covered ordinary API inputs while retaining the original category, details, and cause. Existing write outcomes survive field and Prepared-parameter wrappers, preserving facts supplied by the actual execution point when outer admission adds context.
  • Synchronization configuration, capacity reservation, and graph-index repair check WAL writability before changes. Memory-quota rejection reports its phase and field while preserving the prior configuration and shared registration. Rust uses bytes; Python and Node use mb for their MiB interfaces. ReadOnly and Immutable instances can adjust their runtime quotas.
  • Checkpoint failure after in-memory graph repair quarantines the instance and reports its actual apply or publish phase. Recovery proceeds by releasing relevant handles and reopening. Existing QuIVer build handles read the current quota when capturing later tasks, fixing stale limits after runtime quota changes.
  • Runtime synchronization-mode string errors and covered explicit management conversions in Python and Node provide canonical fields and validation/not_committed. Python retains OverflowError inheritance for MiB conversion overflow. SDK callback reentry for synchronization, quota, capacity, and graph repair provides admission/not_committed.
  • Shared maintenance contracts cover 28 Rust entry points and 23 exposed Python and Node entry points, adding real callbacks, quota rollback, read-only quotas and file groups, graph-repair faults, reopened contents, and type consumption. Other automatic language extraction, complete AST locations, and outer transport remain phased work.

Management argument extraction and Prepared mappings

  • Python capacity reservation, MiB quotas, automatic compaction intervals, and automatic-build switches extract arguments after acquiring the database request borrow. Covered built-in type failures retain TypeError or OverflowError inheritance and add TDB_INVALID_INPUT, target.field, and validation/not_committed. Custom integer-protocol exceptions retain their original identity, cause, and existing diagnostics.
  • Python Prepared execution now implements its declared string-keyed Mapping contract, including MappingProxyType and UserDict. Container and key rejection uses target.field=parameters. Conversion failures for named values use stage=bind and the original parameter name. Mapping-protocol host exceptions propagate unchanged, and same-database conversion callback reentry follows the public admission contract.
  • Node management scalars validate their original numeric or boolean types. Covered type rejection includes canonical fields and write phases. Automatic-build and compaction callback reentry provides admission/not_committed. Converted non-object Prepared containers use target.field=parameters. Public types, Python defaults, and the default behavior of Node's optional interval retain their established contracts.
  • Actual binding cases cover three dtypes, host conversion exceptions and causes, mandatory callbacks, WAL and complete data after rejection, subsequent valid requests, and another persistence cycle. Framework extraction and JSON conversion in other entry points, together with complete AST locations, remain phased work.

Raw Prepared scalars and management strings

  • Node Prepared reads original arguments inside the method, providing TDB_INVALID_INPUT, stage=bind, and the literal target.parameter for NaN, infinities, undefined, BigInt, Symbol, functions, and compound parameter values. Invalid outer containers provide target.field=parameters. Parameter keys retain NUL and Unicode characters.
  • Arrays and objects are rejected at the scalar boundary, including cyclic compound values. Host exceptions from property enumeration and getters retain their original identity, cause, and existing error fields. Valid scalars reuse the existing numeric conversion, and property enumeration retains its established rules.
  • Python and Node add structured string-type rejection for synchronization modes and generation identifiers. Python extracts strings after acquiring the request borrow, retaining original exception types and canonical fields for covered failures. Node strictly checks original string types. Manifest callback reentry provides admission/not_committed, while publication outcomes continue to follow Core completion points.
  • Actual artifacts cover three dtypes, valid scalar boundaries, getter and Proxy exceptions, callback rejection, valid queries after errors, WAL contents, and complete reopened data. Other N-API and PyO3 arguments, other JSON entry points, AST locations, and external transport remain phased work.

Query arguments and Filter mappings

  • Python integer count and expansion fields in ordinary and grouped search, together with count and parallelism fields in batch search, are extracted after the request borrow is acquired. Covered built-in failures retain TypeError or OverflowError and field locations. Host integer-protocol exceptions retain their original identity and cause. Corresponding Node entry points add original numeric-type and safe-integer rejection while preserving established defaults and optional null behavior.
  • The three TQL query entry points add target.field=query for string-type rejection. These failures precede parsing and omit the stage. Read failures omit write, mutation-query type failures provide validation/not_committed, and SDK reentry provides admission/not_committed. Python encoding failures retain their original exception type.
  • Python ordinary, grouped, contextual, advanced, and hybrid search now implement their declared outer Mapping Filter contract, including MappingProxyType and UserDict. Conversion runs within the request borrow, and host mapping exceptions propagate unchanged. Covered Python Filter representation failures and Core semantic rejection in both languages provide canonical categories and the corresponding field while reusing Core filtering rules.
  • Actual binding cases verify rejection across three dtypes, real conversion callbacks, valid default calls, original host exceptions, complete matching and excluded result sets, WAL contents, subsequent valid writes, and complete reopened data. Actual npm installation explicitly awaits asynchronous batch-query acceptance, and type consumers retain the public argument boundaries.

Query cancellation causes and deadline transport

  • Core retains TDB_QUERY_CANCELLED for explicit cancellation and adds QueryDeadlineExceeded with TDB_QUERY_DEADLINE_EXCEEDED for expired deadlines, using empty details. When both conditions are observed at one cooperative checkpoint, the deadline takes precedence. Clones share the cancellation signal, and external and Console-session deadlines use the earlier bound.
  • Standalone Server deadline rejection uses the canonical deadline code and legacyCode=REQUEST_TIMEOUT, retaining HTTP 504 and timeout metrics. Known write outcomes retain their original phase and retryable=false. Embedded Console request-body deadlines use HTTP 408, execution deadlines use HTTP 504, and explicit cancellation retains HTTP 408. Callers that previously handled execution deadlines as cancellation must handle the new code, and exhaustive Rust matches must add the new variant.
  • Console write requests terminated before dispatch provide admission/not_committed. Transactions, guarded transactions, node imports, and edge imports terminated after preparation but before WAL submission provide validation/not_committed. Prepared receipt and response workspaces are returned when the request exits. Operations that enter WAL retain their atomic commit completion contract.
  • Cases use already-expired controls, real pre-commit barriers, and incomplete external request bodies to verify causes, reuse of request IDs, WAL and complete facts, receipt workspaces, actual asynchronous exit, and file release. Coverage includes three dtypes, Rom and Mmap, HTTP permit return, and subsequent valid writes. Python error mapping, actual bindings, and the npm type catalog include the new category.

Extended retrieval arguments and anchor sequences

  • Covered integer arguments in exact, graph-first, contextual, advanced, and hybrid retrieval add structured type rejection and field locations. Python extracts integers after acquiring the request borrow and retains original type and host-protocol exceptions. Node reuses safe-integer validation and established positivity rules. Public defaults and type consumption are verified together.
  • Python graph-first retrieval extracts anchor sequences inside the request scope. Same-database writes from sequence access and element integer callbacks return reentry errors. Hybrid text extraction adds query_text or queryText locations, and read failures omit write outcomes.
  • Covered count fields in Node contextual and advanced configuration provide canonical type diagnostics. Omitted or undefined fields use defaults, while null retains the established rejection boundary. Optional method arguments continue to support null defaults. Original configuration-getter exceptions and causes propagate directly.
  • Actual binding cases across three dtypes verify field rejection, integer, sequence and configuration callbacks, complete outer results, original host exceptions, valid defaults, and subsequent writes. Tests retain old objects after close, move the Windows file group, and reopen to verify updated vectors, payloads, and edges. Vector and nested-member locations and framework sequence length-hint policies remain separate contract work.

Graph arguments and direct CRUD admission outcomes

  • Neighbor, reachability, detailed reachability, and subgraph reads add field diagnostics for IDs, depths, budgets, and directions. Python converts parameters and label sequences inside the request borrow while retaining original type exceptions, ValueError for direction enumeration rejection, and host-protocol exceptions. Node checks raw types for the covered fields and retains original configuration-getter exceptions and established null default rules.
  • Fifteen direct CRUD entries provide admission/not_committed when the SDK rejects reentry or borrow contention, with the consumption field omitted. Coverage includes node and edge writes, both batch insertion forms, atomic batch deletion, payload patches and conditional replacement, and vector updates. Transaction, WAL, and publication outcomes after core entry remain determined by the core.
  • Public Node declarations include the existing deleteManyAtomic and compareAndSetPayloadField runtime methods, with precise return-type and invalid-input consumption cases.
  • An independent three-node chain covers three dtypes, complete paths, per-hop attributes, outgoing and bidirectional scan counts, defaults, callback rejection, and unchanged WAL contents. Tests retain old objects after close, move the Windows file group, reopen to verify all facts, then perform conditional updates and atomic deletion and reopen again. Nested members, framework length-hint exception policies, and other entries continue under their respective contracts.

Basic read arguments and result ownership

  • Node, payload, existence, outgoing-edge, incoming-edge, and exact-edge reads add ID and label extraction diagnostics through id, src, dst, and label fields. Python executes integer protocols inside the read-request borrow, retains built-in exception inheritance, and propagates original custom integer-protocol exceptions. Node checks raw types and safe integers.
  • The Python existence guide uses the public id in db entry. None, null, and omitted labels select all incoming labels, while an empty label is matched by its contents. Exact-edge reads require the label argument. Unicode and NUL labels remain intact.
  • Actual artifacts cover three dtypes, complete nodes and edges, absent nodes, language integer ranges, callback reentry, and Python cross-thread shared reads with competing writes. Tests retain nodes, vectors, payloads, edges, and old database objects during close. After moving the file group, old results remain independent snapshots and updated facts survive two reopenings.

Public call shapes and framework diagnostics

  • The Python package validates argument structure against native public signatures for instance methods, selected special methods, and module functions. Missing arguments, unknown keywords, duplicate values, positional-only arguments, and excessive positional counts retain TypeError inheritance and expose TDB_INVALID_INPUT, target.field, and details.argument_kind. Calls with multiple issues use a fixed structural ordering. Python target fields preserve original Unicode, NUL, and isolated-surrogate keyword names.
  • The Node public loader identifies registered missing required positions before N-API conversion. Explicit undefined continues through existing type checks, while extra positional arguments and configuration objects follow their entry-specific rules. Callback reentry retains rejection priority.
  • The SDK constructs validation/not_committed results for covered write calls, with transaction_consumed=false for Python transactions and Node commitTransaction. Valid Python calls continue into the native binding, preserving original host exception objects, causes, class identity, signatures, and defaults.
  • Actual artifact tests across three dtypes check diagnostics, zero conversion callbacks, complete facts, and unchanged WAL bytes, followed by a real commit, close while retaining old results, Windows file-group movement, and two reopenings. Constructor diagnostics, invalid receivers, and interpreter expansion errors before callable entry remain separate follow-up boundaries.

Constructor values and resource return after failure

  • Covered integer, string, enum, and MiB conversions in database and resource-runtime constructors expose TDB_INVALID_INPUT and target.field. Node also covers database boolean configuration. Python retains built-in exception inheritance and original custom integer-protocol exceptions and causes. Node retains original configuration-getter exceptions. Session configuration type and JSON rejection identify options_json or optionsJson.
  • Fixed integer multiplication overflow while formatting an extreme-dimension rejection. The kernel rejects zero dimensions and dimensions above 65536 with the dim field, and identifies runtime worker-limit and maintenance-budget conflicts. Registered tasks and quotas return through ownership after open failures.
  • Independent records cover three dtypes, duplicate writers, quota return, Windows file movement while retaining old results and error objects, same-path retry after stored-identity mismatch, and two persistence reopenings. Python uses its current Mmap constructor API, while Node covers Rom and Mmap. Python public stubs now specify int for cache MiB arguments, with positive and negative type consumption.
  • This section records constructor values. Constructor call shapes and ordinary CRUD convergence are described below.

Configuration containers and runtime-handle diagnostics

  • Node database and resource-runtime options are checked as non-array objects before reading properties. Resource-runtime calls that previously treated primitive values or arrays as default configuration now return TDB_INVALID_INPUT with the options field. Omitted, undefined, and null options retain default configuration. Named properties follow the existing prototype-chain lookup, and unknown properties follow their entry-specific rules.
  • Legacy numeric-position database construction now provides TDB_API_MIGRATION_REQUIRED, migration details, and the options field. npm declarations add the existing null default forms for configuration and snapshot-module runtime arguments. The runtime member inside database options continues to require a valid handle.
  • Python database built-in boolean extraction and native runtime type rejection add field diagnostics. Runtime validation serves database construction, snapshot verification, and restoration in both bindings. Known restoration-handle rejection provides validation/not_committed. Node getter and Proxy exceptions and Python host conversion exceptions preserve their original objects, causes, and existing attributes.
  • Actual artifacts cover invalid configuration, original exceptions, complete default-dimension records, prototype-free configuration, inherited getters, unknown properties, and WAL integrity while retaining a writer. Tests then create, verify, and restore real snapshots, reopen to check complete nodes and quota state, and perform close, file movement, and subsequent persistence.

Constructor call shapes and ordinary CRUD conversion

  • Python TriviumDB, ResourceRuntime, and ConsoleSession bind arguments against SDK public-signature metadata inside the native constructor entry. Missing arguments, unknown keywords, duplicate values, and excess positional arguments provide TypeError, TDB_INVALID_INPUT, target.field, and details.argument_kind. The same metadata provides signature for Python 3.9 compatibility, with precise generated stub types. Batch-insert vectors/payloads outer declarations are corrected to list to match their existing native representation. ID collections and individual vectors retain Sequence. Shape rejection precedes value protocols, file creation, and resource registration. Native class identity, signatures, and defaults are preserved.
  • Node database construction supplies the canonical missing-path diagnostic. Constructor forwarding preserves prototype, constructor, instanceof, subclasses, and newTarget. An explicit undefined path follows type rejection, and extra positional arguments follow the existing JavaScript call rules.
  • Known language-type, representation-range, and JSON conversion failures in fifteen ordinary CRUD entry points provide validation/not_committed and omit transaction consumption. The SDK removes internal temporary-transaction consumption from batch-insert errors while preserving kernel phases, outcomes, and causes. Node automatic-ID safe-integer rejection adds its pre-commit outcome. Top-level target.field retains the parameter name. Batch and JSON members use RFC 6901 JSON Pointer with array indexes, escaped keys, Unicode, and NUL preserved. Object keys that cannot be represented as JSON strings identify their containing object.
  • Python converts IDs, vector components, edge weights, and JSON while holding the request borrow. Existing integer, floating-point, and Sequence protocols remain accepted. Length-hint exceptions retain their existing tolerance, and buffers grow from actual elements. Batch conversion fixes its outer index range. If a callback shortens a list and removes a required member, the entire batch is rejected with that member's location. Appended members are left for subsequent calls. Original integer, float, iterator, getitem, getter, and Proxy exceptions retain identity, causes, and existing attributes. Same-database callback reentry follows request admission.
  • Node constructor strings, ordinary CRUD strings, and JSON strings use strict UTF-16 decoding. Isolated surrogates are rejected as input errors, preventing replacement characters from changing paths, labels, or JSON keys. Valid Unicode and NUL are preserved. Optional edge arguments retain each language's default rules, and Node upsertEdge still requires weight. Removes obsolete Payload patch shorthand examples.
  • An independent CRUD field matrix defines complete before-and-after facts. Actual binding contracts cover all three dtypes, Python's current Mmap entry, and Node Rom/Mmap. They verify content and WAL after field rejection, then use all fifteen write entry points, retain old objects across close, move Windows file groups, and reopen and persist twice. Interpreter unpacking before callable entry, invalid receivers, and JavaScript non-constructor calls follow host exception contracts. Retrieval, index, AST, and other wrapper work continues in their respective entry groups.

Retrieval, graph-read, and text-entry fields

  • Eight retrieval entry points add conversion diagnostics for floats, booleans, vectors, anchors, labels, and JSON members. Top-level fields use public parameter names, nested fields use JSON Pointer, and read errors omit write. Python conversion runs within the request borrow. Node preserves original getter exceptions, array reads, and existing synchronous/Promise completion, with row and component locations for batch u64 range failures.
  • The kernel supplies precise fields for finite search configuration, diffusion-bias dimensions, and minimum-edge-weight constraints. Empty batches validate the same configuration before returning an empty result. Shared SDK conversion rejects NaN, Infinity, and arithmetic overflow in hybrid_alpha/hybridAlpha, fixing paths where max masked invalid input. Rust callers use underlying() to inspect original categories beneath field context.
  • Four graph-read entry points add Node label-container, member, configuration-container, and direction diagnostics. Python graph labels and retrieval sequences retain existing length-hint tolerance, with buffers growing from actual elements. Node advanced/context search and reachability configuration require non-array objects. Omitted/null configuration retains defaults, positional null defaults and configuration-member rules remain distinct, and npm declarations reflect valid default forms.
  • Indexed equality and substring lookup add object, JSON, limit, field, and text diagnostics. The kernel validates the 1–1000000 limit, empty equality conditions, and empty substring inputs. Text, keyword, build, and complete-rebuild entry points add write outcomes for known conversion and SDK-admission failures. Failed requests preserve existing text and index facts.
  • Complete rebuild records contain id, text, and optional keywords. Missing members, types, encoding failures, and unknown fields provide record locations. Node now rejects previously ignored unknown rebuild fields under the closed-record contract. Text, label, field, and record strings in these Node entry points use strict UTF-16 decoding, rejecting isolated surrogates while preserving valid Unicode and NUL. Python accepts the declared Mapping input, captures this batch's record objects before materializing and converting fields, and continues with captured records when a callback modifies the outer list. Host mapping, numeric-protocol, and getter exceptions retain identity, causes, and existing attributes.
  • An independent field matrix covers all three dtypes, Python's current Mmap entry, and Node Rom/Mmap. Cases verify complete scores/Payloads, member locations, original exceptions, thread-borrow contention, WAL after rejection, complete text/keyword and graph facts, file movement after close, and two reopenings. Public signatures, defaults, generated stubs, and positive/negative type consumption against actual artifacts are maintained together.

Python transaction request isolation and collection

  • Python transaction methods now acquire explicit fallible borrows. Reentry from an in-method conversion callback returns TDB_REENTRANT_ACCESS with operation: "python_transaction_callback"; cross-thread contention returns TDB_BUSY with resource: "python_transaction". Rejection retains buffered operations, while other transactions follow their own admission state.
  • Builder presence is the single source of transaction state, removing the TxBuilder missing panic paths. Adds TDB_TRANSACTION_FINISHED with empty details for buffering, committing, rolling back, or entering a context after consumption or rollback. Python exceptions retain their RuntimeError inheritance; the Rust catalog, Node declarations, and HTTP mappings are updated together.
  • Context-manager commits use the same admission checks and retain the transaction when the database is busy or closed. Host conversion and context exceptions retain their original identity. GC now traverses the transaction's database reference, resolving resource retention in cycles formed by Hooks capturing transactions. A retained transaction continues to own its database; explicit close semantics remain unchanged.
  • Contracts cover real conversion callbacks and event-controlled contention across f32/f16/u64, post-commit/rollback/failure states, retained ownership, directory moves after GC, and complete data after reopening. Python method signatures and normal return types remain unchanged.

Scope: this batch covers Python transaction-object borrowing and finished state. Framework argument extraction, ordinary conversion errors, other wrapper objects, and general write-outcome fields remain phased work.

Structured TQL parsing diagnostics

  • Database queries, Prepared TQL preparation, and mutation parsing add stage: "lex" | "parse" and optional target.query_span, preserving TDB_QUERY_PARSE, schema_version: 1, and details.reason. Rust adds the QuerySyntax variant and structured parser entry points. The existing QueryParse(String) variant and standalone parser entry points remain available; Rust callers matching database parse errors must handle the new variant.

  • Corrects locations for failed lexical units and consumed unexpected tokens. Confirmed positions use half-open UTF-8 byte ranges whose ends come from actual scanning. Whitespace and comments are separate from adjacent tokens. End-of-input and token-budget boundaries use zero-length anchors. Lines and columns are one-based, CRLF counts as one newline, columns count Unicode scalar values, and a tab counts as one column. Semantic checks without an accurate location and oversized input omit the location.

  • Errors for database-prepared parameters carry both the parameter name and its first actual reference range, including the $ prefix. Core retains the source and supplies locations for missing parameters, JSON conversion of referenced parameters, and vector-slot binding. Parsing distinguishes references from strings, comments, and document-filter operators. Extra parameters, standalone scalar conversion, and preparation from manually constructed ASTs retain their known parameter names. Prepared clones share source metadata. The Rust QueryParameterSource wrapper preserves the original category, details, cause, and known write outcomes, with underlying() exposing the original variant for matching.

  • Python, Node, CLI JSON, embedded Console HTTP, and standalone Server preserve the same structure. The built-in Console data adapter forwards extension fields through native exceptions, JSON error envelopes, and fetch responses. Python uses None for absent extension fields; Node and JSON omit them. HTTP parsing rejection retains status 400 and the legacy category. Shared fixtures cover f32/f16/u64 bindings, Unicode and newlines, rejected reads and mutations, and complete data after close and reopen.

  • AST construction origins cover entries, patterns, filters, every PipelineStage, expressions and predicates, return/aggregate/order/pagination nodes, and mutation sources, actions, nodes/edges, assignments, vectors, and JSON. Rust adds paired LocatedTql parser entry points, read-only AST/source views, and PreparedTql::from_located. Execution from manually constructed ASTs reports stages and locations according to its available provenance.

  • Diagnostics add plan and execute. Symbol checks follow AST paths to the exact reference or conflicting return item. Operator construction, computation, budgets, projection, and transactions attach origins at their actual checkpoints. Fused operators use the smallest enclosing range of participating logical nodes, and generated subqueries retain their original entry origin. QuerySource and field/parameter wrappers preserve the underlying category, cause, details, and write outcomes. Field or parameter names can accompany a query range.

  • SET, SET VECTOR, and DELETE validate node-variable bindings for empty match sets, and GraphFirst RANK validates bindings and node type. Basic SEARCH forwards cancellation control to its real pipeline. Fixes the DisableFusion test hook retaining fused elision markers and potentially skipping RANK. The split path executes the original logical stages. Shared cases verify three dtypes, real language artifacts, both HTTP forms, raw ASTs, cancellation, WAL contents, and complete data after reopening.

Integration note Rust variant matching uses underlying(), and info() exposes the public diagnostic. Query stages and write outcomes are evaluated separately. See TQL diagnostics.

Closing parameter, cancellation, and transport contracts

  • Adds field diagnostics to property-index, composite-field, and Leiden arguments. Snapshot, migration, close-timeout, FFI-path, Console-string, and cancellation-ID inputs use the same representation checks. Python converts within request borrowing, Node reuses synchronous reentry admission, and original host exceptions propagate.
  • Python transaction-buffer conversion failures include member paths and validation/not_committed with transaction_consumed=false, preserving earlier operations. Cancellation during conversion rejects the operation before appending to the buffer. Node commitTransaction reports operations member paths and rejects explicitly mistyped label/weight fields while retaining defaults for omitted fields. Known ConsoleSession and PreparedTql handle rejections identify the corresponding field. The public Node loader validates handle provenance and obtains reentry write metadata from the SDK operation catalog.
  • Exact scans observe cancellation inside Rayon shards. Graph algorithms, traversal, and structural analysis check at node, edge, and iteration boundaries. Worker threads inherit combined controls and release workspaces on rejection. Existing low-level synchronous helper return types remain available, while Database and TQL use fallible execution. Transactions follow their atomic protocol after entering WAL.
  • Embedded HTTP accepts X-TDB-Request-ID as an ASCII JSON string, preserving identity before reading the body and verifying the body's requestId before execution. The data adapter sends the header automatically, supports Unicode, and receives the original identity on early rejection.
  • Server queue saturation uses TDB_BUSY with resource write_queue. HTTP, cache, and service failures use canonical codes with legacyCode for previous categories. Path, method, body, and adapter failures return structured envelopes with outer request identity. Errors carrying write retain retryable=false, leaving decisions to the caller's phase, outcome, and consumption handling.
  • Explicit CLI JSON output covers argument parsing, non-Core command errors, I/O, and configuration warnings. Public documentation records entry fields, retry decisions, compatibility, and current SDK/Core dependencies.
  • Removes legacy TUI/REPL interaction, highlighting, layout, display-truncation, and WebUI page cases. CLI acceptance covers commands and JSON/CSV data contracts, while the Server HTTP suite directly verifies data, transactions, and transport.

Typed request scopes and host bridges

  • Python and Node add public RequestContext classes. with context and context.run propagate request identity, cancellation, and deadlines into ordinary typed calls. IDs use 1–128 UTF-8 bytes. Millisecond deadlines start at construction, and zero delegates cancellation to the host. Nested scopes retain outer controls, with at most 32 user scopes in each binding.
  • Rust adds synchronous RequestContext::run and Reader/Writer with_request_context methods. SDK borrow guards and Core scopes exit on their creating thread, while control handles can be cloned for workers. Python ContextVar and Node AsyncLocalStorage isolate tasks, and native batch queries explicitly carry their controller into worker threads.
  • Typed transactions consume buffers after SDK borrowing and admission succeed. Ordinary shared transactions inherit the pre-WAL cancellation check. Direct CRUD and transactions recheck control after acquiring the actual WAL lock, covering cancellation during lock waiting and receipt encoding. Console execution installs the combined Core scope. TQL and retrieval check their integrated execution checkpoints. Close, rollback, and registered resource diagnostics use their own lifecycle and borrowing rules. Results follow actual kernel completion points.
  • Custom Console bridges receive frozen request metadata and capture host callbacks at creation. Optional drain callbacks provide awaitable host completion. A false acknowledgement returns TDB_BUSY with resource console_bridge_drain, and other invalid acknowledgements return TDB_CONSOLE_TRANSPORT. Failed disposal keeps admission closed and permits cleanup retries. Primitive host rejections retain their cause, and dispatched writes retain unknown response outcomes.
  • Independent shared cases cover three dtypes, cancellation from conversion callbacks, transaction buffers, asynchronous task isolation, cancellation in the second query's worker, nesting boundaries, original host exceptions, and complete reopened facts. Python stubs, Node declarations, installed packages, and non-UI bridge contracts are validated together.

Scheduling reminder Controllers observe cancellation at actual checkpoints. Host-created threads, processes, and external tasks explicitly carry identities and control events and confirm drain and resource release at their respective completion points.

Unified request contexts and confirmation across reopening

  • Core defines RequestContext with a request ID, shared cancellation/deadline control, and write classification, exported through sdk. Shared Rust handles add try_read_with_context, try_write_with_context, and commit_tx_with_context. Admission rejection preserves the transaction builder. Cancellation during validation after consumption returns validation/not_committed with transaction_consumed=true. The storage kernel supplies the actual commit outcome.
  • Console first parses a borrowed protocol envelope and command classification, then decodes the complete command after acquiring the host borrow and kernel admission. Session registration, cancellation, SDK admission, and the final pre-WAL check share one controller. Existing Console JSON entry points in Rust, Python, Node, and embedded HTTP use this path.
  • Guarded transactions store their complete identity, created IDs, and commit revision in the same WAL transaction as their facts. Recovery exposes both after a complete commit seal, and checkpoints publish them atomically. Retained receipts support transactionStatus and idempotent replay after close, recovery, and reopening. Each database retains at most 64 receipts totaling 8 MiB, with FIFO eviction. Missing or evicted receipts return unknown, requiring reconciliation against complete facts using application-persisted identities.
  • The main-file format advances to v11, adding a length- and CRC32-protected receipt block after unique constraints, and WAL advances to v4. The current kernel reads main-file versions v5–v11. Writable opening retains the existing v2 WAL upgrade path. It validates v3 WAL as a stream, atomically converts the complete transaction prefix, and discards physically truncated tail frames. Valid empty v3 WAL supports read-only opening. v2 WAL continues through writable recovery.
  • Controlled regression cases cover pre-WAL cancellation, transaction-buffer consumption, recovery under one commit seal, and invisible unsealed transactions. Independent v10/v3 fixtures produced by the previous artifact verify three dtypes, byte-preserving read-only access, upgrades, complete nodes/vectors/Payloads/edges, and subsequent reopening. Fixture provenance records the producer and hashes.

Persistence reminder Receipt durability follows SyncMode. Reopening creates a fresh edit-revision identity. Retained receipts confirm historical commits, and subsequent edits use the current snapshot. Preserve a complete file-group backup before switching to v11/v4. Earlier kernels use the pre-upgrade backup for recovery.

Request execution and transport completion

  • ConsoleSession adds is_drained() in Rust/Python and isDrained() in Node. It returns true after detach closes admission and every Core request exits. Embedded HTTP adds GET /v1/console/status with the same drained state. Session, capability, and permission rejection for parsed write commands now carry admission/not_committed while preserving the original category and details.
  • Fixes Server write requests being executed after cancellation or expiry while waiting for the actual write lock or earlier operations in the same batch. Each operation rechecks its response receiver and deadline under the actual database write lock. Requests whose waiters exited are skipped, expired requests return admission/not_committed, and valid operations in the batch continue to commit.
  • The Console data adapter reports connection, decoding, response identity, and receipt-shape failures as TDB_CONSOLE_TRANSPORT and preserves the original cause. Dispatched writes and failed original-transaction confirmation carry response/unknown. Local queued cancellation carries TDB_QUERY_CANCELLED, AbortError, and admission/not_committed. HTTP failures retain their actual status, kernel diagnostics, and existing write outcomes. Active request AbortSignals are forwarded to fetch.
  • Request identity and command contents use the serialized snapshot taken before queueing. Cancellation calls are deduplicated per active request. Dispose waits for its detach callback, request queue, and issued cancellation calls. Core session drain, transport-task termination, and database close have separate completion points. Controlled validation covers damaged responses after real writes, complete original-transaction confirmation, WAL and reopened facts, late rejection under the write lock, and actual language artifacts and type consumption.

Embedded Console edit conflicts and transaction confirmation

  • Console RPC v1 adds getNodes(withRevision:true), guardedTransaction, and transactionStatus through the existing JSON entry points shared by Rust, Python, and Node. Node data and its revision are captured under one read lock; Core validates the revision under the transaction write lock before WAL append, rejecting the entire transaction on conflict.
  • Core fact changes advance the edit revision, including direct host CRUD, CAS, TQL, ordinary transactions, vectors, and edges. Deleting and recreating the same content produces a new token. Revisions cover the whole database instance, so changes to unrelated nodes can conflict.
  • Guarded transactions match receipts by idempotency key, original revision, and complete operations, returning the original result when a retry matches a receipt. Status requests verify the complete original transaction. WAL submission consumes the original revision; a missing success receipt leaves the outcome unknown.
  • Bounded receipts retain at most 64 entries and 8 MiB of record contents, evicting the oldest first. Receipt queues, records, and acknowledgement buffers are admitted against memory budgets, with memory released on close. Retained receipts persist through WAL and checkpoints and confirm original transactions after reopening. Missing or evicted receipts require reconciliation using application identities.
  • The embedded HTTP adapter maps edit conflicts, key mismatches, and unknown outcomes to 409 while preserving structured Core errors. Existing unconditional writes retain their behavior. Embedded HTML uses its built-in client for guarded transactions. See the editing protocol for integration and request examples.

Embedded WebUI component integration

  • Adds console-client.js and console-embed.js to mount the existing HTML in a same-origin iframe through host HTTP or IPC bridges. Queries, nodes, edges, indexes, vector search, and graph operations use Console RPC v1. Standalone Server retains its HTTP mode.
  • Document edits, deletion, and imports enter write review with captured revisions and frozen transaction identities. Mixed baselines require fresh reads and review. Unknown submissions only query the original receipt and retain the complete request plus later draft edits. Console node IDs use lossless decimal strings across the full u64 range.
  • A stable host-provided storageKey isolates database drafts, history, and preferences. Disposal rejects unresolved drafts or queued work; hosts can export the original transaction before explicit exit. The client stops admission, requests cancellation and detach, and waits for admitted bridge calls. Hosts retain ownership of database persistence and file locks.
  • Bundles include the client, mount entry, and SHA-256 hashes for each resource. The Rust Server crate exports both scripts; integration documentation includes HTTP/IPC mounting and disposal examples.
  • The packaging command uses UTF-8 standard output for redirected Windows Runner logs and output paths containing Chinese characters. Its completion message includes both Chinese and English.

Scope: component resources share the host page origin. Console neighborhoods follow outgoing edges, path requests return one shortest path, and queries return JSON. The vector workspace supports f32/f16; use TQL for u64 vectors. Enhancements including GSAP and Sigma still load from CDN on demand. Hosts complete session teardown when windows close; receipts retain their instance-local lifetime.

Validation focuses on independent host writes, concurrent editing outcomes, complete transaction recovery, receipt eviction, WAL/application failures, and real commits after cancellation, including SDK artifacts across three dtypes. UI/UX and interface latency thresholds are excluded; executed platforms and suites follow the validation record.

Lifecycle, file leases, and shutdown hardening

  • After the database owner is dropped, independent search and build handles reject new work. Admitted tasks retain the file lease together with their storage until the relevant handles and tasks are released. This prevents a replacement writer from opening the same path while old mappings or background tasks remain alive. Explicit close still provides a resource-release completion point independent of object collection.
  • Windows now rejects hard-linked database files consistently with Unix, preventing one file from being accessed through different WAL, sidecar, and lock prefixes. Rejection creates no alias artifacts; the disk format is unchanged.
  • When synchronous close rolls back to the open state after admission or persistence failure, its original periodic compaction registration and interval are restored. Failed asynchronous shutdown continues to reject new operations until explicitly retried.
  • A panic from a custom Rust hook destructor after persistence is reported as a structured shutdown error. Storage and file leases are still released, the phase is closed, and later waits observe the closed state. Ordinary persistence failures continue to retain resources and the original error for recovery and retry.
  • The nightly Server adds build_app_with_shutdown and a cloneable ServerShutdown. shutdown().await drains queued writes, actual queries, and warmup work before awaiting Core close. The underlying work continues after a waiter is cancelled; failed shutdown can be retried. The standalone server now awaits this completion point during exit. The original build_app remains compatible.

Non-UI regressions cover owner destruction with surviving tasks, complete data reopening, hard-link rejection, maintenance restoration after close failure, hook destructor panics, and server draining, cancellation, and retries. Platform coverage follows the reported validation results; UI/UX and interface latency thresholds are excluded.

Nightly WebUI: node document workspace

The following describes the document workspace in standalone Server HTTP v1 mode. Embedded revision and receipt handling follows the component integration described above.

  • Adds a node document workspace where JSON and mapped Markdown/plain-text views share drafts, with browser draft restoration, preview, outline, find/replace, line diffs, and write review. Writes reuse /v1/transactions, without a new disk format or edit lease.
  • Merging or replacing staged work from another entry retains node versions, idempotency, and acknowledgement tracking. Refreshing a version also checks the editing baseline; external changes require explicit conflict handling.
  • Submitted batches freeze their request body, preconditions, and operation snapshots. Users may continue editing drafts and staging other nodes while awaiting a response, but cannot replace or withdraw the submitted batch. Success acknowledges only transmitted content and removes only that batch's queue entries.
  • Network failures, server errors, and unreadable success responses leave transactions containing document operations in an unknown state. “Confirm original transaction” retries the complete request with the original idempotency key. Confirmation checks the complete mixed transaction before acknowledging its operations. New drafts use a new batch and key after acknowledgement. A conflict while retrying an unknown transaction leaves its outcome unknown and requires reconciliation.
  • Fixes duplicate staging from Ctrl+S event propagation and serializes staging within a document during asynchronous version reads. Document writes reject node IDs outside JavaScript's safe integer range, consistently with other write entries.

Usage note: this is a nightly WebUI capability; the host manages database locks. Drafts are scoped by origin, page path, and node ID. Export and resolve old drafts before switching databases at the same address. The original request of an unknown transaction is held in the current page session; after refreshing or closing it, verify the entire transaction's actual outcome. Server idempotency receipts use instance memory; after restart, reconcile data by business identity.

Acceptance uses code review, syntax checks, and non-UI server contracts. UI/UX, styling, layout, animation, and elapsed-time threshold tests are excluded. Platform execution results are tied to the validated commit.