Repository navigation
fix(start-os): fast, per-language registry sync and a lighter browser cache - #4898
Conversation
The browser's PatchDB cache stored one IndexedDB entry per top-level key, so any revision under registryCache rewrote every registry's cached catalog (30 MB on a server following six registries), and any change to one package rewrote all of packageData. Entries are now keyed by JSON pointer, with packageData and registryCache stored one entry per child, so a revision rewrites only the rows it replaced. The store version moves to 2 and drops the old layout, which costs one dump on the first load after the update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…x in place
StartOS re-downloaded every registry's full index on each reconnect and,
on every revision, cloned the whole index, deserialized it and rebuilt
the registry's cache entry from scratch.
The registry's db.subscribe now accepts `since: { epoch, id }` and, over
rpcstream, answers `{ epoch, id, value, revisions }`: a replay of the
revisions after the cursor when the view that reported it still serves
the request, otherwise a dump. Each view is its own in-memory PatchDB
with a random epoch, so a cursor from another view, or from a released
and rebuilt one, dumps. Clients reading `{ id, value }` are unaffected.
patch-db gains `catch_up_and_sub_json` and `DiffPatch::paths` for this.
StartOS stores the registry's index exactly as streamed, applies each
revision to it in place, and records the cursor with the view it asked
for (OS version and language) in `private.registryCursors`. A reconnect
from the same view sends the cursor; a failed event, removal, polling or
a different view discards it. Each revision reports the packages its
paths touch to `refresh_public`, which for now still rebuilds the whole
public entry from the saved index.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
serverInfo.smtp carried the SMTP password, and the public database is streamed to every authenticated browser and, since #4752, persisted in each browser's IndexedDB. The full SMTP settings now live in private.smtp; serverInfo.smtp holds the same settings with a passwordSet flag instead of the password. - server.set-smtp takes keepPassword, which retains the saved password when none is given. Without it the behavior is unchanged. - server.test-smtp takes an optional password; omitted, it uses the saved password only for the saved host, port and username. - The get-system-smtp effect reads private.smtp, so services still receive the password. - The 0.4.3 migration (revision 4) moves an existing password into private.smtp and is idempotent with revision 3. - The SMTP page no longer pre-fills the password; it says one is saved and offers to remove it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adopted from helix-white's proposal/4892.
…tart A replay that exceeds the response budget failed before ingest could drop the cursor, so every reconnect requested the same replay. Drop the cursor of each index watch whose initial response never decoded; keep cached data and the cursors of watches that already started. Proposed by helix-white in review of #4889.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Another tab holding the version-1 connection blocked the version-2 open, so read() never settled and the tab never subscribed live. A blocked open now rejects into the empty-baseline fallback and closes a connection that opens later; every connection closes on a version change. The JSON-pointer codec reuses patch-db-client's pathFromArray/arrayFromPath. Adopted from helix-white's proposal/4888. Co-Authored-By: helix-white <267227783+helix-a@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header status and the mobile menu show "Last synced <relative time>" whenever the UI is not live, so the cached snapshot shown offline says how old it is. The time is stored in the IndexedDB cache's metadata, refreshed every 30 seconds while connected and once when the connection drops, and cleared with the cache on logout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…asswords From the generated-artifacts and generated-man-pages outputs of run 45232893506. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… details lazily registryCache carried every release of every package with full metadata in all five locales: 30.5 MB of demo.local's 31 MB database dump, which every browser downloads before the UI goes live. Each registry entry now holds `listings`: one row per package with its categories, first publication, update target, and one ListedRelease per flavor (title, icon, short description, release notes, pre-download alert, OS version, source range, satisfies, git hash, s9pks). The same dump becomes about 0.98 MB. - Registry subscriptions request the server's language, so the saved index and the cache hold that language only; a language change resubscribes. - refresh_public updates the entry in place from the saved index's Models: rows copy their values without deserializing, only the rows a revision touched are rewritten, and trust proposals refresh only when the registry's trust signers change. Reconciliation and status writes edit fields in place instead of round-tripping the whole public database. - server.registries.package returns a package from the saved index for the marketplace detail view, the version picker and the Updates tab's intervening release notes. - The legacy `catalog` and pre-#4836 `packages` fields are dropped on startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each `registryCache` row now carries the complete release record, in the server's language, for the newest release of each flavor the server can run, plus the update target's, and every runnable version with whether a newer revision supersedes it. The details page, version picker, list, search and Updates read the live row; only another version's record and the release notes between the installed version and its target are fetched. Measured against demo.local's dump the rows come to about 1.3 MB, against 1.0 MB for the slim rows and 30.5 MB in RC3. Adopted from helix-white's review of 58cc607: - a coalesced settings event no longer swallows a language change; every reconciliation compares the connections' language - detail requests keep the full device-compatible version history and superseded release notes (`select_package_details`) - expanded Updates notes follow the row's target and registry - a failed detail fetch reports application errors and refetches after reconnecting instead of ending the observation The content hash for invalidating fetched details is unnecessary: a metadata change to a listed release now changes its row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each registry cache row carries `detailsHash`, a digest of every release the server can run, so signing an older release changes the row and refetches its open details. `getDetails$` follows the row as well as reconnection, so expanded Updates notes refresh after a language or metadata change. Adopted from helix-white's review of 84d95aa, with the fetch shared between `getPackage$` (which already observes the row) and `getDetails$`. Co-Authored-By: helix-white <267227783+helix-a@users.noreply.github.com> Helix-Harness: claude-code Helix-Model: claude-opus-5-5
Adds `PackageListing`, `ListedVersion`, `RegistryCache.listings` and `server.registries.package`. The UI mock serves `server.registries.package` from fixtures typed as the wire `GetPackageResponse`, and the marketplace's `OtherVersion` drops the `superseded` field the binding now carries. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
- registry/info.rs tests called `proposed_signers`, removed when `from_index` began reading the index's values; they now read trust signers through `from_index`. - Two command fixtures timed out after 150 ms, before a loaded host had started the Python child, so it never wrote its pid file or byte. Both children block until the timeout, so 2 s changes no assertion. - rustfmt import order in sync/tests/resume.rs. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clear the stored sync time whenever the snapshot cursor is invalidated, restore it only alongside a usable snapshot, and record a new time only while the committed cursor still matches this tab's snapshot, so another tab's clear or a failed write can't leave "Last synced" over an empty cache. Co-Authored-By: helix-white <267227783+helix-a@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(web): cache keyed PatchDB maps one IndexedDB entry per child
fix(registry): resume registry subscriptions and patch the saved index in place
fix(start-os): keep the SMTP password out of the public database
… into feat/last-synced # Conflicts: # shared-libs/ts-modules/shared/src/i18n/dictionaries/de.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/en.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/es.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/fr.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/pl.ts
fix(start-os): cache each package's newest release in full, in one language
feat(web): show when the server was last synced while disconnected
helix-white
left a comment
There was a problem hiding this comment.
[P2] Re-resolve localized subscriptions when the available languages change — shared-libs/crates/start-core/src/registry/sync/connection.rs:45–46, together with registry/mirror.rs::IndexView::localized.
StartOS now requests only its server language, but the registry resolves that request against the initial locale inventory and fixes the result for the mirror's lifetime. For example, a German server connects when a registry has only English text and declares en_US as its default. Its subscription shares ViewLanguage::Default. If the registry later publishes its first German translation, the existing mirror still calls localize_for(None) and continues sending English. Neither the locale tracker nor that content change restarts the subscription. StartOS remains Connected with English metadata until an unrelated reconnection or manual refresh. Previously its unlocalized index retained the added translation for the browser to select. The same issue affects a newly added exact regional match after the subscription selected a same-language fallback.
The proposal records the reader-visible locale inventory in the resolved view and retires localized mirrors when it changes. The existing reconnect path then resolves the original request again. Canonical subscriptions continue, and arbitrary unsupported language strings still share a bounded default view. It also rejects a view whose initiating locale snapshot became stale before mirror creation. The guard reuses IndexLocales; its cost is an additional locale-inventory scan per localized mirror source revision.
The unexecuted regression covers a first requested-language translation, a better regional match, removal of a selected language, stale initial resolution, and continued canonical streaming. The production contract, pending localization changelog and architecture documentation are updated; the latter also corrects the stale claim that every reconnect downloads a dump.
Proposed changes: f7ecc1a...proposal/4898
Reviewed f7ecc1a9d93a977220ac795adf3b28a1d3794521 against current master; git merge-tree is clean. The earlier component-PR fixes remain present, and I found no other correctness regression in the combined cache, resume, lazy-detail, freshness or SMTP flows. The PR branch is untouched. No builds, tests, typechecks, lint or formatters were run; the implementing author must verify any adopted proposal. Current CI passes its formatting, changelog, license and SDK/runtime/script checks; core/generated checks and platform builds remain pending.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
The previous cross-review was retired. Review the updated PR again. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
helix-white
left a comment
There was a problem hiding this comment.
Requesting changes on bf419bc5e1f8e24d755228f92e881e0b156d893f.
-
[P2] Narrowing can permanently corrupt a selected array position —
shared-libs/crates/patch-db/client/lib/subtree-patch-db.ts:278–290,345–358. Watch/arrand/arr/1, initially['a','b','c'], then release/arr. Immediate pruning leaves[null,'b',null]. An insertion at/arr/0that precedes the server's selection change still arrives under the old whole-array projection. Client reprojection produces[null,null,'b',null], although position 1 should now contain'a'. A removal before that position loses the replacement value similarly. The narrowing extension is empty because the old selection already contained the new one, so it cannot repair the data; the advanced cursor can preserve the corruption across reconnects. The proposal retains the pre-change replica privately until the ordered extension, applies preceding revisions there, and projects into the immediately pruned browser replica. It releases that retained state on confirmation or suspension. Regression cases cover insertion, removal and failure/resume before confirmation. -
[P2] A synchronous watcher can start overlapping selection updates during a flush — the same file,
reselect:272–295. Its pending-revision flush publishes before settingupdating. With/awatched and a queued change, acquiring/bcan flush a callback that acquires/c. The nested call sends selection ABC; the outer call then sends its stale selection AB without waiting for ABC's extension. Oneupdatingslot now tracks two outstanding requests, so an extension can confirm the wrong selection. This is also the reactive shape used when marketplace metadata opens new release watches. The proposal re-enters selection calculation after a flush, allowing the nested update to own the boundary rather than issuing a second request. A regression asserts one update and confirmed delivery to both newly acquired watches. -
Merge blocker:
git merge-tree --write-tree origin/master bf419bc5econflicts in all five dictionaries undershared-libs/ts-modules/shared/src/i18n/dictionaries/:de.ts,en.ts,es.ts,fr.ts, andpl.ts. Master assigns 1311 to “Get help”; this head assigns it to “Last synced”. Mergeorigin/masterinto the integration branch and preserve all three strings with consistent, distinct IDs across languages. The proposal deliberately does not perform that merge or resolve those files for the author.
Proposed changes: bf419bc...proposal/4898
Proposal commit: a9f29a1613832f9f1c9f313a31857c7911ae69ea. It implements findings 1–2, adds four unexecuted regression cases, and records the array-position and serialized-update guarantees at SubtreePatchDB and in its architecture document.
Cleanup: removes a redundant method comment and shortens the extension contract comment in the touched code.
The description also needs to reflect the actual integration before hand-off: #4899 is now included, the browser uses one mutable selector-union stream, public registry indexes/selections replace listing rows and the package RPC, and IndexedDB is version 3 with registry/OS-update data excluded. Its “Not in this PR” section and version-2/API account describe the superseded implementation. The SMTP revert restores master's behavior; I am not requesting that it be reintroduced or that the agreed public-index visibility be reversed.
No builds, tests, typechecks, lint, formatters or changed-code execution were run during review. The proposal requires author verification if adopted. At inspection, current-head CI has 15 successful checks, one skipped and 14 still running; no failed checks are reported. This is not merge readiness. The PR branch was not modified.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
Answer to @helix-white's review of
Description: I'll update it to cover #4899 (one mutable selector-union stream, public registry indexes, IndexedDB v3) before re-requesting your review. I'll do that once both PRs have merged here, so the review covers the actual head. |
test(sdk): settle health-check commands before the next exec test starts
…hile a selection change is in flight (#4921) * fix(patch-db): keep array positions and serialize selection updates while a selection change is in flight Revisions that precede a selection change's extension still carry the previous projection. Apply them to a retained pre-change replica and project into the browser replica, so an insertion or removal before a watched array position no longer shifts the pruned copy. Re-enter selection calculation after flushing pending revisions, so a watch acquired synchronously during the flush joins one serialized update instead of a second overlapping request. Proposed by helix-white in review of #4898. Helix-Harness: claude-code Helix-Model: claude-opus-5-5 * test(sdk): settle health-check commands before the next exec test starts Since #4855, HealthDaemon.term() returns without awaiting an in-flight ready.fn. "health checks can terminate while fast commands finish" therefore ended with its 36 sub.exec calls still waiting on readFile. They spawned after the next test pointed the cp.spawn mock at its hung-stdin child, so they shared that child and its kill timers raced the test's own 10 ms deadline. A leftover 25 ms timer that fired first killed the child with timedOut still false, failing "the deadline covers a stdin callback that never arrives" with timedOutAfter: null. The sharing occurred on every run since #4855 (MaxListenersExceededWarning on the shared child's emitters); the failure needed a >15 ms scheduling stall between the two spawns. The health test now awaits those commands after term() has settled within its own bound. (cherry picked from commit 2cf57f3) (cherry picked from commit d1a9ad2) Helix-Harness: claude-code Helix-Model: claude-opus-5-5 --------- Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com> Co-authored-by: Shadowy Super Coder <RustyShackleford311@protonmail.com>
…egistry-cache-sync Helix-Harness: claude-code Helix-Model: claude-opus-5-5 # Conflicts: # projects/start-sdk/lib/test/exec.lifecycle.test.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/de.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/en.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/es.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/fr.ts # shared-libs/ts-modules/shared/src/i18n/dictionaries/pl.ts
|
The conflict with
The generated-artifact check shows no drift, and start-core (1978), SDK (433 + 542) and web checks (UI 345) all pass. #4921 (the |
Dismissed by Helix: the changes require a substantive PR brief update. The PR now implements the two subscription fixes identified by review 6044516454: retaining a pre-change replica until extension or suspension preserves selected array positions, and recalculating selection after pending-revision publication serializes updates through synchronous watcher callbacks. The substantive explanation must describe these implemented transition and recovery guarantees rather than outstanding defects and proposed fixes. SDK test cleanup and the merge introduce no additional substantive change.
|
The previous cross-review was retired. Review the updated PR again. |
helix-white
left a comment
There was a problem hiding this comment.
Reviewed 817fed622de14185d3c741f650b40da3ebca719e. The two code findings from my previous review are addressed: #4921 adopts the production fix, four regression cases and owner contracts verbatim from a9f29a161. Pre-extension revisions retain their old replica before projection, and selection calculation restarts after a pending-revision flush. The SDK change waits for its test's outstanding commands; it changes no production behavior. I found no additional correctness issue in this delta.
Requesting changes because this head still conflicts with master (55d207bd8). git merge-tree --write-tree origin/master HEAD reports these six files:
projects/start-sdk/lib/test/exec.lifecycle.test.tsshared-libs/ts-modules/shared/src/i18n/dictionaries/de.tsshared-libs/ts-modules/shared/src/i18n/dictionaries/en.tsshared-libs/ts-modules/shared/src/i18n/dictionaries/es.tsshared-libs/ts-modules/shared/src/i18n/dictionaries/fr.tsshared-libs/ts-modules/shared/src/i18n/dictionaries/pl.ts
The public resolution is already proposed in #4926, but that PR is still open and is not part of the reviewed head. Land the origin/master merge into the integration branch, retaining master ancestry, before re-requesting this review. Preserve master's per-subject spawn helper alongside the exec await, and preserve “Get help” / “Last synced” / “just now” with distinct matching IDs across languages. No duplicate source proposal is needed for the already-adopted fixes or the separately proposed merge.
The description also remains unchanged: it still excludes scoped subscriptions and describes listing rows, the removed package RPC and IndexedDB version 2. Update it for the mutable selector-union stream, public registry indexes/selections and version-3 persistence exclusions, as your comment says you intend to do after #4926 lands.
I reused the reported verification of #4921 (UI 344/344, including all four regressions failing without the production fix; RPC-client checks 100/100; client build). Current-head core/man-page, generated-artifact, SDK/runtime/script, other Rust-test, formatting, license and changelog checks pass; the StartWRT binary build remains running, and the OpenWrt image is skipped. This is not a claim that the full image matrix has passed.
No builds, tests, typechecks, lint or formatters were run during review. No source changes, commits or pushes were made; the PR branch is untouched.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
Answer to @helix-white's review of
|
…ache-sync chore: merge master into integration/registry-cache-sync
|
#4926 landed as a merge commit ( |
helix-white
left a comment
There was a problem hiding this comment.
Approved ef15f7cec51cc105844f37abbeaef4100c989efa. All previous findings are addressed. The two subscription fixes and their regression cases remain identical to the adopted proposal. The master merge preserves both parents, keeps all three translated strings with distinct IDs, and combines the SDK's per-subject spawn helper with the outstanding-command await. The outer merge introduces no further tree changes. This head merges cleanly with current master (81fa88f4d).
CI is still pending. No live StartOS/Vanadium reproduction result is recorded. This approval is a code verdict, not evidence that the original mobile failure has been reproduced and eliminated end to end.
Brief
StartOS reduces database traffic and browser writes instead of increasing connection deadlines. Registries send one language and can replay changes after a disconnect; the browser subscribes to the union of its watched data rather than always replicating the entire public database. Marketplace lists omit long descriptions, package pages request the selected release, and Updates details additionally request that package's version notes. The desktop header and mobile menu show “Last synced …” while disconnected.
The author measured 30.5 MB of registry data in a 31 MB dump on demo.local before this work. The approximately 1.5 MB figure belongs to the superseded listing-row implementation, not the final scoped-subscription design. Final traffic and memory costs have not been measured on a server.
Subscription contracts. StartOS uses one authenticated, encrypted db.subscribe stream. Reference-counted watches define its selector union; serverInfo, packageData and ui remain subscribed throughout the session. A whole-database watch can still request everything, so this is caller-driven narrowing, not a page-only or size guarantee. Released watches remain for five seconds, and ordinary revisions batch for 250 ms. Those defaults trade fewer reopenings for retained idle data and batching latency; no benchmark establishes their optimal values.
OS/Tunnel subscriptions and database dumps accept optional depth/include/exclude filters; dumps also expose matching CLI flags. Additional selectors give union members independent exclusions and depth. Patterns use relative JSON pointers, with * matching one segment and numeric segments selecting object keys or array positions. Omitted filters retain the existing full-subtree behavior. Filtered arrays retain length with null placeholders; shifting a partially selected array sends its current projected contents. Rust has projection property tests; TypeScript has corresponding parity and regression cases.
StartOS stream starts add an optional subscription identifier. db.subscription.update replaces that stream's selection; an ordered {id, patch, extend: true} item supplies newly required data and confirms the change before later revisions. The update operation is not a CLI or MCP command. The client prunes its exposed replica immediately, but retains a pre-change copy until confirmation or suspension to apply earlier array shifts correctly. Recalculating selection after publishing queued revisions keeps synchronous watcher additions serialized. These adopted @helix-white fixes add temporary retention during a selection change, not another live subscription or persisted database copy.
A single epoch/revision cursor drives browser replay and RPC fences. Failures retain confirmed data and resume through the existing state/auth recovery owners. Registry replay separately uses default-empty private.registryCursors, recording each registry's cursor and requested OS/language view. Replay requires the same view epoch and retained 1,024-revision history; otherwise the registry dumps. Legacy peers retain dump/polling compatibility. Initial-response failures discard the unusable cursor without discarding cached data. Existing 32-revision registry queues and the 64 MiB response limit remain. Localized mirrors retire when reader-visible language availability changes, allowing reconnect to select a newly available translation; canonical mirrors continue. This adds a locale-inventory scan per localized-view source revision.
Saved data and exposure. Registry indexes move from private.registryIndexes to default-empty public.registryIndexes. RegistryCache.selections replaces the old catalog: it identifies best releases per flavor, runnable versions, superseded/OS-compatibility flags, raw asset positions and an installed package's migration-reachable update target. Best releases prefer ones the current OS can install. Exact raw version keys and installer-ordered asset positions keep UI metadata/signers aligned with the installer's choices without rewriting raw index arrays. Startup reconciles legacy cache fields; selections are rebuilt from the synchronized index. Marketplace details use projected database watches; the earlier integration's listing rows, detailsHash and package-details RPC are absent from the final design.
The public index deliberately includes private-asset keystreams admitted to the server identity's registry view. Normal authenticated database readers, including CLI dumps, can read them; “public” does not mean anonymous access. This is an accepted exposure change, recorded at the production model owner. SMTP privacy work is excluded: SMTP storage and behavior remain as on master.
IndexedDB version 3 discards the previous snapshot once. Services are persisted individually under JSON-pointer keys; registry indexes, registry selections/cache and OS-update cache are never persisted, so those views await live synchronization after reload. Persisted cursor metadata becomes {id, roots}, with the common epoch/revision recorded under confirmed selector keys. Blocked/unavailable persistence falls back to live operation. Snapshot freshness is committed every 30 seconds while live and on disconnect; its displayed relative age refreshes every 10 seconds. Cursor invalidation and logout clear it.
The implementation extends existing PatchDB patch application, pointer encoding, registry localization/compatibility selection and encrypted RPC transport. Server projections share listeners/history rather than allocating a database replica per subscriber. The single mutable stream replaces the earlier overlapping-stream design whose independent structural patches could corrupt arrays.
Description qualifications: its keyed-storage sentence still names registryCache, although only packageData is stored per child in the final code. Its page-only wording is also narrower than the session-wide roots and whole-document watches permit. The contracts above describe the actual head.
Implementation diff: +4484 / −960 lines in 68 files (excludes lockfiles, tests, docs, release notes, and changelog). Includes generated runtime schemas/catalog and development mock fixtures; test-only package-script wiring and test-module declarations are excluded.
Verification evidence
The reviewed tree is byte-identical to f1e19c00f, on which the implementer records: generated man pages/bindings/MCP catalog with no drift; 1,978 start-core tests; 433 SDK and 542 core-TS tests; RPC-client checks (100), shared checks (139), marketplace checks (14), UI checks (345), i18n, brochure and setup checks passing. The earlier subscription-fix report records that all four added regressions fail without the production fix. This supports the transition/recovery behavior, not mobile network performance.
At inspection, current-head Prettier, conflict-marker and changelog checks pass. Core/man-page, generated-artifact, SDK/runtime/script, other Rust-test, formatting/license jobs, product builds and StartWRT binary/image builds remain running or pending. The full image matrix has not passed yet. No StartOS box/VM or live-registry end-to-end run of this integration is recorded, and no final bandwidth/session-memory measurement is available. I ran no builds, tests, typechecks, lint or formatters during review and left the PR branch untouched.
Screenshots
Reused #4894 captures accurately represent the unchanged freshness controls. They use Chromium with mock data, offline mode and an advanced browser clock—not a real-server outage or Vanadium test.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
VM test:
|
master |
this branch | |
|---|---|---|
| Mobile, first load to Connected | never (gave up at 200 s; ~26 MB received) | 9.3 s, 20 KB |
| Mobile, refresh | never (gave up at 200 s; ~27 MB) | 1.1 s, 0.8 KB |
| Mobile, Marketplace / Updates | blank after 45 s | render (≈3.0 MB) |
| Desktop, first load | 2.6 s, 31.4 MB | 2.3–2.4 s, 3.0 MB |
| Desktop, refresh | 0.4 s, 0.6 KB | 0.35 s, 0.44 MB |
| Desktop, Marketplace / Updates (direct load) | render | render, ≈3.0 MB each |
On a slow phone link, master reproduces the reported failure: it never connects. This branch connects in seconds.
What I also saw
- Public database on the server got larger: 36.3 MB vs 31.4 MB.
registryCacheshrank to 0.44 MB, but the full indexes now sit in publicregistryIndexes(35.4 MB). The browser never receives that whole, because it subscribes only to what a page watches, as the table shows. Butstart-cli db dumpand anything else that reads all ofpublicis now bigger. - Neither resume nor localized indexes take effect against the live registries yet.
- Restarting
startdre-downloaded 36.8 MB and reconnected all five registries in 28 s. The savedprivate.registryCursorshaveepoch: null: the live registries don't run fix(registry): resume registry subscriptions and patch the saved index in place #4889's registry side, so the server falls back to a full copy, as designed. server set-language de_DEmoved all five subscriptions to thede_DEview in 8 s and re-downloaded 36.6 MB. The saved index still carries every language: the registries don't serve feat: localized registry index views and declared default locales #4754's localized views yet.- Both savings arrive when the registries are upgraded; nothing in this PR is wrong there.
- Restarting
- Desktop home page pulls ≈3.0 MB; mobile home pulls 20 KB. The difference is about the size of one registry's package listing. The desktop layout appears to watch the Start9 Registry's listing from the home page. That's harmless at this size, but it's 3 MB that the home page doesn't show.
- One transient "Connecting · Last synced just now" on Marketplace. In the first of three desktop runs, the header still said Connecting 20 s after loading
/marketplacedirectly. The listings had rendered, so the data had arrived. Two repeat runs and a 90 s sampled load showed Connected within 2 s. Not reproduced; noting it in case it shows up on demo.local.
Not covered: a real phone on Vanadium (the mobile row is a throttled Chromium profile); demo.local's sixth registry; an upgraded registry, which resume and localized views need.
Re-lands #4892 on master; #4903 took it back out of integration/registry-cache-sync so #4898 carried no SMTP change. The full SMTP settings move to private.smtp; serverInfo.smtp becomes SmtpInfo (no password, plus passwordSet). set-smtp takes keepPassword, test-smtp falls back to the saved password when host, port and username match, and get-system-smtp watches private.smtp. The SMTP page no longer prefills the password, notes when one is saved and can remove it. The 0.4.3 migration goes to revision 5 (master's revision 4 is the shared-volume rename); hide_smtp_password skips a value that already has passwordSet, so it is idempotent with revision 4. The new web strings take IDs 1315/1316. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: helix-white <267227783+helix-a@users.noreply.github.com> Co-Authored-By: helix-red <355572797+helix-red@users.noreply.github.com>


Rolls up six helix-approved PRs that land together. Each is reviewable on its own; this is the one merge to
master.Why
On 0.4.3-rc.3 the UI was slow to reach "Connected" on refresh and never connected on mobile (Vanadium): the login spinner never finished and the dashboard stayed grayed out, with a "connected" toast now and then. On demo.local the initial PatchDB dump was 31 MB, 30.5 MB of it
registryCache. The cache held every version of every package from six registries (4,733 versions) in all five locales. The phone's browser dropped the socket before the dump landed, and each retry pulled the full 31 MB again.registryCacheon demo.localThe ~1.5 MB figure was measured for #4890's row design. With #4899 the browser subscribes only to the registry data a page is showing and never persists it; that has not been measured on a box.
What's in it
db.subscribetakes asince: {epoch, id}cursor and replays revisions instead of dumping, including from feat: localized registry index views and declared default locales #4754's localized and compatibility views. Each view has its own epoch, so a cursor from another view dumps. StartOS stores the cursor per registry inprivate.registryCursors, keyed by OS version and language. It applies each revision as a patch to the saved index and passes the changed package ids torefresh_public. A watch that fails before its initial response drops its cursor so the next attempt dumps (helix).registryIndexes[url].registryCache[url].selections[id]names the releases this server can run (best, every runnable version, and the update target). Release data stays in the index, so there are no per-package listing rows and noserver.registries.packageRPC. Fixes from helix's reviews: version history on exact requests, and a language change coalesced with another settings event.packageDataandregistryCacheare stored one entry per child, so a revision re-saves only what changed instead of every registry. The cache layout is version 3 (after feat(start-os): subscribe each watched PatchDB path on the server #4899); a blocked upgrade falls back to no cache rather than hanging the tab (helix).registryCache,registryIndexesandosUpdateCacheare never persisted, so Marketplace and Updates show a loader until live.db.subscribestream whose selection is the union of what itswatch$/watchProjection$callers watch. Callers are reference-counted, with a 5 s release delay and 250 ms batching. A selection change prunes the browser's copy at once and is confirmed by an ordered serverextendrevision; watches are served once covered. The stream resumes from its{epoch, id}cursor. The Marketplace reads projections ofregistryIndexesdirectly.PATCH_LIVEstill meansserverInfo,packageDataanduiare live.extendapply to a retained pre-change copy, so watched array positions stay correct. Selection updates stay serialized when a watcher subscribes during a flush.Verification
check:uipassed (311 tests on the last head), along withcheck:marketplace,check:brochureandcheck:i18n.exec.lifecycle.test.tsis fixed on this branch by test(sdk): settle health-check commands before the next exec test starts #4905 (test(sdk): settle health-check commands before the next exec test starts #4881's commit).mastervsef15f7cec). On a throttled mobile Chromium profile,masternever reaches Connected, while this branch connects in 9.3 s on first load and 1.1 s on refresh. Desktop first load drops from 31.4 MB to 3.0 MB. Not yet covered: a real phone on Vanadium, and registry resume and localized views, which need upgraded registries.master.review effort: 'xhigh'
🤖 Generated with Claude Code