Repository navigation
Conversation
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Install-failure attribution now hinges on an undocumented electron-updater emit/reject identity pairing, policed only by a canary test until the tracked refactor removes it. Watch
[DESIGN-REVIEWED] 4748901 Description read[DESCRIPTION-READ] b7c0eb8e880d215753d3c97cd5fe5640c21801d53dcb9539ad1ffa9e59354993 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify the accepted fail-open consequence: a retraction the feed delivers after the 8s abandonment window still installs the withdrawn build — stated only in a code comment. Not justified as shipped
What this change shipsInventory (10 items) — 8 justifiedIntent: an update must always install the newest build the feed serves, never a superseded download — a FIX, with the defect reproduced in the description and pinned by tests that fail on base.
Capped at 10: the agent-request arming narrowing, the arm button's checking spinner, and the [FIRST-PRINCIPLES-REVIEWED] 4748901 Description read[DESCRIPTION-READ] 29feaa77b48a51bda8c6deb32f1581a2cba90156be2f7a4cde86ad5b3065a3e9 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The withdrawn-offer explanation lives inside the offer it refutes: the next ≤5s status frame unmounts both, so the refusal can vanish mid-read. Watch
[UX-REVIEWED] 4748901 Description read[DESCRIPTION-READ] 8413bf8fc88931c20877509a630cbac4d92b8669bb2cab7c0123b59f9d15d52c That sha256 names everything this verdict read: the PR description, plus the 15 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
537d995 to
fc9dab2
Compare
|
Answering every raised concern. Head is now GPT — F1
|
fc9dab2 to
92e6513
Compare
92e6513 to
dbadda5
Compare
|
CodeQL finding on The button lookup escaped only dots ( const escapeRe = (s) => String(s).replace(/[.*+?^${}()|[\]\\]/g, '\\$&')Not exploitable as written — |
dbadda5 to
c652171
Compare
|
Acted on the remaining advisories in The single-flight gap is now closed, not deferred. GPT flagged it and First Principles asked for a tracked follow-up; three lanes converging on the gap I self-disclosed was enough signal that "follow-up" was the wrong call.
Pinned by UX — the false notification is fixed. Correct catch: UX — took your copy verbatim for CodeQL — incomplete escaping fixed with a full metacharacter escape. Green locally: 292 Python tests across the affected update suites, 1890/1891 electron (1 skipped), 41/41 freshness, 12/12 AboutPanel, and i18n 19/19 checks PASS. Not addressed — your evidence gaps, and I want to be straight about why. The armed-panel-with-matching-versions capture and the two OS notifications are all genuinely missing. Capturing them needs a live pod plus a way to photograph native notifications, which I could not stand up here. That is a real hole in the evidence, not a resolved item — flagging it rather than quietly closing it. |
c652171 to
4e8982b
Compare
|
Frontend Tests failure fixed in
Added real translations for de, es, fr, it, pt, ru, ja, ko, zh-CN, hi, bn — inserted next to Worth flagging that this was latent from the moment the string was introduced — earlier rounds reported 0 failing only because Frontend Tests had not finished yet, so my "green" claims in this thread were premature on that check. A translator should still review the 11 strings; they are my translations, not a native speaker's. |
|
|
|
|
|
Retrospective (round 3; span b62fe08b529e recurred ×3). The recurring span is path-scoped to
The closing invariant: every gate entry point (download, manual install, quit install) waits through |
|
|
|
|
|
|
…load The desktop updater committed to an install on `updateReady` alone. Supersede detection lived only in the `update-available` handler, reachable only when a check ran -- every 4 hours. A download that waited (auto-download stages eagerly, then the install waits for a click or the next natural quit) installed whatever had been staged back then: the app relaunched on an already-superseded build, the next check found the newer one, and the ~350MB transfer ran again. The feed lane (website/electron/runtime/update/feed-lane.js) now re-consults the feed as the last step of every path that spends bytes or commits an install: the consent download, the manual install and the deferred install on quit. The gate drives an ordinary check, or waits for the one already in flight (abandoning it if the wait runs out), bounded at 8s and failing OPEN; a verdict about a lane the user switched away from mid-check authorizes nothing. A feed that cannot answer never makes downloaded bytes uninstallable, and a hanging feed cannot hold a quitting app open. Only a positive "the stage is gone" stops an install; a superseded stage is refused and the newest build pursued, and the quit path refuses quietly with a notification. A gate that issues a check is a second writer of updater state, so its collisions with the first are closed explicitly: an abandoned check's late failure is recognised by the rejection object rather than by flag timing; a check straddling an install dispatch has its own failure reported as the check's; a Cmd+Q while an install path owns the stage is held and replayed; a gate (an install, or a Retry of the download) that joins a check an earlier click abandoned lifts the abandonment so its answer still counts; a re-check after a channel switch waits until electron-updater has released its in-flight request, and a second click that wakes behind it stands down; and the gates' own re-checks keep their `checking`, their failure and a restated offer off the renderer, which would unmount the card the user just clicked or the installing overlay. A Download click is answered at once with `downloading`. A failed install recovers in place on the manual path and finishes the quit on the deferred one. The renderer resets its one-way install latch when the main process refuses or aborts the handoff (shared by UpdateModal and the About card through useInstallDispatch), so the newer build's Install button is not left disabled, and the modal reports a rejected install request under a failure header. An agent request's install click stays armed only while it waits for a download, and is released when that download is dropped (a retraction or a channel switch), so it cannot re-fire on a later build. A click made while the state is already `checking` or `not-available` is not a dropped download: only those states after the click's own `downloading` release it. On the dashboard, `api_update_arm` re-checks before arming and returns `version_display`. The re-check fails open by restoring the pre-check snapshot only while `_check_generation` still matches, so a channel switch cannot resurrect the previous lane's verdict. A positive "no longer offered" answers `arm_no_longer_offered`, and an upgrade click the re-check turns into a channel-move downgrade is refused with `arm_offer_withdrawn` rather than armed; the panel localizes both, and only the "no longer offered" notice is retired by a newer offer. Co-authored-by: Bolin Chen <bolichen@amazon.com>
|
|
|
|
|
|
|
|
Pushed 4748901 (still one commit; Chen Tong is the author, Co-authored-by Bolin Chen; rebased onto main 57d71bb). This push covers the review on a3a07b4 plus two rounds of internal review:
Each behavioural fix has a test that fails without it. Local: static gates, docs-lint, eslint, tsc, i18n gates, Electron update tests 290/290, targeted backend update tests 672 passed, and the frontend AboutPanel/Update/hooks/i18n/settings subset 1889 passed. The full suite is left to CI. I posted a disposition for each finding on a3a07b4. |
|
PR triage (automated, 2026-10-05) — REBASE needed Checked head Triage result: DISTINCT. No other open PR touches Recommendation: rebase onto current main and resolve |
|
Superseded by #21979, the same single commit rebased onto current main ( |
Problem / Motivation
Goal: an update always installs the newest build the feed serves, never a download the feed has already moved past.
The desktop app downloads an update, then waits for a click on "Install Update & Restart App" or for the next natural quit after "Later". Nothing in that window re-consulted the feed, so when a newer release shipped the app installed the superseded stage anyway:
1.1.0;1.2.0publishes while the ready card sits unclicked;1.1.0and the app relaunches on an already-stale build;1.2.0and the ~350MB transfer runs again.The consent path (auto-download off) had the same waste: a click on a stale "found" card fetched the version printed on the card. On the dashboard's in-app update,
api_update_armarmed a cached verdict up to 12 hours old, which the apply then refuses once the feed has moved.Why it matters
Every affected user pays the transfer twice and restarts twice, and the second restart looks unprompted: the app they just updated immediately announces another update. On metered or slow links ~350MB of avoidable traffic is the whole cost. The in-app arm path is worse: it hands the user an approval command that cannot succeed.
Not a goal
auto_update, update pauses).What changed (motivation → approach → change)
Root cause. Supersede detection lived only in the
update-availablehandler, which runs only when a check runs (every 4 hours). The install paths committed onupdateReadyalone.Approach. Put the freshness question at the last step of every path that spends bytes or commits an install, and answer it with an ordinary check, so the direction gate, retraction path and supersede path decide, not a second copy of the rule.
Change.
website/electron/runtime/update/feed-lane.js(the feed lane split out ofauto-update.json main): a freshness gate runs before the consent download, the manual install and the deferred install on quit. It issues a check or waits for the one already in flight, bounded at 8s and failing open (a check it stops waiting for is abandoned, so its late outcome cannot touch the dispatch); only a positive "the stage is gone" refuses an install. A Download click is answered at once withdownloading. The quit path signalsinstallingfirst, holds a second Cmd+Q while it waits, and refuses quietly with a notification.finally; a gate that joins an abandoned check lifts the abandonment so its answer counts; a channel switch re-checks the new lane once the old request has settled, and a gate that wakes behind a newer check stands down; the gates' ownchecking, failure and restated offer stay off the renderer.website/src/hooks/useInstallDispatch.ts(shared bywebsite/src/components/UpdateModal.tsxand the About card inwebsite/src/pages/settings/AboutPanel.tsx) resets the one-way install latch when the handoff is refused or aborted; the modal reports a rejected install request throughErrorNoticeunder an "Update failed to install" header. The About card's agent-request click is armed only while its download runs, and is released when the gate drops that download.api_update_arm(src/kiro_crew/dashboard/handlers/updates.py) re-checks before arming and returnsversion_display(typed inwebsite/src/api/client/updates.ts). It restores the pre-check snapshot on a failed check only while_check_generationmatches. A positive "no longer offered" answersarm_no_longer_offered, and an upgrade click the re-check turns into a channel-move downgrade answersarm_offer_withdrawn(no "already up to date" claim, since the next frame offers that move).arm_no_longer_offered,arm_offer_withdrawn), in all 12 catalogs underwebsite/src/i18n/locales/.Backwards compatibility
Compatible:
api_update_armkeeps every field and code it returned and addsversion_displayand thearm_no_longer_offeredrefusal; the renderer tolerates a gateway without the field. The updater's IPC surface is unchanged.Tests
website/electron/test/auto-update-freshness.test.js(new): superseded, latest, retracted and versionless stages on both install paths; fail-open on unreachable, silent and hanging feeds; waiting for an in-flight check; the abandoned-check and straddling-check attribution; the held and replayed quit; no nudge or download while quitting; the Download gate's channel switch, joined-check lift and stand-down, againstfeedLikeElectronUpdater(), a harness that models electron-updater's in-flight dedupe.website/electron/test/auto-update.test.js: existing straddle tests drive the 8s bound with mocked timers.website/electron/test/electron-updater-error-identity.test.js(new): asserts against the installedelectron-updatersource thaterrorand the rejection carry the same object; fails under CI when the library is missing, and is visibly skipped elsewhere.test/test_update_stepup.py: re-check pins the newest version, fail-open restore, the generation guard, the downgrade refusal, and both refusal codes.website/src/test/AboutPanel.inAppApply.test.tsx: armed copy, the click-time offered version, an older armed build, both localized refusals, and which notice a new offer retires.AboutPanel.agentUpdateRequest.test.tsx: the agent-request click installs once, and is released by a dropped download but not by the state it was clicked from.AboutPanel.installFailureReplay.test.tsxandUpdateModal.cov80.test.tsx: the latch re-arms after a refused install, and a rejected install request is reported.Each fix added in the last two rounds was mutation-checked: reverting it fails its test.
Manual verification
The armed panel was captured against the built SPA with the gateway stubbed by
website/scripts/capture-update-freshness-armed.mjs. Its copy is unchanged by the latest round; the refusal now renders from the catalog with the same English text. The native quit-time notifications are drawn by the operating system's notification centre during quit, after the window is gone, so neither the browser harness nor a running window can show them; a mock-up would be evidence of a surface nobody could verify. Their copy is listed verbatim below.Screenshots / video
The offer, from a verdict up to 12h old:
Armed after the pre-arm re-check found a newer version; the note replaces the plain line and explains the change:
Armed on the version the button offered; no note, one declarative line:
The arm button while the re-check runs:
The refusal when the offer is gone (now rendered from the catalog):
The refusal when the clicked upgrade became a channel-move downgrade; it names the withdrawal and the offer that replaces it, and stays up when that offer arrives:
Channel move, armed as offered (
armed_switches_to_version):Channel move whose target moved between the offer and the arm (
armed_version_changed_channel_move):The desktop "update ready" modal when the install request itself is rejected (the main process threw before pushing any state). The header and the notice both say it failed, and the primary action says it retries:
Dark mode
Related Issues
No linked issue: reported directly by a user in a chat session. Follow-up refactors: #10282, #10333.
Pattern harvest
Rule candidate: review-prompt
Pattern: a bounded wait (
Promise.raceagainst a timeout) that clears flags owned by the request in its timeout branch. The wait ended; the request did not, so its late outcome lands in a window the code believes is impossible. Release request-owned state from the request's own continuation.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)