Skip to content

fix(start-wrt): accept Ed25519ph-labelled registry signatures in update check - #4425

Closed
Dominion5254 wants to merge 1 commit into
masterfrom
wrt/update-check-ed25519ph
Closed

Dominion5254 wants to merge 1 commit into
masterfrom
wrt/update-check-ed25519ph

Conversation

@Dominion5254

Copy link
Copy Markdown
Member

Closes #4390, except its capability item: declaring that the router reads the Ed25519ph label waits on #4389.

start-registry 1.2.0 sends registry signatures under the Ed25519ph identifier unless it recognises the client as old. StartWRT's own copy of the sign module could not parse that OID (const-oid caps arcs at 32 bits), one bad signature failed the whole os.version.get response, and system.newer-versions swallowed the error and returned [], so the UI said the router was up to date.

  • Signature handling: StartWRT's diverged sign/ and registry/signer.rs are deleted, and the registry client uses start_core::sign and start_core::registry::signer::AcceptSigners. Those accept the Ed25519ph label, an id-Ed25519 label on an Ed25519ph signature (sign::compat::verify_commitment), and pure Ed25519. The BLAKE3 download and verify code moves from the old local Blake3Commitment onto RegistryAsset, since start-core's commitment type is foreign.
  • Error reporting: newer-versions returns its error instead of an empty list. The UI splits the update check from the system-info refresh, and System > Settings > General shows Failed to check for updates when the check fails. The new string is in all five dictionaries.
  • API_CONTRACT.md, backend/ARCHITECTURE.md, a patch fragment, and the 1.3.1 bump.

Verification

  • cargo test -p startwrt-core --lib registry::: 4 new tests pass. They cover the Ed25519ph label, a relabelled id-Ed25519 signature, pure Ed25519, the wrong context, and a signature over another commitment. The first two cases can't parse on the old code.
  • npm run check:wrt and npm run check:i18n:wrt pass. node scripts/changelog.mjs check-version projects/start-wrt passes.
  • K1 bench, through a proxy that relabels the registry's signatures as Ed25519ph: the update is listed, and the live UI shows "v1.3.9 released!". A tampered signature is rejected before download. With the registry down, the CLI errors and the UI shows the warning.

…te check

Start-registry 1.2.0 sends signatures under the Ed25519ph OID unless the
client identifies as StartWRT, and StartWRT's own copy of the sign module
could not parse that OID (too large for const-oid), so newer-versions
silently returned [] and the update check said the router was current.

Drop StartWRT's diverged sign/ and registry/signer.rs copies and use
start-core's, which accept both labels and pure Ed25519. newer-versions now
returns its error instead of an empty list, and Settings shows "Failed to
check for updates" when the check fails.

Closes #4390

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved at 4636acbb5393537cace2e1c0a86ceb0c28b9a728; no blocking correctness findings. git merge-tree --write-tree origin/master HEAD succeeds, and GitHub reports MERGEABLE.

The router now accepts Ed25519ph-labelled registry signatures, legacy id-Ed25519-labelled Ed25519ph signatures, and pure Ed25519 signatures through the shared start-core verifier. Removing the diverged local signing implementation prevents the parser and compatibility rules drifting again. The relocated firmware download and file checks preserve size/hash verification and flush/sync behavior.

Registry query failures now reach callers instead of becoming an empty update list. The UI keeps system-info refresh independent, derives update availability from the returned versions, and displays a translated warning on failure. Capability advertisement remains outside this PR under #4389.

Implementation diff: +119 / −556 lines in 18 files (excludes lockfiles, tests, docs, release notes, and changelog).

Verification:

  • Ran cargo test -p startwrt-core --lib registry:: --locked through helix-build: all four tests passed, covering both signature labels, pure Ed25519, wrong context, and changed commitment rejection.
  • Ran the reviewed UI in Chromium with its mock backend and injected update-query results. Confirmed that failure displays the warning while system info loads, empty success clears it, and subsequent success restores update availability. Screenshot follows in a separate comment. No router or firmware deployment was performed during this review.
  • Reused the author's recorded TypeScript/i18n checks and live-bench evidence. Current CI has passed Prettier, formatting/lockfiles, changelog/version, conflict-marker, and license checks. Binary builds, automated tests, and generated-artifact checks are still pending; approval does not imply those have passed.

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

@helix-white

Copy link
Copy Markdown
Member

General settings warning after a simulated registry failure, using the reviewed UI and mock backend.

Dominion5254 pushed a commit that referenced this pull request Oct 28, 2026
start-core's registry::client::call now owns the unsigned registry call:
the rpc/v0 path, the X-Start9-Registry-Client header, and the device-info
header. StartOS's server and diagnostic update path and StartWRT's update
check all use it, so StartWRT's hand-written JSON-RPC client is gone and
its registry module is reduced to the device info it reports.

Folds in #4425's StartWRT work: its signature regression tests (now
against start-core's types), its update-check UI and string, and its
changelog fragment.
@Dominion5254

Copy link
Copy Markdown
Member Author

Superseded by #4445, which carries everything here: StartWRT on start-core's signature code, newer-versions returning its error, the Failed to check for updates warning and string, the changelog fragment, and the four signature tests. #4445 also moves the rest of StartWRT's registry client onto start-core and benches the Ed25519ph label on the K1.

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

Projects

None yet

2 participants