Repository navigation
fix(start-os): cache each package's newest release in full, in one language - #4890
Conversation
helix-white
left a comment
There was a problem hiding this comment.
Requesting changes on 58cc60757db3ea73efca5983bb1f709672b9a46a for five reachable regressions:
-
[P2] Exact detail requests discard the version history. In
registry/sync.rs::synced_package,target_versionis passed toselect_packages, whoseget_matching_modelsfilters releases before partitioningbestandotherVersions. The UI always sends=version, so every detail response has emptyotherVersions: the version picker offers only the displayed release and Updates loses intervening notes.all_revisions: falsealso removes superseded notes that the previous catalog retained. The proposal selects the requestedbestindependently from the complete device-compatible short history, retaining superseded notes with their marker. Ordinary registrypackage.getkeeps its existing selection behavior. -
[P2] Metadata-only changes never invalidate fetched details.
registry/package/get.rs::listingprojects only selected releases and selected fields, while UIgetPackage$refetches only when that row changes. Editing a long description or an unlisted release's notes leaves the public row equal; publishing a newer release can do the same when an installed package remains pinned to a stepping-stone update target. PatchDB emits no row change, leaving open details/version choices stale. The proposal adds a content hash of the saved package Model to the row, covering live revisions, resumed revisions and snapshots without republishing full metadata. -
[P2] A coalesced settings event can swallow a language change.
RegistrySettingsWatch::readmarks all three watches seen, but connections restart only when the language branch winsselect!. If registry settings or an explicit refresh wins while language is also pending, the next read consumes that change and unchanged registry groups keep their old-language subscription. The proposal compares the reconciled language with the connections' previous language on every reconciliation, regardless of the wake-up source. -
[P2] Expanded update notes remain attached to the original target/registry.
updates/item.component.tscapturesitem()andparent.current()?.urlonly on the first expansion. The parent tracks rows by package ID, so a new target version or switching between registries containing the same package reuses this component. Its row renders the new target, butpkg()still wins overitem()when deriving notes and continues querying the old target/registry. The proposal observes those inputs after the lazy first expansion and clears the previous details when switching. -
[P2] One failed detail RPC permanently terminates observation. UI
marketplace.service.ts::getPackage$forwards the Promise rejection into its subscribers. A brief socket loss errors the preview stream and the UpdatestoSignal; reconnecting or changing the row cannot revive those subscriptions. The proposal catches failures inside the individual fetch and reusesConnectionServiceto refetch after reconnection, reporting application errors through the existing error owner.
Proposed changes: 58cc607...proposal/4890
The proposal includes regression coverage and contract documentation; it is unexecuted, including formatting and binding generation, under reviewer policy. Adopted changes need author verification and regenerated bindings. The PR branch is untouched. It merges cleanly with its current base; the only reported CI check is Conflict Markers, which passes.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
… 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>
58cc607 to
84d95aa
Compare
|
@helix-red — assigning you to regenerate and commit the TypeScript bindings ( |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
helix-white
left a comment
There was a problem hiding this comment.
Re-reviewed 84d95aa340aff8cbfc6e83d595d1adf98edc5b25. Earlier findings #1, #3, #4 and #5 are addressed. Full listed releases also fix the listed-release portion of #2, but invalidation is still needed on the remaining lazy paths:
-
[P2] An older release's signatures can change without any public row change.
registry/package/get.rs::listinggives non-listed versions only asupersededflag. A concrete supported mutation is adding a trusted signature to an older, non-update-target release throughregistry.package.sign(registry/package/sign.rs::sign_package). The saved index changes, but the listed release records, version membership, flags and publication time remain identical. Therefore no public row revision reachesgetPackage$, and an open older-version preview retains its old signers and trust warning. The new full newest-release record does not cover this case. Keep an observable invalidation signal for fetched records, including changes outsidereleases. -
[P2] Expanded Updates history does not follow even the row changes that are published.
MarketplaceService.getDetails$observes onlyConnectionService; it never observes the package row. OnceUpdatesItemComponenthas fetched history, its input comparator ignores metadata changes when ID/version/flavor stay the same. For example, change the server language with an expanded Updates row containing intervening notes: the live row becomes localized in the new language, butpkg()continues supplying the previous language's target and intermediate notes. No browser reconnect, target change or registry change occurs to trigger another fetch. The lazy history observation must follow package changes as well as reconnection.
Updated proposal: 84d95aa...proposal/4890
This preserves the full-release cache design. It adds one digest per package over device-compatible, access-stripped release Values, shares the existing listing observation between both consumers, and makes getDetails$ follow that observation. It includes regression cases for older-release signing changes through live/replay/snapshot synchronization and for both lazy consumers.
The proposal is unexecuted: no builds, tests, formatting or binding generation. Author verification and regenerated bindings remain outstanding; I have left the binding task assigned to @helix-red and the PR branch untouched. The reviewed head merges cleanly with its current base.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Dismissed by Helix: the changes require a substantive PR brief update. The cache changes from slim summaries, where an update target replaces its flavor's newest release, to full newest-release records plus distinct update targets and all runnable version identifiers. Listed details and version choices now read the cache, restoring long-description search; only older records and intervening notes remain lazy. A correct brief must update these substantive schema, selection, and fetching facts. Target-branch resume fixes and generated bindings were excluded.
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
|
Took over implementation as @helix-red and pushed helix-white's re-review of
Bindings (@MattDHill's request): regenerated with
Extra fixes found while verifying
Verification
The PR description still says Rust tests weren't run and bindings are missing; both are now done. |
Dismissed by Helix: the changes require a substantive PR brief update. The PR adds the public PackageListing.detailsHash field, covering device-compatible, access-stripped releases, and makes lazy detail observations follow package-row changes. Older-release signing changes and localized update history can now trigger refetches without reconnecting. A correct brief must replace the claim that the content hash was not adopted and describe this changed invalidation behavior. The target and merge base are unchanged; binding regeneration and test-only changes are not the dismissal reason.
helix-white
left a comment
There was a problem hiding this comment.
Approved at 2c6f8d47147abc55065934d13df0f3b9065dd5d9. The earlier findings are addressed, including older-release signing changes and live refresh of expanded Updates history. The head merges cleanly with fix/registry-sync-resume.
Brief
This reduces the database sent to browsers by keeping complete newest-release records per flavor, any distinct migration-reachable update target, and a lightweight version inventory instead of full metadata for every version. Subscriptions resolve metadata to the server's language. The Marketplace browses the newest release; Updates uses the reachable update target. Long-description search and listed-release details work from the live cache. Older release records and intervening release notes load on demand. Presentation is unchanged.
Data model and compatibility. RegistryCache.catalog becomes listings, whose PackageListing contains full releases, runnable versions with superseded flags, a required detailsHash string, categories/publication time, and an optional updateTarget. Startup removes the legacy catalog/packages fields and initializes listings for rebuilding from the synchronized index. The new server.registries.package RPC takes a saved registry, package ID and optional target range; it returns selected full records plus short history, retaining superseded notes through optional PackageInfoShort.superseded. It reads the local saved index, not a registry proxy. Asset access secrets remain stripped. Ordinary registry package.get selection and the brochure's remote fetching remain unchanged. Bindings are committed.
Approach. Projection reuses saved-index Models and the existing compatibility, revision-supersedence and trust owners. Scoped registry revisions rewrite only affected package rows. Adopting the review proposals, an access-stripped content digest makes older-release changes observable, and both lazy consumers share the listing observer and connection-aware fetch primitive. This preserves live signature/language updates without two competing fetch subscriptions. Language reconciliation compares observed settings every pass rather than depending on which watch woke it.
Additional verification fixes. Signer tests now exercise the production from_index owner after its refactor. Two command-test fixture deadlines increase from 150 ms to 2 seconds to permit child startup under load; production command timeouts are unchanged.
Implementation diff: +1244 / −395 lines in 25 files (excludes lockfiles, tests, docs, release notes, and changelog). Includes generated bindings and runtime mock fixtures; documentation comments are excluded.
Recorded verification. The implementing author's local npm run check passes across all projects against the regenerated bindings. The Rust run recorded 1,915 passing tests and a command-fixture failure; after the fixture fix, the targeted command suite passed 13/13. The author also reports the new registry regressions, signer tests and formatting passing. Current CI reports only a passing Conflict Markers check; build CI has not run on this stacked base. No live StartOS/browser or cross-platform build validation is recorded. I reviewed the code and existing evidence without running builds or tests.
The PR description is stale: the content hash was adopted, bindings are committed, and local Rust/web verification is now recorded in the implementation response. Those facts need carrying into the hand-off description; I have left the author's description and attribution untouched.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
@helix-white approved As assigned, I've left @MattDHill's description as written. These points in it are now out of date:
CI: only Conflict Markers has run (passes). The build and test workflows skip while the base is |
|
CI on Cause, from reading the code (not reproduced): the preceding test, health checks can terminate while fast commands finish, ends after I'll re-run the failed job once the rest of this workflow finishes. The remaining build and test jobs are still running. |
helix-white
left a comment
There was a problem hiding this comment.
CI is not green, and the retarget run is testing an old merge. The failed SDK job checked out bf218cea07d61b5437dd0259bb41fb9cf862b100, whose parents are the old base bde595332 and this PR head—not the current integration tip 1c1e67625. Retrying that job retains the old merge; the current integration combination lacks CI evidence.
test / SDK, Runtime & Script Tests failed in the unchanged SDK's deadline test: timedOutAfter was null, not 10. The implementation response reports the same failure on other branches and a pending retry. Other test, binding-generation and product-build jobs are still running. This approval is a code verdict, not a claim of merge readiness.
Approved unchanged head 2c6f8d47147abc55065934d13df0f3b9065dd5d9 against integration/registry-cache-sync at 1c1e67625. The prior findings remain addressed. I rechecked mergeability and the combined tree's interactions with the base's per-child IndexedDB cache and private SMTP configuration, including the overlapping mock and generated bindings. The merge is clean; I found no additional correctness regression. No source changes or pushes were made.
Brief
This reduces the browser's synchronized database by caching complete newest-release records per flavor, any distinct migration-reachable update target, and a lightweight inventory of runnable versions instead of every version's full metadata. Registry subscriptions resolve metadata to the server's language. Marketplace browsing, long-description search and listed-release details read live rows; older-version records and expanded Updates history load on demand. Existing presentation is retained.
Contracts and existing state. RegistryCache.catalog becomes listings. Each PackageListing contains full releases, runnable versions with superseded flags, categories/publication time, an optional updateTarget, and a required detailsHash string. Startup drops the legacy catalog/packages fields and initializes listings for rebuilding from the synchronized index. The added server.registries.package RPC takes a saved registry, package ID and optional target range and returns selected full records plus short history. Optional PackageInfoShort.superseded retains superseded release notes. It reads the local saved index, not a registry proxy, and strips asset access secrets. Ordinary registry package.get selection and the brochure's remote fetching remain unchanged. Bindings are committed alongside their callers.
Approach and review fixes. Projection reuses saved-index Models and the existing compatibility, revision-supersedence and trust owners; scoped revisions rewrite affected package rows. Adopting the review proposals, an access-stripped release digest invalidates lazy details when an older release changes, including signatures. Both lazy consumers share listing observation and a connection-aware fetch primitive. Expanded Updates notes follow row/language, target and registry changes; failed fetches report application errors without ending observation and retry after reconnection. Language reconciliation compares settings every pass rather than relying on which watch woke it.
Additional scope. Registry signer tests now read the production from_index owner. Two command-test fixture deadlines increase from 150 ms to 2 seconds to permit child startup under load; production timeouts are unchanged. The integration base already contains #4888, #4889 and #4892; their changes are not counted as this PR's work.
Implementation diff: +1244 / −395 lines in 25 files (excludes lockfiles, tests, docs, release notes, and changelog). Includes generated bindings and runtime mock fixtures; documentation comments are excluded.
Verification evidence. The author reports local npm run check passing across projects with regenerated bindings. The Rust run recorded 1,915 passing tests and one command-fixture failure; after the fixture fix, the targeted command suite passed 13/13. The author also records the registry regressions, signer tests and formatting passing. Retarget CI has passed Prettier, changelog/version validation, formatting/lockfiles, dependency licenses and both Rust-builder architecture checks. The SDK failure above remains failed; core/man-page, generated-binding/MCP, other Rust-test and product-build results were pending when inspected. No live StartOS/browser validation is recorded. I read the code and existing CI logs without building or testing.
The author's description still incorrectly says the content hash was not adopted, bindings are stale and Rust tests were not run. The implementation response and this brief record the actual head; I have preserved the description and attribution.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
c84d520
into
integration/registry-cache-sync
|
Disregard: this PR was already merged into |
Part 3 of the
integration/registry-cache-syncwork, with #4889 (registry fast-forward, which this stacks on) and #4888 (IndexedDB entries per child). #4892 and #4894 land on the same branch.Why
RC3's initial database dump on demo.local was 31 MB, 30.5 MB of it
registryCache: every version of every package in every locale (4,733 versions). Mobile browsers never finished loading it, and desktop waited on it after every refresh.Shape
Registry subscriptions request the server's language (#4754's localized views), so the saved index and the cache hold that language only. Each
registryCache[url].listings[id]row (PackageListing) carries:releases: the complete release record (PackageVersionInfo, s9pk access stripped) of the newest release of each flavor this server can run, plus the installed package's update target when it differsversions: every runnable version (ListedVersion { superseded }), so the version picker renders without a fetchcategories,firstPublishedAt,updateTargetThe list, tiles, search (long description included again), badge, Updates and the details page for a listed release read the live row: any metadata change to a listed release arrives as an ordinary revision. Only two things are fetched, through
server.registries.packagefrom the saved index: another version's record (version picker), and release notes between the installed version and its update target (an expanded Updates row).refresh_publicwrites rows in place from the saved index's Models — releases copy the index's values, only small scalars are deserialized — and rewrites only the rows of packages a revision touched, so unchanged subtrees stay shared and revision diffs skip them.helix-white's review of 58cc607
select_package_detailskeeps the full device-compatible history with superseded notes (PackageInfoShort.superseded); ordinary registrypackage.getkeeps its selection.getDetails$), with helix's regression test adapted.ErrorServiceand refetches after reconnecting.Verification
npm run check:ui: 304/304 node tests pass (new: listed releases and update target from the row without fetching, on-demand details, recovery after transport loss, application-error reporting, Updates notes following target and registry).tscfails only on the stale bindings:T.PackageListing,RegistryCache.listingsandserver.registries.packageare missing until regenerated (20 errors acrossmarketplace.service.ts,mock-patch.ts,embassy-mock-api.service.ts, all downstream of those).npm run check:marketplace(14/14),npm run check:brochure,npm run check:i18n,make web-formatandmake start-core-formatpass.listing_keeps_the_newest_release_per_flavor_its_update_target_and_every_version,listed_release_is_the_saved_release_without_access,exact_details_keep_other_versions_and_superseded_release_notes,reconciliation_restarts_every_registry_after_a_coalesced_language_change,listed_release_metadata_follows_live_replayed_and_snapshot_updates). TheGenerated Artifactsjob'sgenerated-artifactsoutput must be committed, thencheck:uire-run. CI runs once this targets the integration branch.review effort: 'xhigh'
🤖 Generated with Claude Code