Repository navigation
fix(start-wrt): accept Ed25519ph-labelled registry signatures in update check - #4425
Dominion5254 wants to merge 1 commit into
Conversation
…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
left a comment
There was a problem hiding this comment.
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:: --lockedthroughhelix-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
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.
|
Superseded by #4445, which carries everything here: StartWRT on start-core's signature code, |

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-oidcaps arcs at 32 bits), one bad signature failed the wholeos.version.getresponse, andsystem.newer-versionsswallowed the error and returned[], so the UI said the router was up to date.sign/andregistry/signer.rsare deleted, and the registry client usesstart_core::signandstart_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 localBlake3CommitmentontoRegistryAsset, since start-core's commitment type is foreign.newer-versionsreturns 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:wrtandnpm run check:i18n:wrtpass.node scripts/changelog.mjs check-version projects/start-wrtpasses.