Source review: 14 November 2026. Merged LastDB revision 9e7565ec6d0be380a7780ea9c0fad73dbbd96546.
The guide describes 123 parts and 430 connections. This follow-up reviews eight commits after 4c6aae3. Completed reviews cover 1254 commits after October 21. The review follows changed code and surrounding callers across model, memory, disk, flush and ack, deletion, encryption, cloud, recovery, and services. Vendored LastStore is unchanged. This update covers the API 34 SDK, in-process saved queries, live socket commands, payment backoff, environment-aware app publication, and bounded cloud-log maintenance. Two recovery operations passed in DEV at this source. No new PROD pass or primary change is claimed.
The daemon starts one signed-log worker for personal, owned named, and registered received databases. Owned databases publish accepted changes after cloud access and creation are confirmed. The new backup snapshot --database NAME command queues an explicit native file snapshot. The former scheduled owner snapshot worker, daily full copies, cloud-release worker, and backup policy/status/list commands remain removed.
Each owned database needs checked account access and a live signed creation response with the matching database ID, environment, and protocol version. Confirmation is remembered in the process. Private databases need no sharing spec; shareable databases need an admitted binding. The legacy cutover protocol and fallback uploader are removed. Local writes still finish independently of cloud work.
Source: Daemon workers · Database turns · Signed creation · Current commands
Source: File snapshot · Held native roots · Snapshot transfer and restore
Owned named stores capture accepted changes. Personal capture is selected when the store opens: saved credentials, an existing accepted spool, or signed restore can enable it. Saving credentials later does not change an already-open store. First connection now records an intent to preserve the initial personal database before new edits enter the queue.
At that opening, LastDB keeps the exact earlier state in a private checkpoint: immutable run files are hard-linked, while CURRENT and markers are copied and synchronized. Both record and attachment roots are included. The initial inventory permits at most 2,048 files and 5 GiB per file. External references, pending attachment deletion, a capture gap, or a mismatched opening frontier refuse preparation. Failure keeps local data and blocks uncovered publication; a newer state cannot substitute for the missing original baseline.
The worker publishes and reads back the initial manifest before releasing its checkpoint or uploading queued edits. An interrupted attempt keeps its exact snapshot identity for retry. Later snapshots wait for queued edits to publish and for the local cursor to reach the cloud head. Capture holds the original roots without waiting for compaction. A personal snapshot can advance the recovery cutoff only when its captured state has no pending or deferred signed changes.
backup snapshot --database NAME --wait sends the request and polls its nonce over the owner socket. Before reporting success, the daemon reads back the snapshot and checks its position against the current log head. The retained entry count is capped at nine. The 70-second wait is not cancellation. A confirmed failure clears the pending request and is reported to the caller; waiting for incoming or outgoing signed changes leaves it pending. No automatic full-snapshot schedule is enabled.
Accepted bodies remain capped at 1 MiB, with a 1 GiB combined spool for bodies and copied files; retry files are separate. The publisher prepares up to 64 entries and splits append requests to fit the wire limit. It preserves sequence numbers and encrypted bytes on retries and acknowledges only the successfully published prefix. A preparation failure leaves later entries pending.
Source: Personal store setup · Fresh initialization · History and coverage · Publication limits
Source: Initial checkpoint · Retry-safe publication · Capture boundaries
Signed sync seals required file bytes with the database key and entry binding. It uploads the object to B2 and saves a verified receipt before appending the encrypted log entry. Stored files and matching local references use this path. The upload input cap is 512 MiB; an external file must remain available and unchanged until upload.
Logical replay verifies required objects and seals them into the local store. The storage transfer client buffers the complete logical-file upload source before acquiring a transfer slot, then checks its length and digest. It reuses a pooled HTTPS client within the same async runtime. Native file snapshots use a separate streaming client, with at most six transfers. They send record-home files and the node marker to R2, and file-home files to B2. A manifest is published only after every upload succeeds and the returned digest matches. Signed sync still does not release uploaded objects.
LastDB owns data semantics, retention, and recovery correctness. ExeMem checks eligibility, routes data, and performs cleanup under LastDB’s instructions. This review does not establish deployed cloud cleanup behavior.
Source: Upload and receipt · File replay · Local record/file lifetime · Object transfer
Use lastdb --data-dir /absolute/connection backup restore --database <id> --recovery-phrase-stdin --into /absolute/new-home. The connection home supplies saved account access. The recovery phrase supplies the matching identity. The destination must be an unused absolute path. --stream remains an alias for --database; --latest and cut selection are removed.
Recovery checks owner access and fixes a cloud delivery head. It installs an available native file base, selecting the required snapshot when an older log prefix has been reclaimed. It checks manifest digest, database ID, allowed paths, file lengths, and SHA-256 hashes. Files and directories are synchronized before the store opens. Later signed entries replay through the fixed head. Without a native base, a cursor expired at the start can install an archived signed snapshot chain within that head. A second expiry stops the operation. A missing file, wrong key, gap, or base beyond that head stops recovery.
A native base preserves the database name and physical format. Recovery without a base identifies the personal key from available entries, or uses a named recovered store. The CLI replays on a worker with the daemon’s stack allowance. It forks the local author stream, preserves the clock floor, and enables accepted capture. Both stores shut down before the private staging home is published with a no-replace rename and parent-directory synchronization. A failure leaves the destination unpublished.
The fresh destination keeps its recovery identity but does not receive the connection home’s credentials. backup connect --existing --env dev|prod --api-key-stdin checks the local home identity and any saved connection, then saves the existing credential separately. An optional --expected-user-hash must match the home. Saving the credential does not establish live authorization. PROD connection also queries payment status for guidance; an unavailable status is treated as requiring payment. The old --restored option and legacy restore receipts are removed. No operation here changes the user’s primary.
Source: Recovery entry point · Private staging and publication · Owner log selection · Existing account connection
Sync first publishes the device’s pending edits and tries any retained log entries that can bridge the gap. If the service requires a native recovery base, LastDB stages that exact snapshot and later entries in a private home. It verifies the owner, account scope, environment, device, cursor, disk roots, and confirmed upload sequence before and after preparation.
The daemon then shuts down and reopens with the same arguments. Before opening the database, it rechecks both homes and atomically exchanges their data directories. The old data remains in the retained staging directory. A durable recovery journal supports an interrupted exchange. Device identity and confirmed upload sequence stay intact. No files are exchanged while the original database remains open.
This path is limited to the personal owner database with search delivery off. Capture gaps, unconfirmed writes, external file references, pending deletion, or a changed source boundary prevent installation. Named and received databases do not use this automatic native reset.
Source: Staging and eligibility · Checked installation · Directory exchange · Stopped-store checks
lastdb backup reclaim --database personal --status reads service eligibility and the snapshot and cleanup positions. An explicit --allow-required-client-upgrade request permits signed removal of a prefix covered by the verified native snapshot. Each step binds the exact snapshot and expected previous cleanup position. The service must enable reclamation and confirm eligible history.
Each reclaim step covers at most eight entries. --batches counts requests: 1–128, default 16. --expect-snapshot DIGEST pins a lowercase SHA-256 snapshot identity across invocations. With that pin and explicit upgrade consent, --steps-per-request 1–8 can group bounded steps if the service supports them. Each response must advance within the requested bound without changing the snapshot. A failure reports confirmed progress; read status before retrying. Cleanup is not automatic and does not delete provider snapshot files.
Source: Signed bounded reclaim · Owner command · Explicit upgrade consent
The separate lastdb backup index-log-history --database personal --status command reads history-index eligibility and position. Replacing --status with --batches N permits 1–256 signed requests, each indexing at most 32 older entries. Requests bind the expected first indexed delivery and walk backward toward 1. Indexing does not delete entries or enable reclaim by itself. The service must enable the operation. Incomplete work reports its last confirmed position.
Source: History indexing · Owner index command
Owner recovery uses a native file base when available, then later log entries. The client now recovers an expired cursor from an available archived signed snapshot chain. It fetches the tip, ancestors, and every part; verifies the database, ordering, encrypted entry bindings, and duplicate mutation identities; then applies the chain oldest first. A private journal records each completed entry. A restart resumes the same work, and completion is saved only after the store flush. Chains are capped at 1,024 objects and the journal at 4 MiB. The client collects all parts before replay; individual response bounds do not establish a total memory cap. Invalid, missing, or divergent state refuses progress. The log library provides an authorized snapshot-covered trim operation independent of device progress; unresolved live submissions covered by the cut prevent trimming. Its retained-entry reader uses the persisted trim boundary. The service adapter must verify the snapshot; this source review does not establish provider cleanup.
Replay resolves the selected database and its content key. Private databases permit unqualified schema names; shared entries require a namespace. Capture is suppressed only for the target store. After durable replay and flush, the device saves its own download cursor. The active client no longer sends cloud device acknowledgements.
The upload checkpoint records account generation, environment, database, writer, device, cloud writer sequence, and local spool position. It is saved before the confirmed local prefix is retired. A valid checkpoint avoids another cloud tip read. Reopening can complete an interrupted acknowledgement; conflicting identity or positions refuse progress.
Private owned databases now apply changes from independent devices with the same owner key. A durable receipt binds each writer/device/sequence to its authenticated payload. Pending local changes retain their visible value until their deliveries settle. Shareable owned databases still hold entries from other writers or devices; received stores replay publisher changes but refuse ordinary local writes.
Source: Selected-store replay · Snapshot-covered trim · Durable progress · Normal apply limits · Local upload progress
Source: Owner replay · Pending changes and durable receipts
Source: Archive fetch and catch-up · Complete chain checks · Resumable entry replay
The Share area groups content selection, participants, change delivery, and local views. The intended model lets authorized participants write to a mutation log while each app accepts incoming changes according to its owner’s settings. That local approval step remains proposed. Ordinary received-store writes remain refused; Submit membership alone does not enable the missing submission and approval path.
Social v1 and lastdb-files v1 are admitted sharing specs. Medical, Finance, and Work are examples of possible apps and future settings, not implemented approval controls or compliance claims. Names such as graph, social, medical, finance, and work are now ordinary labels. A spec binding, rather than the name, controls sharing admission. Names use 1–64 ASCII letters, digits, underscores, or hyphens; personal and UUID-shaped names remain unavailable for creation.
Social keeps verified contacts, shows confirmed rosters, creates Social v1 databases, and grants reader access through sealed invitations. It also manages lastdb-files v1 sharing. Its SDK helper can create, invite, accept, and revoke through the installed Social command. The Social and content clients use the same selected home. Uncertain requests retain exact retry data, other members are preserved, and active contributors are not silently downgraded. Invitations last 1–168 hours (default 24); membership itself does not expire with the invitation. The roster limit remains 98 rows including revoked rows.
Source: Names and creation · Supported specs · Membership · Invitations · Implemented acceptance
Saved-query save and reconcile commands now send one owner-only request to the running daemon. Its adapter resolves the source and destination stores and executes reads, conditional mutations, declarations, and file work in process. The durable-write follower uses that same adapter, without calling back through its own socket.
Source: Saved-query execution · Durable-write follower
Saved keyed queries copy eligible fields and files into a different ready, owned, shareable database with the matching spec. Limits remain 32 reads, 8 one-hop links, 256 selected records, and 256 queries per source. Definitions and ledgers each have a 24,000-byte cap. Truncated reads are refused. Conditional destination writes precede ledger advancement; this is not a cross-database transaction and it does not construct alternate addresses.
Files imports require an owned database bound to lastdb-files v1. Each file becomes 32 KiB chunks and a catalog entry. A new file becomes visible after its final durable chunk. The catalog allows 128 files, 256 MiB of bytes, and 32 KiB of text. Saving fetches at most 16 chunks per batch, checks the total size and hash, and refuses an existing output. Signed sync carries the destination’s accepted changes after activation.
Source: Reconciliation · Conditional copies · Files import
Invitations, contributor grants, and revocations use the owner socket when the selected home is running. An explicitly selected stopped home retains the direct path. The member route checks the owned shareable database and trusted contact before updating the roster. Invitation sealing can fail after the roster commits; callers must resolve that result before retrying. The obsolete share contributors accept command is removed.
Source: Live sharing route · CLI live/stopped selection
The legacy publication snapshot reader, refresh worker, contribution outbox, and their fallback database routes are removed. Only signed received stores have an active read route. Old publication registrations do not regain a reader or automatic migration. The old ES256 developer-certificate and signature-envelope helpers are also removed; current Ed25519 signing and verification remain.
Source: Selected database routes · Signed registrations · Current identity crypto
A schema owns complete records with independent primary and alternate addresses. Canonical field reuse shares definitions, not values. Replacement supplies the complete new payload against one revision. Omitted fields and metadata disappear. The encoded record cap remains 64 KiB; files have separate storage and limits.
The warm set retains decoded records, their keys, metadata, and file markers. Its default target remains 256 MiB; active holds may keep it above the target. Schema definitions have a separate cache. Prepared native writes retain a 512 MiB allowance. These are not a process-wide memory cap.
Ordinary queries use exact keys, batches of keys, or ranges under one known hash. Scans and arbitrary field filters do not exist. Ascending keyed cursors remain; descending keyed reads use offsets. Owner key listing and internal maintenance are separate from app queries.
Source: Whole records · Warm set · Memory bounds · Keyed reads
Range pages now reuse the records found in the range pass instead of fetching them again by key. Only selected cold records are admitted to the warm set. Key comparisons carry the schema’s comparison rules explicitly and return invalid-value errors. Paging bounds and cursor rules remain.
Source: Single-pass ranges · Warm and cold records · Key comparison
A request privately prepares its complete change. A bounded queue combines requests already waiting without a collection timer. File additions commit before record changes; file removals follow them. When logical capture is enabled, accepted entries are saved before memory publication and acknowledgement. A missing entry or full spool refuses progress.
LastStore can finish the new run and stage CURRENT in parallel. It publishes only when both succeed, then synchronizes the directory before making the new root current. The queue publishes matching memory state, releases writer ownership, and notifies waiters. The two homes do not share one atomic file-list update; saved deletion recovery handles interrupted file removal.
The storage format and commit sequence remain unchanged. The old physical mutation-log capture, byte-backup decoder, and run-file replay code are removed. Signed accepted-change capture, file snapshots, and archived signed replay remain connected. Schema and retention writes use the enclosing native request’s commit; redundant inner flush calls are removed. The explicit database flush uses the shared runtime once. Durable writer metadata remains the author-clock authority. Queue batching and durable publication have separate modules. Record encoding, file handling, schema settings, and expiry tracking also have separate modules. File changes reuse the previous record supplied by preparation instead of reading it again. Captured reads still retain matching roots and bounded lookup work. New file snapshots hold both roots so compaction cannot retire their files during upload. Explicit cleanup acts on both homes; held old files can delay removal. A failed writer refuses further publication until recovery.
Source: Private preparation · Queue and completion · Commit ordering · Run and CURRENT prerequisites · Unified reads · Bounded range reads · Compaction · Space reservations
The crypto dependency change keeps the existing content-key derivation: the clamped first half of the Ed25519 seed expansion feeds the same HKDF salt and context. The all-zero identity seed is refused. This is not a stored-data format migration.
Source: Content-key derivation
The refactors preserve format 15 and run frame version 2. Native file snapshots copy the original encrypted files and preserve their format. Lookup-key protection still derives from the home key and key-space identity. Stored files have content encryption plus encrypted local run blocks. External local-file references remain outside that protection and are refused by native snapshot capture. Their catalog lock is now per home. Authentication failures report an encryption error. A held home lock reports busy separately from corrupt data. Admission opens the node marker without following links or blocking on a special file, then checks it is regular. After validating CURRENT, startup removes regular hidden .tmp files in the run-home root.
Run blocks use authenticated encryption and optional compression. Compression is retained only when it saves at least 64 bytes and 10%, including its length header; small inputs below 256 bytes are skipped. Bounded snapshot reads authenticate a complete block before exposing decoded bytes. File identity checks and decoding limits remain.
Record deletion removes the current record, alternate entries, metadata, and owned files while retaining a deletion stamp. Checked purge forgets that stamp. Expiry belongs to a schema and uses conditional deletion. The periodic expiry worker still visits the main database, not every owned sibling. Compaction and local cleanup do not establish deletion of earlier cloud objects.
Source: Format constants · File protection · Run encryption · Authenticated streaming · Record deletion · Expiry worker
Owner-device replay chooses whole-record state using the earlier of author time and cloud acceptance time, then writer key, device, and writer sequence. Delivery sequence is separate. The encrypted original author time is preserved. Replay records the observed clock floor so a later local write can advance from it.
This is whole-record resolution, not field merging. Pending local records defer incoming winners until their own deliveries settle. Attachment conflicts and divergent pending schemas require reconciliation. A remote schema drop refuses pending local schema or record changes, then uses bounded cleanup and a durable completion receipt. Ordinary API replacements still require a matching record revision.
Source: Ordering time · Cloud head decoding · Apply boundary
Use an explicit absolute home: lastdb --data-dir /absolute/home backup connect --env prod. Enrollment invite-code flags are removed. PROD connection checks payment status and points to lastdb cloud payment checkout when access is inactive or unknown. A payment refusal during database creation, snapshot publication, or log upload retains pending writes and pauses owned-database cloud work for five minutes. Other creation refusals back off for one minute. An explicit snapshot request can retry sooner. Local write success remains independent of these cloud checks.
Self-service connection now accepts DEV or PROD for an explicit home. Registration sends the public identity, device ID, timestamp, and signature; the CLI asks for no name or email. The reply must identify the expected account. A private device ID, enrollment lock, staged credential, and directory checks support interrupted setup. A lost response may follow a committed registration, so retries remain explicit.
The cloud CLI can query subscription status or obtain a hosted Stripe checkout or billing-portal URL. It validates the expected HTTPS host. Developer-key commands can create, list, and revoke keys. Creation requires paid access; --save writes a private key file without printing its value. Revocation refuses the active backup credential and removes a matching saved developer key. Payment and keys do not prove database backup coverage.
Source: Enrollment and existing access · Protected enrollment state · Payment commands · Developer keys
The TypeScript SDK checks API 34 by default. It sends complete create, replace, delete, and purge requests with explicit alternate addresses and whole-record conditions. It exposes atomic mutation batches, binary or JSON record-file operations, schema declaration, spec binding, and short-lived database sessions. Query replies preserve revisions, alternate addresses, and file markers. There is no hidden read or field merge.
Selected owned databases can accept these operations within the caller’s permissions. Received Shares remain read-only in the node; the SDK’s submission receipt type does not enable a missing receiver-write path. Session-bearing clients cannot use declaration, membership, or other owner-only routes. The shared socket dispatcher retains bounded request bytes and reply slots while single/batch mutations and scoped sharing work wait outside a socket worker.
Source: SDK facade · Conditional writes · Record files · Scoped dispatch · Socket dispatcher
Catalog lookup follows explicit environment settings or the connected home, otherwise PROD. DEV catalog caches are kept separately. Normal app publication resolves its registry endpoint from the selected environment; an explicit HTTPS URL can override it. Publication chooses --env, then the home’s saved cloud environment, then environment settings, then PROD. A saved developer key is refused when the target or known registry URL belongs to a different environment. The CLI no longer requires an explicit registry URL for the standard service.
Source: Registry selection · Publisher and key environment · Environment endpoints
Social serves a session-protected loopback browser interface for the selected home; the former primary-home refusal is removed from the product. This website task does not run it against the primary. Its picker filters by spec and read/write intent. Received databases are offered for reading only when ready. A selection can issue a one-hour, in-memory database session; at most 1,024 sessions coexist. Token-bearing requests are limited to that database and allowed routes. These tokens do not sandbox same-user processes, which can omit the header. Access observations become stale after a minute; revocation does not erase downloaded data.
Revision 9e7565e passed the DEV snapshot round trip. The operation seeded 300,000 records before connection, uploaded a native base, then published one later signed change. It removed the generated source home before restoring from the cloud into a fresh destination. It verified all 300,000 records and their digest, checked the later change, and completed a new write.
The same revision passed the DEV native-cutoff operation. A two-step request reclaimed through delivery 11 while retaining delivery 12, then cleanup advanced through 12. Stale retries were refused, fixed-target repeats did not advance further, and accepted-write facts stayed unchanged. A lagging device published four offline edits before recovering through delivery 16. Convergence and a fresh restore with four replayed entries passed. History indexing was checked only as an already-indexed no-op with a stale-position refusal; older-history backfill was not exercised. These results do not qualify archived signed snapshot catch-up or PROD. Both cleanup reports still left provider snapshot objects because the route has no delete operation.
The former owner byte-backup PROD workflow is deleted. Historical format 14 PROD recovery results do not qualify the new signed path. This review establishes no new PROD pass, stable release, deployment of LastDB services, or primary upgrade. The website’s build and publication have their own required checks.
Each diagram part links to pinned source. Examples are illustrative. The guide does not connect to a database. The four-step Disk view, six service groups, three Share groups, and one selected part at a time remain.
Source: Status route · Daily DEV recipe · Manual DEV recipe · Private recovery operation
Source: Social operations · Reader grants and retry · Selected database sessions
Source: DEV snapshot workflow · Snapshot operational recipe · Exact-source release gates · Social SDK
The DEV snapshot operation normally builds the selected main revision and reports snapshot-roundtrip-dev. Its manual native-cutoff mode requires the source build and reports snapshot-native-cutoff-dev separately. A manual dispatch can also choose client=nightly for the normal round trip. The downloader checks asset sizes and hashes, then matches the version, release tag, and recorded source. That run reports snapshot-roundtrip-published-nightly and cannot qualify the workflow’s source commit. Stable and nightly release gates require the exact-source normal DEV snapshot check.
Source: Client selection and check names · Published client validation · Per-home file references