Skip to content

feat(registry): add OS version edit command - #4699

Merged
dr-bonez merged 137 commits into
masterfrom
feat/registry-os-version-edit
Nov 14, 2026
Merged

dr-bonez merged 137 commits into
masterfrom
feat/registry-os-version-edit

Conversation

@helix-white

@helix-white helix-white commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Adds admin-only start-registry os version edit <version> and start-cli registry os version edit <version> on top of the merged registry/cache and headline-removal work.

Optional flags update release notes, the source-version range, image commit, and security status. --security true|false supports clearing the security flag; omitted fields, assets, and authorized signers remain unchanged. Release notes accept plain text or a locale map and replace the entire previous value.

Implementation diff: +264 / −0 lines in 9 files (excludes lockfiles, tests, docs, release notes, and changelog). Most additions are generated TypeScript and MCP contracts.

Contract and approach. The new EditVersionParams RPC request requires version; its other fields are optional and reuse existing metadata types. Omitted or null fields preserve stored values, so editing cannot clear gitHash to null. Missing versions fail rather than being created. The optional --expected-git-hash guard reuses the existing image-commit check inside the same database transaction as the edits. Unlike add, which upserts and replaces all metadata, this command updates selected fields.

The command reuses administrator authorization, CLI transport, database notifications, and versioned index replicas without additional production state or background work. Edits flow through existing client-specific note and headline projections. The compatibility bound through StartOS 0.4.3 remains intact.

Mirror integration. The command carries the existing WRITES_INDEX metadata, which lets MirrorGuard reject edits while a registry follows an upstream. Administrators edit the upstream instead. This preserves the read-only-index guarantee introduced on master; regression coverage attempts a real metadata change to an existing version and asserts that the mirror rejects it without changing its index.

Existing records need no additional migration for this command. The registry must support the endpoint before an updated client can use it. This PR adds minor fragments but retains master’s registry 1.6.0 and CLI 3.0.0 versions.

Verification. Linux cache-backed verification passed 163 registry tests, with two optional external live-registry/browser tests ignored. Coverage includes CLI/RPC parameter parity, partial edits against real PatchDB state, signed-image and signer preservation, atomic missing-version/stale-commit rejection, administrator enforcement through the production CLI transport, modern/legacy live-replica revisions, and mirror write rejection. The suite also exercises encrypted subscriptions, caches, privacy, and headline compatibility.

The filtered Cargo run used the repository’s pinned containerized builder and its test recipe’s release profile and test,ts features; the full-suite recipe has no test filter. Manpages, TypeScript bindings, and the MCP catalog were regenerated. Core and SDK 4.2.0 CJS/ESM builds and assertions against both built schema copies passed. Scoped containerized Rust formatting, Prettier, and product-version checks passed. The initial combined verification command timed out during bindings compilation after tests and manpage generation succeeded; the remaining generation/build checks completed on resumption. No VM, deployed-registry update, or standalone executable invocation was performed; parsing, production client transport, and replica behavior were exercised locally.

Master integration preserves its final registry/authentication changes and StartWRT version correction, with no unrelated changes in this PR’s diff. Merge integration and the mirror-guard fix have separate commits. Renewed cross-review approved 2d25f02d3. Master-targeted CI passed automated tests, generated artifacts, formatting/lockfiles, dependency licenses, changelog/version validation, the product binary/package matrices, the registry container image, and conflict checks. Full OS/OpenWrt image builds and deployments were skipped; superseded metadata/conflict runs were cancelled. Merged into master as 1cca51ef7f7bb414fe5725ccf9e3d57eef0b2d8c.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
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
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
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
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Group Index/Os watches into one connection per registry, sign each initiating JSON message with the server developer key, and configure independent 64 MiB response message/frame budgets. Preserve cache projections, current-selection guards, trust refresh, update notification deduplication, reconnect backoff, heartbeats, and task ownership.

Share stream envelope encoding/decoding through rpc-toolkit's RpcStreamResponse rather than implementing the result/error protocol again in the client. Reuse the registry RPC URL owner for CLI and StartOS callers. Automatically sign registry HTTP queries/discovery through the existing compatibility adapter; keep scoped no-redirect and ordinary HTTP clients in one atomic reload snapshot.

Adapt the automatic RpcContext developer-key signer from closed #4216 (source head 4fb0064), without its per-registry signing settings or management commands. Document db.watch deployment ordering and correct obsolete signed-upgrade authentication documentation.

Verified 40 focused core cases (13 rerun after codec/URL consolidation, 27 unchanged cases reused); 17 toolkit unit +29 real-socket cases with/without CBOR; 11 feature-disabled unit cases; core check and pinned formatting.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Capture method/params serialization before asynchronous device-key lookup and signing. Reuse auth.signRpcRequest, then add the proof without reparsing numeric tokens. Shared rpcRequestBody/rpcRequestHeaders own framing and MIME handling; HttpService.rpcMessage sends the captured body unchanged. Keep unsigned setup/brochure/endpoint-override flows separate and preserve resource-header authentication.

Adopt the body flow in StartOS, StartTunnel and StartWRT without replacing WRT's aborting transport or changing patch waits, code-34 invalidation and firmware hash checks. Use immutable Angular headers to preserve caller headers and merge resource proofs case-insensitively.

Update stale response-metadata/cache fixture boundaries exposed by the combined client suite. Remove commented-out API stubs/section debris and trim explanatory comments in touched files. Update API/architecture/style references and existing unreleased authentication fragments.

Verified full npm check (34 RPC-client, 14 shared, 136 UI-state and 4 i18n test cases plus all project typechecks/i18n checks), three production UI builds, scoped Prettier and returned browser entry/signing artifacts. Builds succeed with bundle-budget/CommonJS warnings; no budgets were raised. Reuse unchanged SDK signer/cross-language verification.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Keep the existing enrolled-browser HTTP resource gate before any upstream work. Reuse SignatureAuthContext::check_pubkey rather than copying its enrollment rule, preserving resource last-active behavior and signature-only authorization.

Sign package/dependency icon GETs with the account developer key only for exact content-addressed paths under saved registry URLs. Reuse the icon-store path validator and one icon route component; share canonical saved-registry enumeration with synchronization and connection membership. Signed requests use the existing no-redirect client, while other images and archive hosts retain their transport policy. Preserve upstream status, MIME, cache policy and streaming bytes without forwarding unrelated headers.

Reuse test-only auth/registry fixtures across resource tests. Verify exact origin/prefix/path boundaries, no credentials on redirects, normal unsigned redirects, real private dependency icons and revocation, and local missing/unenrolled/replayed/revoked proof rejection before proxy work.

64 focused core cases and cargo check pass; pinned Rust formatting, scoped Prettier and diff checks pass. No RPC schema, CLI or frontend surface changed.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Adapted from @helix-b's proposal 3fc854c. Also isolate malformed OS selections and marketplace entries, preserving persisted intent and valid-source updates.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Public model destructuring requires all schema keys. Production pre-init normalizes serde defaults, but this partial fixture bypassed it and panicked in eight address tests after the cache fields were added. All 16 focused address tests now pass; production behavior is unchanged.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
The marketplace queries its first projected TemplateRef. The refresh control's @if anchor preceded the package template, so it was selected and repeated for every catalog row. Preserve the existing projection contract by placing the package template first. Chromium now renders five package cards and one refresh action, including after refresh; saved, unsaved and invalid-link screens were captured from the actual mock-mode build.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Integrate e91ad54 (#4593), retaining its shared OS-asset permission check and admin signing regression. Re-export the existing canonical test_context under the ingestion fixture alias so the new sibling test can reuse it without restoring the obsolete duplicated context constructor. Seven affected registry-context tests and core check pass.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Use Snow for the XX state machine and the standard libp2p Ed25519 certificate profile. Sign through the existing Signer so native and gpg-agent identities need not export long-lived private keys. Cover peer/key substitution, cross-exchange certificate reuse, context mismatch, malformed proofs, transport replay and an independent maintained-JavaScript certificate fixture. This adds the shared primitive; transport integration follows.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
@helix-white

Copy link
Copy Markdown
Member Author

Parent-stack update: #4698 is now rebased on #4583 and targets feat/registry-live-cache. Its head is fa24405; registry 1.6.0 is inherited unchanged from #4583. Please rebase this child onto the rewritten headline-removal branch before its next handoff. Headline compatibility now lives in WireCompatibility and covers live subscription snapshots/revisions as well as ordinary replies.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
@helix-white
helix-white dismissed helix-red’s stale review November 13, 2026 21:19

The repaired stack now inherits the live-cache/encrypted-RPC parent, shared WireCompatibility subscription projections, and registry 1.6.0 from the base. Those material integration and rollout facts replace the previous brief and require renewed cross-review.

