Repository navigation
feat(start-cli): server registries namespace; trusted-keys on the CLI; remove update-signers - #4674
Conversation
v0_4_0_alpha_1 read ui.marketplace.knownHosts, but 0.3.5 stored the list as known-hosts, so every 0.3.5 upgrade reached 0.4 with ui.registries empty. 0.4.0-0.4.1.1 hid this by prepending the built-in registries and saving them on first fetch; 0.4.1.2 dropped both, leaving servers that skipped those versions with an empty Marketplace. The built-in registries are now an invariant rather than UI convention: - trusted_keys.remove-registry refuses either one (the UI only hid the button, and the backend refused only the OS-update registry) - db.put.ui refuses the root pointer and anything under /registries - the 0.4.2.1 migration restores whichever is missing, and bumps migration_revision so alpha servers already on 0.4.2.1 pick it up Fixes #4672 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release-migration test still expected 0.4.2.1 at revision 0, and its fixture had no UI object, so the registry repair was skipped. Add a ui fixture, expect revision 1, and cover an existing 0.4.2.1 install at revision 0 being repaired once on startup. The migration now reads public.ui without IndexMut, which would insert a null ui into a db that has none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Start9 and Community registries stay out of the web interface's Remove action, but remove_public no longer refuses them; it still refuses whichever registry provides StartOS updates. A CLI command for it follows in the registries namespace change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Connected registries are their own resource, not a corner of trusted keys: connect-registry, remove-registry and set-os-registry move from server.trusted-keys to server.registries as add, remove and set-os, with a new list, all on the CLI. The handlers stay beside the key-trust logic they share; registries.rs wires the namespace. remove accepts the Start9 and Community registries, so the CLI can disconnect them; the web interface still offers no Remove for them. server.trusted-keys comes onto the CLI with list (new), add, update and remove; remove-many stays UI-only. server.update-signers and the legacy helpers only it used are removed: trusted-keys already keeps the on-disk OS signer files in sync. start-cli goes to 3.0.0 for the removed commands. Approved by the maintainer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
helix-white
left a comment
There was a problem hiding this comment.
Requesting changes on cc99a6d.
-
[P1] Commit the generated RPC bindings, MCP catalog, and man pages. The UI now calls
this.api.rpc.server.registries, butshared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.schemas.tsstill defines the oldtrusted-keys.connect-registrytree and noregistriesnamespace. The typed UI cannot compile against this snapshot.shared-libs/crates/start-core/mcp-tools.jsonis embedded in the server and still advertises the removed registry/update-signer methods, so MCP clients receive tools that fail with method-not-found. The description acknowledges this, but it remains a correctness blocker, not just CI bookkeeping. Regenerate and commit the bindings, MCP catalog, and man pages using their existing make targets after the source fixes. -
[P1] Stop the variadic key argument from swallowing named options (
AddTrustedKeyParams::public_keys,trusted_keys.rs). Withallow_hyphen_values = true, once clap starts this variadic positional it treats subsequent--nameand--trust-fortokens as more keys. The documentedadd "$(cat signer.pem)" --name ... --trust-for osconsequently fails key parsing; the newcli_parses_trusted_key_commandstest also cannot obtain its expectedtrust_for. This follows directly from the pinned clap parser's prior-positional precedence. The proposal removes that setting, documents options-before---/ armored-keys-after---, fixes the example, and covers both trailing options on a Der64 key and a PEM/GPG import through the delimiter. -
[P2] Describe
--trust-for osas additive, not exclusive (about.add-trusted-key, all locales). The new help says package trust applies “unless --trust-for says otherwise,” butimport_individual_keysalways gives newly imported keys package trust and additionally grants OS trust. An operator must not be told an OS-only import is happening when that key also authorizes packages. The proposal corrects the help/reference and asserts the existing additive semantics without changing policy.
Proposed source changes: cc99a6d...proposal/4674
The proposal is source-only: I did not run generators, builds, tests, typechecks, or lint as reviewer; the implementing author must verify adopted changes and regenerate artifacts. The PR merges cleanly with its actual base, fix/seed-default-registries, and with current master. The only current reported check is successful Conflict Markers; there is no executable verification result on this PR yet.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
allow_hyphen_values on the variadic key argument let it swallow --name and --trust-for, so the documented invocation failed. Options now go before -- and armored keys after it, as the docs and help say. The help for add also stops implying --trust-for os replaces package trust: new keys are always trusted for packages, and --trust-for os adds StartOS update trust. Adopted from proposal/4674, with the test's InternedString conversion made unambiguous so it compiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
helix-white
left a comment
There was a problem hiding this comment.
Reviewed the update through 89f0549. Findings 2 and 3 are addressed: the variadic argument no longer swallows options, the delimiter usage is documented and covered, and all five locales describe package trust accurately.
[P1] Finding 1 remains: commit the generated artifacts before approval. shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.schemas.ts:6850 still has the old trusted-keys registry methods and no server.registries, so the changed typed UI calls cannot compile. The embedded shared-libs/crates/start-core/mcp-tools.json:11709 still advertises the removed registry methods, and its update-signers tools also remain. The man pages are unchanged as well. Please regenerate and commit these with the existing make start-core-ts-bindings, make start-core-mcp-tools, and make manpages targets, then verify the affected callers.
The source fixes from proposal/4674 are incorporated; no further handwritten source changes are proposed. Generation belongs to the implementing author, so I have not run generators, builds, tests, typechecks, or lint. Merge-tree checks are clean against the actual stacked base and current master. Only Conflict Markers has a reported CI result (passing).
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
Retargeted to Until #4673 merges, this PR's diff also shows #4673's three commits. Review only the commits from |
|
Understood. CI-generated artifacts are fine; the remaining request is to commit the generated output, not to generate it locally. The parsing and trust-help findings are resolved. I’ll keep the review scoped to cc99a6d onward and assess the rebased diff and committed artifacts when review is re-requested. |
Dismissed by Helix: the changes require a substantive PR brief update. The trusted-keys add parser changes caller-visible behavior: trailing named options are parsed instead of swallowed as keys, and armored PEM/GPG positional keys now require the -- delimiter. The substantive brief must update its invocation contract and describe the parsing correction; these are not merely wording or test changes.
…ies-namespace Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
|
Took over implementation to close the last review blocker (finding 1).
Verification on this head:
Correction to the description (left unedited): it says the PR is stacked on #4673 and lists generated artifacts as pending. Both are out of date. #4673 has merged, and this PR now targets |
helix-white
left a comment
There was a problem hiding this comment.
Approved at e43653a. All three earlier findings are addressed. The generated bindings and embedded MCP catalog match the production handlers, obsolete signer man pages are removed, and the registry test stubs use the new namespace. The merge from master contains no manual conflict-resolution delta, and the current head merges cleanly.
Brief
This introduces server registries list/add/remove/set-os and exposes server trusted-keys list/add/update/remove on the CLI. Registry operations reuse the existing connection handlers; trusted-key mutations retain the existing database and on-disk diagnostic-signer synchronization. No persisted schema migration or additional runtime state is introduced.
This is a breaking API/CLI change: the three registry RPC methods move out of server.trusted-keys, and server.update-signers disappears. External RPC/MCP callers and existing CLI signer automation must migrate alongside the server upgrade. start-cli becomes 3.0.0. Registry listing returns a URL-to-nullable-name map; trusted-key listing returns the existing key records indexed by their Der64 IDs. Obsolete signer request DTOs disappear, while signer types used by storage and migrations remain.
The CLI can disconnect either built-in registry after choosing another OS-update source; the web interface still hides their Remove action. That removal policy comes from already-merged #4673. Protected registry keys and the last trusted OS-update key retain their existing guards. Importing a new key grants package trust; --trust-for os additionally grants OS-update trust. The accepted review proposal fixes option swallowing and documents options before --, followed by quoted PEM/GPG keys. update requires the name and both trust selections together.
The embedded UI, mock backend, and focused test stubs use the renamed endpoints. There is no rendered UI change. Generated TS/MCP output and man pages are committed, including deletion of stale update-signers pages and correction of the StartTunnel man-page version header.
Implementation diff: +680 / −579 lines in 17 files (excludes lockfiles, tests, docs, release notes, and changelog). Generated schemas/catalog and localized help are included.
Recorded verification: the implementing author reports passing UI typechecking and 160 UI script tests, RPC-client/documentation and setup checks, and 50 focused Rust tests covering trusted keys, registries, and MCP catalog consistency. A second generation pass reportedly produced no changes. This is local compiled/unit evidence, not a live-server end-to-end CLI exercise. I ran no builds or tests as reviewer. Current-head CI is pending, including the Automated Tests/Generated Artifacts pipeline and product builds; this approval does not claim those checks passed.
The description still says this is stacked on #4673 and generated artifacts are pending. Those statements are stale: #4673 is merged, the base is master, and artifacts are committed. The author's description and attribution are preserved.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Dismissed by Helix: the changes require a substantive PR brief update. Committed production bindings now expose server.registries, and the embedded MCP catalog removes obsolete registry/update-signers tools and advertises the replacement endpoints. The brief must describe this completed client/MCP integration instead of stating that artifacts are pending and the typed UI cannot compile. This materially resolves the reviewed implementation's remaining blocker, rather than changing only CI bookkeeping.
…serverInfo, not ui The ui section is UI-owned state the backend never reads or writes outside migrations. The 0.4.2.1 migration (revision 2) moves ui.registries and ui.startosRegistry into serverInfo.registries and serverInfo.osRegistry, and the backend now supplies the initial (stable or beta) registries, so the separate beta UI seed is gone. Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
|
Per @dr-bonez:
Verification:
|
Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
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 at 6b52a25 for one missed caller of the relocated state.
[P2] Move the RPC-client fixtures to the new ServerInfo shape (shared-libs/ts-modules/scripts/test-rpc-clients.cjs:423). The “StartOS trust mock rejects whole batches…” test still places registries and startosRegistry under ui and omits serverInfo.registries. Its client.rpc.db.subscribe({}) calls the production mock's protectTrust(), whose nonempty registry-key snapshot reaches Object.keys(mockPatchData.serverInfo.registries) and throws before the atomic-trust assertions. Thus check:rpc-clients, which is part of the normal frontend checks, is broken by this state move even though check:ui passes. The DNS mock fixture later in the same file also retains the old layout.
The proposal moves both fixtures to serverInfo.registries / serverInfo.osRegistry, retaining UI-only state under ui. It does not add fallbacks to production or change the ownership contract. Please verify the adopted fixture changes with the RPC-client checks.
Proposed changes: 6b52a25...proposal/4674
I otherwise traced the revision-2 migration and rollback, initial stable/beta values, key protection, security-feed subscription, and UI consumers to the typed fields. The caller-facing namespace fixes remain intact. The new head merges cleanly with master. I ran no builds, tests, generators, typechecks, or lint as reviewer; the finding follows from the fixture and production call path. Current CI is still running.
The eventual brief also needs to cover this newly added persisted-state migration and ownership contract; the original description still only describes the namespace change and incorrectly lists generated artifacts as pending.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Dismissed by Helix: the changes require a substantive PR brief update. Registry settings move from public.ui into typed serverInfo.registries and serverInfo.osRegistry, with a revision-2 upgrade migration and rollback conversion. Backend consumers, UI subscriptions, and initialization now use those fields. This contradicts the approval brief's explicit statement that no persisted schema migration is introduced; the brief must explain the new storage contract, ownership boundary, and upgrade/rollback behavior.
Helix-Harness: claude-code Helix-Model: claude-opus-5-5 Helix-Identity: helix-b
|
Addressed the [P2] finding.
Verification on this head: On the brief: noted. The persisted-state move and the |
helix-white
left a comment
There was a problem hiding this comment.
Approved at 06b3d62. The relocated RPC-client fixtures address the remaining finding, and the ConfigService stub follows the harness's existing dependency-boundary pattern without changing production behavior. Merge-tree is clean against current master. CI remains pending; approval is based on code review, not a claim that all checks passed.
Updated brief
This adds server registries list/add/remove/set-os, exposes server trusted-keys list/add/update/remove on the CLI, and removes server.update-signers. The three registry RPC methods move out of server.trusted-keys. External RPC/MCP callers and signer automation must migrate alongside the server upgrade; start-cli becomes 3.0.0. The embedded UI, mocks, generated bindings, MCP catalog, and man pages use the replacement endpoints. Obsolete signer request DTOs and man pages are removed; signer types needed by storage and migrations remain.
Persisted-state contract: connected registries move from public.ui.registries to typed public.serverInfo.registries (URL → nullable display name). The OS-update source moves from public.ui.startosRegistry to public.serverInfo.osRegistry (Url, serialized as a string). Registry operations, key protection, security-feed subscriptions, and UI consumers use those fields. public.ui is reserved for UI-owned contents that the backend does not interpret or modify outside migrations. The special db.put.ui registry guard is removed because UI writes no longer change authoritative registry settings.
The 0.4.2.1 migration advances to revision 2, moves saved registry settings, preserves custom URLs/names, and restores missing built-in registries. It reruns on alpha servers that already applied revision 1; consequently, disconnected built-ins reappear during this repair. Subsequent explicit removals remain supported. Rollback to 0.4.2 moves the settings back into ui. Fresh-server initialization now owns stable/beta registry defaults in backend helpers rather than separate UI seeds; diagnostic updates reuse the same stable/beta OS-registry default.
Registry workflows reuse their existing connection handlers and trusted-key mutations retain the existing diagnostic-signer-file synchronization. The selected OS registry cannot be removed, keys offered by connected registries remain protected, and the final trusted OS-update key retains its guard. The web interface still hides removal for built-in registries, while the CLI can disconnect them after switching the OS source where necessary. New imports grant package trust; --trust-for os adds OS-update trust. The accepted review proposal fixes option swallowing and documents options before --, followed by quoted PEM/GPG keys. Key updates require the name and both trust selections together.
Additional cleanup updates both RPC-client fixtures and supplies the test harness's missing ConfigService dependency. Existing screens retain their presentation; the frontend changes are RPC/state plumbing.
Implementation diff: +896 / −757 lines in 33 files (excludes lockfiles, tests, docs, release notes, and changelog). Generated schemas/catalog, localized help, and production seed changes are included.
Recorded verification: the implementing author reports 29/29 RPC-client tests and 163/163 UI script tests passing, with UI typechecking and touched-file Prettier clean. The recorded Rust run passed 1331 tests, including migrations and registry connections, but failed 31 tests in an image missing filesystem/Node/SquashFS tools; it is not a passing full-suite result. Bindings/catalog/man pages were regenerated. There is no live-server end-to-end CLI or upgrade/rollback evidence. I ran no builds or tests as reviewer. Current-head Prettier and Conflict Markers pass; Automated Tests, Generated Artifacts, formatting/lockfile checks, and product builds remain pending.
The original description remains stale about stacking, pending generated artifacts, and the scope of the persisted-state change. This brief describes the reviewed head; the author's description and attribution are preserved.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
@dr-bonez: cross-review is approved at What changed since your last look (the
One consequence to be aware of: alpha servers that already ran revision 1 re-run the migration, so a built-in registry someone disconnected on alpha comes back once. Only the CLI on this branch can disconnect built-ins, so in practice this affects nobody. One question for you: the backup job still copies the whole CI on this head is still running. |
…cbor-web (#4697) #4674 committed a lockfile whose shared-libs/ts-modules/start-core/dist entry lists cbor-web, which start-core's package.json does not declare. Builds regenerate start-core's dist/package.json and then run the root package-lock.json recipe (`npm --prefix . i`), which drops the line. The tree is then dirty when check-git-hash.sh stamps the build, so every start-wrt CI build since #4674 identifies itself as `<hash>-modified`, including the 1.4.0 re-cut from 35a38d8. Regenerated with `make package-lock.json` (Node 24.17.0, npm 11.13.0, the versions CI uses). The result is byte-identical to the lockfile before #4674.
Approved by the maintainer. Connected registries become their own resource and get their own state, trusted keys come onto the CLI, and
server update-signersis removed.server registries(RPC and CLI):list,add <URL> [--name],remove <URL>andset-os <URL>, replacingserver.trusted-keys.{connect,remove,set-os}-registry.removeaccepts the Start9 and Community registries, so the CLI can disconnect them; the web interface still offers no Remove for them. The registry that provides StartOS updates is refused until another is chosen. The handlers stay beside the key-trust logic they share;registries.rswires the namespace.server trusted-keyson the CLI:list,add [--name] [--trust-for marketplace|os] -- <KEYS>...,update <ID> --name --marketplace <bool> --os <bool>andremove <ID>. Options go before--and quoted PEM/GPG keys after it. New imports are trusted for packages, and--trust-for osadds StartOS-update trust.remove-manystays UI-only.server update-signersis removed, with the legacy helpers only it used.trusted-keysalready keeps the on-disk OS signer files in sync. The signer types storage and migrations need stay.Persisted state:
public.ui.registriesto typedpublic.serverInfo.registries(URL → nullable name). The StartOS update source moves frompublic.ui.startosRegistrytopublic.serverInfo.osRegistry. Registry operations, key protection, security-feed subscriptions and the UI read the new fields, andpublic.uiholds only UI-owned state.db.put.uiregistry guard is gone, since UI writes can no longer change registry settings.Also in this change:
cli-reference.mddocuments both command groups, andtrusted-keys.mdandmarketplace.mdare updated.Migration for external callers: RPC/MCP callers and signer automation must move to
server.registriesandserver.trusted-keyswhen their server upgrades.Verification:
cargo check -p start-core --tests --features=testandcargo check -p start-clipassed before the state move.🤖 Generated with Claude Code