Repository navigation
feat: synchronized registry caches, private packages and encrypted RPC - #4583
Conversation
|
Additional parked-prototype blockers from the completed investigation: ws versus ws_authed is a revocation distinction, not a reliable authentication classification. The prototype must preserve authenticated internal LXC RPC frames above 1 KiB rather than applying public-client limits merely because that path uses ws. The new shared transport must carry an explicit, correct authentication/public-continuation policy. Also, unsaved registry URLs supplied through marketplace navigation need an explicit connect/unsupported state rather than a blank cache-only storefront. These remain draft integration work; no transport/protocol choice has been implemented. |
|
Inspected every reported check on head 4b1baca: Conflict Markers passed; all build, test, formatting, generated-artifact, and release checks were skipped for this draft. There are no reported failures, but this is not CI verification of the prototype. Keeping the PR draft and parked pending the shared WebSocket protocol decision. |
|
The first-class rpc-toolkit WebSocket/rpcstream foundation is now in #4586. This registry prototype remains draft and parked; it has not yet been adapted to that transport. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
4b1baca to
2e92c59
Compare
|
Corrected the release classification per @dr-bonez: /os/security and --security-notifications are unused, so their removals remain in place without compatibility shims. Removed the major label and fragment, restored the registry manifest/lockfile to the existing 1.5.0 release target, and applied patch. Removed the incorrect older-client migration warning from the description. StartOS/registry version checks and fragment formatting pass. The prototype remains draft pending transport adaptation and its other recorded integration work. |
|
Inspected the cancellation: run 41924381787 stopped before any steps. A later Conflict Markers run (41924382211) passed on the same head, 2e92c59. All remaining build/test checks are skipped for this parked draft; there is no reported code failure to fix and no rerun is needed. |
Keep the unreleased registry synchronization fragment under changelog rather than accepting Git's inferred directory move to release-notes. Preserve master's released notes, CI changes, and merged transport implementation. Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Resumed after #4586 merged. Integrated current master in e3c5939; the only merge conflict was Git inferring that the unreleased synchronization fragment should move to release-notes, so it stays under changelog unchanged. Also closed #4216 at @dr-bonez’s request, preserving head 4fb0064 and leaving its branch intact. Its private-access, signing, filtered-subscription/revocation, and icon confidentiality requirements are now part of this draft. Current master already has content-addressed icon storage, so integration will extend that owner rather than reinstate the old per-package/version store. The combined features and transport integration are not yet implemented or verified; the PR remains draft. |
|
Inspected the cancelled Conflict Markers job on e3c5939: it executed no steps. A newer check for the same head (run 42123371142) is already queued, so no retry or code fix is needed for this cancellation. The other build/test jobs were skipped because this remains a draft; they do not verify the combined integration. |
Adapt the private-access and per-key mirror work from #4216 (3852391, 6d3d559, and 8de464e), retaining master’s auth processing and content-addressed icon store. Reuse PatchDb::put to own mirror diffs and one package-icon reference scanner for access and sweeping. Add producer-based db.watch beside the filtered legacy subscription path, plus focused real-network regression coverage and generated bindings/man pages. Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Pushed the registry-server slice in
Per @dr-bonez’s latest direction, signing stays automatic. There will be no per-registry signing setting, persisted opt-in, or signing-management commands. The StartOS client still needs its shared signed socket and signed icon fetches, plus the continuation-policy/UI integration already listed in the provisional description. This PR remains draft. |
|
Inspected the cancelled Conflict Markers job on 5c4e2ba: it ran no steps and has no failed-step logs. Replacement run 42139196234 is already queued on the same head. Metadata checks are pending; build/test/artifact jobs remain skipped for this draft. No code fix or retry is warranted for this cancellation. |
Share a configurable 1 MiB request budget with HTTP, MCP, upgrade middleware, and legacy signature verification. Recheck body replacements before decoding and reject oversized commitments before allocation or reads. Keep response sizes independent; cover 17 MiB dumps and 5 MiB events over real WebSockets, plus streamed input, exact bounds, explicit larger budgets, and the affected auth paths. Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Inspected every check on That head adds the request-body protection discussed here: a configurable 1 MiB HTTP request budget, enforced before context/middleware and again before parsing after body rewrites. It also bounds legacy signature commitments before allocation/reads. This applies to requests, not outgoing results. Local verification includes seven HTTP boundary cases, 29 real-socket WebSocket cases, ten MCP cases, JSON-only HTTP/WS runs, and affected registry/auth tests. A 17 MiB initial dump and a 5 MiB event pass, demonstrating that outgoing replies are independent of the request cap. JSON-layer auth, transport-neutral SyncDb metadata, and the final multiplexed registry client remain in progress. The old upgrade-only client draft is retained as a session patch, not committed as the final design. Native response frame/message budgets and possible explicit fragmentation still need their own integration; the current Axum wrapper does not expose continuation-frame writes. Keeping this draft. |
helix-red
left a comment
There was a problem hiding this comment.
Re-review of b923d6497. The only changes since my approval of e2dbdca9c are @dr-bonez's 55ca56c95 and b923d6497. The branch merges cleanly with current master d4e4420e6: git merge-tree --write-tree origin/master b923d6497 exits 0, and GitHub reports MERGEABLE. I read the code without building or running anything.
b923d6497:- Marketplace sidebar: the status row renders only when the selected registry is Unreachable. When the sidebar is open, it shows the Unreachable badge (which still opens the failure details), followed by the projected
xsretry. When collapsed, it shows only the error dot, which keeps itsregistryStatecolor and accessible label. - Updates header: status appears only when the registry is Unreachable, next to the retry. That also removes the duplicated
|| 'connecting'fallback. - Every-state refresh is unaffected: registry management still shows every status in its column and keeps the More-menu "Refresh registry" for all states. So private-grant resubscription, failed-icon retry and immediate legacy polling still have a path while a registry is connected.
- Docs:
ARCHITECTURE.mdalready describes the status buttons as Unreachable-only shortcuts, so it stays accurate, and the changelog matches the new placement.
- Marketplace sidebar: the status row renders only when the selected registry is Unreachable. When the sidebar is open, it shows the Unreachable badge (which still opens the failure details), followed by the projected
55ca56c95: affects mock data only. The Community registry is now permanently Unreachable, with a timeout error and an empty catalog, and refreshing it in the mock keeps it that way.mockRegistryCachetakes the URL and uses the shareddefaultRegistries/sameUrlowners.
No findings.
CI at my last check: 4 passed, 22 pending, 9 skipped, none failed. This verdict doesn't depend on it.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
|
Confirmed approval 5899600658 covers current head b923d64, including @dr-bonez’s final UI. Rechecked after the subsequent approval notice: the head, approval and handoff are unchanged; GitHub still reports MERGEABLE. No duplicate merge, code change, build or review request is needed. Final handoff is complete: the updated brief retains all 20 current canonical captures, source attribution and runtime metadata, with identity-key exposure and the unreleased 0.4.2.2 compatibility node presented as maintainer decisions. @dr-bonez is already requested. Current CI remains pending, with no failed check in the inspected snapshot; canceled/skipped checks are not passes. Native automation owns merging. Draft #4709 remains gated on this parent’s native merge. |
|
Thanks—both cross-review and final approval now cover b923d64, and GitHub reports MERGEABLE. No code changes were requested. Eight CI jobs remain in progress: automated tests, generated artifacts, RISC-V builds/packages, an aarch64 package and the x86_64 macOS binary. No failed check is reported; skipped/canceled jobs are not executed verification. Native automation owns merging once the remaining gates pass. I will address any CI failure notification and follow the native merge event to retarget draft #4709; no manual merge or CI polling. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Fixed the current-head automated-test failure in 617de62. All ten failures came from the port-reassignment shared fixture constructing Public directly without registryCache/osUpdateCache; all_hosts destructures the whole model and panicked before the assertions. Added the same empty/null defaults already used by the neighboring address fixture. This is exactly two test-data lines, with no production/schema/UI/policy change. All 12 reassignment cases now pass in the CI test image with its release profile and test,ts,dev,unstable features. Used the same underlying container command with the module filter because the full repository runner exposes no filter; metadata and canonical formatting also pass. The prior CI run passed 1773 cases and failed these ten; it is not counted as success. No unrelated suite, binding generation or UI build was repeated. Pushed normally, confirmed a clean merge-tree against current master, and updated only verification/CI bookkeeping in the existing brief, retaining all 20 images and credits. Existing approvals describe unchanged production behavior; no substantive brief contract changed. Fresh-head CI will run normally—no blind rerun or manual merge. The previous head’s Generated Artifacts/image jobs were still pending when inspected. |
|
Inspected every current check and the completed RISC-V job log. This is an infrastructure/action-runtime failure, not an image/compiler failure: actions/download-artifact@v8 was downloading compiled-riscv64.tar (481,561,989 bytes) when the runner’s external Node24 aborted in V8 with No source/workflow change or local rebuild is warranted. A targeted retry of job132270250952 is appropriate after workflow43533711604 finishes; GitHub refuses retrying that completed job while its siblings still run, so no blind rerun was attempted. Preserve successful siblings rather than rerunning the whole workflow. Current snapshot:34 success,6 in progress,1 failed,16 skipped,2 canceled. Remaining work includes sibling image builds, automated tests and generated artifacts. Approval state/production behavior is unchanged; merging remains blocked on CI. |
* refactor(registry): share the db.subscribe follower, retry backoff and icon request Extract SubscriptionFollower (dump/revision application, heartbeat and initial deadline), db_subscribe_request and next_retry from StartOS's registry cache sync, and request_icon from the StartOS icon proxy, so a registry mirror can reuse them. Behavior is unchanged. Helix-Harness: claude-code Helix-Model: claude-opus-5-5 * feat(registry): mirror another registry with mirror-of A registry started with mirror-of follows the upstream's /index over an encrypted db.subscribe stream under its server identity, copies the stored icons the index refers to (verifying their blake3 names), and replaces its local index on every update. Handlers that write the index carry WRITES_INDEX metadata; MirrorGuard rejects them while mirroring. Admins, metrics and the server identity stay local. Removing mirror-of and restarting promotes the mirror with its synchronized index. Helix-Harness: claude-code Helix-Model: claude-opus-5-5 * fix(registry): keep mirror icon requests on the upstream and bound them Signed icon requests no longer follow redirects, so the mirror's signature header cannot reach another origin, and each icon download has a 30-second total deadline so a stalled body cannot freeze index synchronization. Document that a public-only mirror needs a restart after private-access grants. Adopted from @helix-white's review. Helix-Harness: claude-code Helix-Model: claude-opus-5-5 * chore(start-wrt): bump version to 1.4.1 start-wrt 1.4.0 was tagged before #4583 merged, and #4583 left four patch fragments pending against that version. check-version now expects 1.4.1 on master. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
CI delivery blocker — infrastructure: the RISC-V image job crashed in the runner’s Node24/V8 runtime inside
actions/download-artifact@v8, before image building. A targeted retry is deferred until its sibling image jobs finish; successful siblings should be preserved. Automated tests and generated artifacts also remain pending. This is not a source/compiler failure or green CI, and no workflow/code change was made.Maintainer decisions
serverIdentityKeyin PatchDB. Registry public-index feeds and WRT session APIs exclude it. Tunnel’s authenticated full-database feed and Registry/Tunnel admin root dumps include it, following their existing full-state semantics. A copied key can impersonate that signing identity without an advisory fingerprint-change warning; session revocation does not revoke the copy. Should these remote views redact it instead? Redaction must cover snapshots and subsequent patches while retaining the persisted key. This boundary is documented at the production owner.Change
StartOS synchronizes configured registry catalogs, proposed signing keys and its selected OS-update catalog in the backend, without an open browser. WebSocket-capable registries push revisions; legacy registries are polled every 15 minutes. Removal prunes the registry cache; switching the OS source replaces that view. Invalid saved URLs are isolated without rewriting preferences, and initial queries wait for synchronization rather than returning premature not-found results. Unsaved links offer Connect, warning that newly discovered keys will be trusted for packages. Refresh restarts synchronization without approving keys or waiting for readiness, and refreshed listings allow failed icons to retry.
Availability is separate from retained data. The marketplace sidebar shows status only while Unreachable: an expanded label followed by an adjacent small retry, or an error dot when collapsed. Connected/Connecting have no indicator there. There is no catalog-header status or standalone sidebar refresh. Registry management retains every status in its dedicated column and an Unreachable-only retry. Following @helix-red’s finding, its More → Refresh registry command remains available in every state, preserving private-grant discovery, failed-icon retry and immediate legacy polling without undoing @dr-bonez’s visible-button design. Selecting Unreachable opens the stored URL/failure as plain text and retains the selected failure through retry. Selector menus omit status tags.
Updates counts are green. Any registry error replaces the Updates navigation/menu count with a warning, while affected registry rows retain cached counts alongside warnings. The selected table always names its registry and adds status/retry only while Unreachable; selection survives status/name revisions. Unavailable empty catalogs retain placeholders rather than claiming an empty marketplace or that every service is up to date. Successful empty/filtered catalogs keep their normal result. The page and navigation share the existing live PatchDB → marketplace → singleton update-refinement pipeline, without reload; legacy changes still depend on polling.
Registry administrators can make packages private and assign readers through
package.access. Administrators, authorized publishers and named readers can retrieve them; reader lists remain administrator-only. One visibility rule covers queries, subscriptions and icons, before version-compatibility projection. Revocation stops subsequent delivery but cannot retract retrieved bytes. A public-only subscriber must resubscribe after receiving a private-access grant; manual refresh provides that. Public icons remain anonymously available after rejected proofs; private-only icons return hidden 404s or authorizedprivate, no-storeresponses. Private-icon requests use the server’s registry identity and are restricted to saved registries’ content-addressed icon endpoints.Browser/native RPC across StartOS, registry, Tunnel and WRT uses encrypted
/rpc/v2sessions. Typed observations distinguish the initiating reply, items and actual terminal result for database revisions, logs, metrics, startup, updates, sideloads and WRT flashing. Percentages, EOF and Close are not success. Dropping observation does not undo independently accepted work; read-only recovery never replays it.Implementation diff: +17719 / −5264 lines in 274 files (excludes lockfiles, tests, docs, release notes, and changelog).
Generated runtime bindings/MCP inventories account for 4,080 added /702 removed lines in 23 files. Application mock implementations remain included; inline tests, browser fixtures/loaders and the runnable documentation example are excluded. The production generator is included.
Contracts and rollout
Public.registryCache[url]containingRegistryCache {info, packages, status, error?}, nullablePublic.osUpdateCachecontainingOsUpdateCache {registry, versions, status, error?}, and privateregistryIndexesfor subscribed indexes. Persisted configuration remains inserverInfo.registries/osRegistry. Defaults supply absent caches without migration. The wire stateerrordisplays as Unreachable; failure details clear on retry/success. Historical snapshots lacking details remain readable and show an explicit fallback. Successful polling counts as Connected without implying a socket.PackageInfoflattensPackageAccessControl; historical packages default to public with empty readers. Verified identity, not request claims, controls access. Equivalent filtered views share weak replicas; unused mirrors release their tasks.db.subscriberetains its endpoint and optionalosVersion. Ordinary{dump,guid}replies and GUID revisions remain compatible. Opting intorpcstream:"1.0"returns an initial dump and same-ID revision/terminal events. Other observations retain legacy GUIDs in ordinary replies and nullable capability fields in typed replies. Rust/TS contracts separate Item/Final, defaulting toNever/(), and retain inherited parameters separately. Normal replies carry cancellable database-commit fencing throughRpcResponse.meta.patchSequence; MCP uses_meta, HTTP retains its header, and foreign responses never fence the local database. The initial dump establishes its own fence. Full-width IDs, numeric tokens and UTF-8 BOMs remain intact.auth.dbthrough sysupgrade. There is no import/migration/retention path for the unshipped PEM files. Normal StartOS renames its existing account key toserver_identity_keywhile preserving the exact bytes/fingerprint, including the DevVM, serializedprivate.developerKeyand backup representation. The same key serves init export, the on-box CLI and local legacy-package conversion; package developer/publisher field names are unchanged. Startup contexts retain temporary identities./ws/rpc/<guid>remain. Older encrypted servers may ignore ordinary-call cancellation: local cleanup/late-reply isolation remains, but remote per-ID cleanup requires the server update. Removed proof prototypes were absent from published SDK 4.1.0.Legacy registry discovery/polling reuses signed HTTP. A pre-upgrade HTTP 200 without upgrading, or 404/405/501, selects that path before any application call and retries WebSocket support each polling cycle. All four live legacy hosts actually return HTTP 200/JSON-RPC parse errors to the empty upgrade GET. Redirects, authorization/network failures and post-101 admission failures never select fallback; registry administration does not inherit it. HTTPS protects this detection. An active attacker on a configured plain-HTTP URL can forge the unsupported-upgrade response and select plaintext HTTP. Background requests expose public client identity to configured registries without an open browser; synchronization grants no signing trust.
Ownership, security and bounds
The two-message exchange reuses existing request commitments, signing providers and verification. Each hello contains exactly two CBOR objects, body then proof, signed as captured bytes. The client binds its ephemeral key to the RPC/exact-GUID target; the server binds its response to the client record. X25519/HKDF-SHA256/AES-256-GCM derives separate directional keys/counters. Proofs emit pure Ed25519 and retain Ed25519ph verification; package/storage signing defaults remain. There is no extra wire acknowledgment. Validation rejects tagged/normalized alternatives, duplicate/unknown hello fields, malformed binary shapes and integer widths before decoding erases distinctions.
Identity possession grants no role. Admission retains live ingress/replay state, enrollment, expiry, permissions and revocation hooks. Continuations register cancellation before rechecking current membership; public GUID attachment requires fresh proof for that exact target. Stored-key, local-token and bearer precedence remain distinct, including independent local credentials. Setup/init/diagnostic and WRT bootstrap use temporary possession identities, not invented enrollment. Native callers reuse one lazy session scoped to endpoint/signing context/credentials, with a reader driving keepalive; application errors retain healthy sockets and loss never replays sent work. Logical authority, deployment prefixes, SOCKS and TLS settings survive
.localdial pinning. Only upgrades are HTTP/1-only/nonredirecting; explicit HTTP headers remain on HTTP.timeout:0means no deadline on both transports.Existing RPC actors, PatchDB replicas, grouped registry tasks, RxJS refcounts, key leases and result owners remain authoritative. Three reachable gaps need additional ownership:
Chosen limits, not measured production maxima: 1 MiB inbound RPC /64 MiB logical reply; 1 KiB hello /depth 16; 30-second admission; 15-second writes/init retirement; public continuations1 KiB /15 seconds; 1,048,576 cached nonces while unsynchronized; 2^32 records per directional key. Server producer queues retain 16 items plus a reserved terminal. Budgets multiply across streams and add framing/object overhead; there is no global heap quota or CPU rate limit. Registry ping/idle bounds remain 60/120 seconds. The existing ±30-second signing window includes signing/proxy time; slow GPG or clock skew can exhaust it even though network admission starts later. Reconnect signs anew without hidden retry. Rejected post-upgrade admission may surface as EOF.
Identity history is advisory, not a hard pin. Own-server browsers silently remember first contact, then show Server identity changed with previous/current fingerprint Details, continue and remember the replacement. Separate IndexedDB history survives logout and deduplicates concurrent changes; startup/foreign peers do not populate it. CLI warnings leave stdout/status unchanged. Fingerprints are SHA-256 of raw Ed25519 public bytes, rendered as
SHA256:plus lowercase hex. First-contact interception and replacement same-origin JavaScript remain outside this protection;ws://also exposes the first public identity message. Browser-authentication keys remain nonextractable; transient session keys are JS-owned. WebAuthn/hardware-token enrollment is not implemented.Additional fixes
...at 100% until a real terminal. The separate redesign is #4709, draft until this parent merges; then retarget it to master, never merge it into this branch./os/securityand--security-notifications, confirmed never deployed by @dr-bonez; no compatibility shim is needed. Security notices derive from synchronized OS metadata.adjtimexand systemd’s maximum-error policy, not subprocesses or sticky readiness.ModelExtfor enum fallbacks. Stored-key/backup continuity and unknown-value preservation have regressions; historical migration accessor renames do not change transformations.node-forgeand dev-onlyfollow-redirects1.16.3 (GHSA-mrwp-f3q8-3g9p) updates address identified advisories; unused browsernode-josedependencies/shim are removed. Correct obsolete protocol/result comments and locale source grouping. Core bundle dependencies now reuse their installed sentinel, matching the SDK; missing/changed-lock installs remain.RegistryRefreshcommand owns TaskService/API handling for the menu and composed icon presentation; warning accessibility uses the shared status label.The normal master integrations preserve shared-volume/backup fields and watchers, backup-history/no-notification behavior, port reassignment, WRT remote-access/security changes and the UPS monitor. Combined TS/MCP output is generated from those owners rather than selected from one side. Master’s dictionary IDs and translations remain; 15 parent keys and Unreachable follow them, with 1,092 keys across all five languages.
Verification
Executed on Debian 13 with production owners and controlled real network/process counterparts, not a deployed StartOS box. Successful evidence is reused where behavior/ABI is unchanged; aborted runs and initial fixture failures are not passes.
617de624ccorrects only the shared raw database fixture for port reassignment: it omittedregistryCache/osUpdateCache, so mutable Public-model destructuring panicked before ten tests reached their assertions. The neighboring address fixture already supplied these fields. Adding their existing empty/null defaults makes all 12 reassignment cases pass with the CI test container, release profile andtest,ts,dev,unstablefeatures. The repository runner has no test filter, so the same underlying container command was narrowed to this module after metadata and canonical formatting. No production code, schema, UI or policy changed; a fresh CI run is still required.useMocks=false; a separate returned mock build exercises the UI. Actual Chromium verifies Connected/Connecting indicator absence, expanded/collapsed error presentation, unavailable-empty placeholders and stable selection on the human’s final UI. Earlier applicable checks cover retained counts, plain-text details, mobile warnings and real retry from all three shortcuts. More-menu refresh succeeds in all three states after menu closure. Mock mode deliberately keeps the Community registry empty and Unreachable, including after refresh; this is not a live-host outage. Earlier same-instance cache proof changes the Updates badge 0→1→0 without reload. The core dependency recipe has a real-Makefile warm/missing/changed-lock fixture and an old-owner negative control.crypto.subtle/randomUUIDor persisted possession identity/history.GHSA-g3hv-75wg-m249; this is not a fresh audit claim for every subsequently merged dependency. A two-hop negative control distinguishes the former dev redirect-header leak from the compatible patch.Cross-review and final approval cover b923d64’s unchanged production behavior. The subsequent
617de624ccommit only initializes two existing fields in a test fixture. Its 12 focused tests pass locally; current-head CI is pending. The previous head’s automated-test failure is not a green result, and prior successful build checks are preceding-head evidence. No physical installation, sensors, TTY, hardware signing, provisioning, OTA/flash or reboot was exercised. CI notifications own follow-through; no manual-testing request or manual merge.Subsumes @helix-b’s closed #4216, preserving source head
4fb0064ec80ba1343d6e577623169e49f831a458and attribution; its branch was not deleted. #4586 and #4609 are merged. #4445 is closed unmerged, not a dependency. #4709 follows this parent’s native merge.Screenshots
These are actual components with repository mock data, not physical setup/update/flash. The marketplace/Updates captures include @dr-bonez’s final Unreachable-only presentation; controlled retained-cache states remain valid. Five startup captures preserve the legacy presentation rather than #4709’s separate design. Registry failures are controlled fixtures, not live-host failures. Unchanged identity-warning captures use an earlier unshipped transport and are presentation evidence, not current-wire proof.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol