Skip to content

Batch 2026-10-10: 7 PRs combined (#2200, #2203, #2204, #2207, #2199, #2201, #2202) - #2210

Merged
joepio merged 27 commits into
developfrom
trekmeester/combined-20261010
Oct 11, 2026
Merged

joepio merged 27 commits into
developfrom
trekmeester/combined-20261010

Conversation

@joepio

@joepio joepio commented Oct 11, 2026

Copy link
Copy Markdown
Member

Before: seven reviewed PRs waited separately, each needing its own Mancave run.

After: they land together, tested as one on Mancave (run 5204, attempt 2, green on 0bebe13 with develop 9bc7df2 merged in).

How: each PR merged with --no-ff onto develop, plus combine fixes: oxfmt and blank lines for #2207's files, a session-cache reset in refusedDrive.test.ts (the 30 s session cache from #2207 leaked a 401 between tests), union-resolved .po conflicts, and closing agent-profile-sync's stores in afterAll (the EnvironmentTeardownError that also reds develop 5202). #2206 was taken out (its fixture lived outside browser/lib) and runs on its own.


Generated by Claude Code

joepio added 27 commits October 10, 2026 12:52
CommitBuilder::sign_at rebuilt the doc from the resource's existing
snapshot, applied the pending set/remove, and signed
export_snapshot(). Every incremental commit therefore carried the whole
document in loroUpdate, so its size grew with the document (and with
every Loro peer that had touched it). Cloud Vault delta packs ship
envelopes, so their per-edit cost grew too: over 40 edits of one note,
latest retention went 4171 -> 16378 bytes per pass and all retention
7063 -> 31687.

sign_at now exports only the changes since a base version when the
resource has prior state; genesis / new resources still sign a snapshot.
The base is AtomicLoroDoc::tokened_base_vv of the persisted snapshot:
the version of the newest tokened change, not the full version. A node
stamps lastCommit into the doc after applying a commit, as an untokened
local change no signed commit carried; the next edit builds on it, so a
delta from the full version made the server park it as pending for a
missing dependency (caught by multi_client_gallery_sync). Exporting from
the tokened base carries the stamp along. Legacy docs without any token
keep signing snapshots. sync_loro_changes_to_commit_builder uses the same
base. The sign() fallback that exported the open doc now exports the
delta too.

Measured with vault_envelope_growth (40 edits): last-edit delta now 1864 (latest)
and 3080 (all) bytes instead of 16275 and 32068, flat across edits. The test now
asserts the last delta stays within 1500 bytes of the first. The
planning table is refreshed from vault_incremental_cost.

The vault envelope floor stays >= (the previous pass's newest envelope is
re-shipped once): dedupe would need envelope identity, and a strict >
could lose a commit sharing the same millisecond.
The sync page auto-enrolled any drive the account had enrolled until the
node-side proof of hosting (live sync + drive usage) arrived. On a drive
already on Cloud Server that re-ran enrollment, reconnected the socket
(a spurious 'Working offline' toast) and announced 'Connected to Cloud
Server'. Skip it when the current server is already a managed node, and
read the user-disconnected flag per event in NetworkIndicator.
Compress now forces the next backup pass to be a full checkpoint, publishes
it, then frees what it replaced. Discard history does the same and also
frees the undo window, behind a confirmation dialog. Free-up never runs if
the checkpoint did not land. The forced pass reuses the exporter's
"no anchor in the vault" input, so cursors and lane state are unchanged.
A checkpoint still holds each resource's whole Loro history, so the old
copy about keeping only the current state over-promised. Discard history
removes older copies, the delta chain and the undo window.
"Download backup" saves the drive's sealed vault objects as one
.atomic-vault file (versioned header, then the objects in listing order,
each with a SHA-256). "Restore from file" validates it and feeds the
objects through the same import as a cloud restore, which now takes an
injectable object source. Nothing is uploaded; the file stays sealed and
needs the drive key.
A checkpoint can now export each resource as a Loro shallow snapshot at its
current frontiers and ship no signed envelopes (HistoryKeep::CurrentStateOnly).
Default stays Full, so ordinary passes and Compress now are unchanged. Threaded
through the WASM, worker and Tauri export entries and the Discard history flow.

Shallow docs export a snapshot to peers behind the cut instead of a delta that
would be parked as pending, fork_at on a shallow doc is a clear error, and the
History page tolerates a shallow doc. Copy, locales and the format doc updated;
tests cover restore, sync with a full-history device and size.
startConversation(store, []) is now a note to yourself: the only member is
the creator, and the drive is registered browser-only before the first
save, so its genesis never enters the outbox and a managed node is never
asked to host it. A non-empty list that holds only yourself still throws.

healRefusedDrive may now move a conversation whose read list is exactly the
signed-in agent. Every other conversation is still never moved.
…ompat tests

The TS datatypeTag tagged atomic:// links while Rust did not. The untagged
reader leaves atomic:// as a plain string, so TS now excludes it too. Both
sides test against lib/test_files/string-datatype-tags.json.

Add Rust tests for old untagged snapshots, unknown tags and Null in nested
containers, and TS tests for unknown tags and nested Null.
…flush

A signed-out visitor called /api/me about nine times in the first 25 s and
then every few seconds for as long as the page stayed open: the hosted-AI
status retried, the vault backup scheduler re-queued, and every other caller
asked again. getManagedAccount now serves the last settled answer for 30 s,
forgets it on focus and when a sign-in lands in this tab, and callers that
wait for a sign-in read fresh.
… property

A property the remote answers 404 for was fetched again on every put of a
message that carries it, twice per miss (the fetch, then handle_not_found
fetching the same URL). Db now remembers a definitive 404/410 for the
session and no longer retries it; 5xx and network errors are still retried.
The demo speaker property is added to the bundled defaults so it resolves
locally and is never asked for.
…r registry

Review of the redundant-requests PR: a property that 404ed once stayed
missing for the life of the Db. The memory now expires after 5 minutes.
Also proves a failed session read is not cached, merges the two listener
sets in session.ts, and states what the not-found-once test covers.
…rs go

Same teardown failure as defb758: stores left connected log after the file
finishes, and vitest exits 1 with every test green.
@joepio
joepio merged commit f39e460 into develop Oct 11, 2026
13 of 16 checks passed
@joepio
joepio deleted the trekmeester/combined-20261010 branch October 11, 2026 05:11
joepio added a commit that referenced this pull request Oct 11, 2026
The test fails on every CI run since batch #2210 and never locally: the
visitor's Hi never appears, so Mara has nothing to answer. It now checks
that the Hi posts before waiting for the greeting, and prints the page's
console when either step fails, so the next CI run shows the cause.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant