Repository navigation
fix(updates): never send an installer from an unknown Packages state - #408
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Packages section's Update button no longer sends any installer while the device's update capability is unknown, still loading, failed to read, or belongs to a previous connection. In that state the button (and its confirmation) is disabled, and a direct call sends nothing. Once the capability is confirmed for the current connection:
system.startUpdate(unchanged);available/awaiting-idle): the trackedsystem.installUpdatesNow {scope:"packages"}(unchanged), and a scoped refusal never retries through the legacy route (unchanged);system.startUpdateexactly as before (documented residual, see Risks).No backend, wire schema, locale key or user-visible string changes. Engineering docs (
README.md,docs/DEVICE-UPDATES.md,docs/agents/the-device-update-system.md, the backend orchestrator doc paragraph) describe the final routing.Why
Hardware runs on an Orange Pi (capable image) showed the Packages Update intermittently dispatching the legacy
system.startUpdateinstead of the tracked route even though the orchestrator phase was alreadyavailable: the old predicate fell back to the legacy installer whenever the capability declaration was not yet known (in flight, rejected, timed out, or stale). The device journal showed the legacy route's own refusal at the failing times, and once the legacy route performed the install and left the orchestrator phase stale. The legacy route skips orchestrator admission, the cellular gate and phase bookkeeping, so an unknown state must never be allowed to pick it.How to verify
149751cefor the right reason (unknown/failed/stale/closed/previous-link/in-flight/phase-not-received states dispatched an installer) and pass on this branch; the rendered Updates dialog covers legacy device, capable + available, capable + idle with the legacy Check then Update flow (installs once, no "nothing to install" refusal), double click, scoped refusals, retry after a failed read.bun run lint(Biome + svelte-check) and the full frontend suite (435 files / 7275 tests) pass.availablemust go scoped, phaseidlemust gostartUpdate.Risks
main(no orchestrator admission, cellular gating or quarantine ownership). Making the Packages Check go throughsystem.checkUpdatesNowso the tracked route coversidleis a deliberate follow-up, not part of this change.