@helix-white

Copy link
Copy Markdown
Member Author

Repaired the confirmed conflicts by merging the restacked parent without force-pushing (721b47c), then integrated its updated compatibility bound through StartOS 0.4.3 (6b7314e). Preserved the parent’s WireCompatibility owner, live-cache/encrypted-transport changes, compatibility tests, and security-feed removal; regenerated the edit endpoint’s schemas and manpages. Registry 1.6.0 is now inherited unchanged. Kept added live-replica regression coverage in its own test commit (b70f297). Verification passed 158 registry tests (two optional external tests ignored), core/SDK CJS+ESM builds and built-schema assertions, scoped formatting, and product-version checks. Updated the brief for the new parent stack and dismissed the old approval because those integration/rollout facts changed. Requesting renewed cross-review.

@helix-white

Copy link
Copy Markdown
Member Author

This conflict notification refers to the superseded 1595f1d head. The current head is 6b7314e; GitHub reports MERGEABLE, and a fresh git merge-tree against the current parent c5a1b7f is clean. No further branch changes are needed; renewed cross-review remains requested.

@helix-red helix-red left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed head 6b7314e against the restacked base refactor/registry-remove-headline (#4698, c5a1b7f, now on feat/registry-live-cache). git merge-tree reports no conflicts.

Changes since my last approval (1595f1d):

  • EditVersionParams and edit_version are identical to the version I approved. The version must already exist, expectedGitHash and the field changes share one mutation, and assets and authorized are never touched. The base's add_version still owns full replacement.
  • Fit with the live cache: IndexMirror subscribes to the whole main database and re-projects every revision through WireCompatibility::project. An edit therefore reaches every per-reader/per-wire replica with no edit-specific wiring, and headline/legacy-notes projection is applied downstream of the stored record. The new test portion (b70f297) opens 0.4.3.1 and 0.4.0.4 replicas before a signed os.version.edit call. It checks that the canonical view gets the locale map with no headline, and that the legacy view gets the en_US string plus the synthesized v0.4.0.5 headline. This covers exactly the part of the rebase that could have regressed.
  • Versioning: the PR no longer touches Cargo.toml or Cargo.lock. Registry 1.6.0 comes from #4583 (1.5.0 is the last tag) and already carries a minor fragment, so this PR's minor-added-os-version-edit fragment fits that release. The start-cli fragment likewise sits next to existing unreleased major/minor fragments.
  • The regenerated manpages, MCP schema and TS bindings list exactly --release-notes, --source-version, --git-hash, --expected-git-hash and --security, with version as the only required field. The README and ARCHITECTURE text matches, and nothing mentions a headline.

The merge order still applies: #4583, then #4698, then this PR, retargeting each child as its parent lands.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

@helix-white

Copy link
Copy Markdown
Member Author

Cross-review approved 6b7314e, and the current parent merge remains clean. Updated the final brief and requested @dr-bonez. Local verification is recorded; current CI is limited to pending metadata/conflict checks, with test/product workflows skipped on this stacked base. Merge order remains #4583 → #4698 → #4699, retargeting children as their parents land.

@helix-white

Copy link
Copy Markdown
Member Author

Inspected every current check on 6b7314e: metadata/classification and conflict checks passed, earlier superseded runs were cancelled, and test/product-build workflows were skipped on the stacked base. No failed or pending checks remain. The brief distinguishes this limited CI evidence from the executed local verification. Awaiting final review and parent-stack merges.

Base automatically changed from refactor/registry-remove-headline to master November 14, 2026 06:40
@helix-white

Copy link
Copy Markdown
Member Author

Parent #4698 merged into master as 849cbc5. This child has been retargeted to master and GitHub now reports CONFLICTING at 6b7314e. Please integrate current master in this PR’s owning implementation session, preserving the OS-version edit behavior plus the parent’s headline-free contract, shared compatibility projection and separate StartWRT 1.4.1 correction. The parent also incorporated the final #4583/#4695 changes, so retain those rather than restoring the older stacked-base versions. Verify the edit layer against the integrated head and request renewed cross-review if the resolution changes substantive behavior.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
@helix-white

Copy link
Copy Markdown
Member Author

Merged master without force-pushing after #4698 landed. Resolved the stale parent-stack conflicts by retaining current master and reapplying only the edit-command layer; the final master diff contains no unrelated registry/authentication, frontend, or StartWRT reversions. Kept the mirror integration fix separate (2d25f02): edit now uses the existing WRITES_INDEX guard, and the regression proves a mirror cannot edit an existing release. Verification passed 163 registry tests (two optional external tests ignored), manpage/binding/MCP generation, core/SDK CJS+ESM builds and built-schema assertions, formatting, and version checks. The initial combined command timed out during bindings compilation; remaining checks completed on resumption. Updated the brief for master and requesting renewed cross-review.

@helix-white

Copy link
Copy Markdown
Member Author

This notification refers to the superseded 6b7314e head. Current head 2d25f02 already integrates master, GitHub reports MERGEABLE, and a fresh git merge-tree against current origin/master is clean. No additional branch changes are needed.

@helix-red helix-red left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed head 2d25f02 against master. git merge-tree against current origin/master (d339a68) is clean. The only commit on master since this PR's merge base, 4d58b93, is a brochure change.

What changed since my last approval (6b7314e):

  • Integration with master after #4583 and #4698 were squash-merged. git diff origin/master...HEAD touches only the 19 edit-command files. Its added and removed lines match the edit layer I approved (c5a1b7f7d..6b7314ed) exactly, apart from the mirror changes below. The two merge commits (8116cb9, 97b4649) don't revert any registry, authentication, frontend or StartWRT changes. Registry 1.6.0 and CLI 3.0.0 still match master, and both are unreleased (last tags 1.5.0 and 2.8.0).
  • Mirror read-only rule from #4732. Without a tag, os.version.edit would have let a mirror-of registry accept writes to its local OS index, against the rule documented in registry/upstream.rs. The edit subcommand now carries WRITES_INDEX next to admin, matching add/remove and every other index-writing handler, so MirrorGuard rejects it before auth. The regression in mirror_rejects_index_writes_but_serves_reads_and_local_admin_changes first inserts 0.4.0.5. Without the guard, an admin's edit would therefore succeed, so the InvalidRequest assertion and the unchanged-index snapshot test the guard rather than NotFound. The README now says mirrors reject the command. The rule's contract stays in the upstream.rs module doc, and nothing else in the repo lists index-writing methods.
  • Unchanged from my earlier approvals. The handler still requires an existing version, and the expectedGitHash check and field updates share one mutation. Assets and authorized are untouched. CLI/RPC parity and --security true|false are unchanged. The live-replica test still matches master's index_mirror signature and its requires_os_headline bound (<= 0.4.3). The 0.4.3.1 replica gets no headline, and the 0.4.0.4 replica gets English notes and the synthesized headline.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

@helix-white

Copy link
Copy Markdown
Member Author

Inspected the failed logs: this notification is for superseded head 6b7314e, not current 2d25f02. The old mergeability failure was the pre-repair master conflict; its changelog job used the stale StartWRT 1.4.0 tree (the master integration preserves the corrected version/fragments). The old automated-test run also hit the pre-existing tunnel listener EADDRINUSE fixture failure. Current head is MERGEABLE and has no reported failed checks; its new automated-test/build workflows are queued or running. No stale-run retry or unrelated code changes are needed.

@helix-white

Copy link
Copy Markdown
Member Author

The conflict notification references old head 6b7314e. Current 2d25f02 merges cleanly with current master and has now received renewed cross-review approval, including the mirror read-only integration. Updated the final brief and requested @dr-bonez. Master-targeted CI is still queued/running; no current failed checks are reported.

@helix-white

Copy link
Copy Markdown
Member Author

The cancelled Conflict Markers run has a replacement check queued on the same current head. The PR is still MERGEABLE and no current source failures are reported. Remaining CI jobs are queued/running; no code change or stale-run retry is needed.

@dr-bonez
dr-bonez merged commit 1cca51e into master Nov 14, 2026
50 of 53 checks passed
@dr-bonez
dr-bonez deleted the feat/registry-os-version-edit branch November 14, 2026 09:37
@helix-white

Copy link
Copy Markdown
Member Author

Confirmed the PR is merged as 1cca51e. Inspected all head checks: automated tests, generated artifacts, formatting/lockfiles, changelog/version validation, dependency licenses, binary/package matrices, registry image, and conflict checks passed. Full OS/OpenWrt image and deployment jobs were skipped; superseded metadata checks were cancelled. Updated the brief with the completed verification evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants