GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [Bug]: Failed update-track save hides available updates on the unchanged track · Issue #34876 · pingdotgg/t3code Closed Closed Copy link DescriptionBefore submitting
Areaapps/desktop Steps to reproduce
import { assert, describe, it } from "@effect/vitest"; import { vi } from "vite-plus/test"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as TestClock from "effect/testing/TestClock"; vi.mock("electron-updater", () => ({ autoUpdater: {}, AppImageUpdater: class {} })); vi.mock("electron", () => ({ app: {}, BrowserWindow: class {}, screen: {} })); import * as Settings from "../settings/DesktopAppSettings.ts"; import * as Updates from "./DesktopUpdates.ts"; import { setUpdateChannel } from "../ipc/methods/updates.ts"; import { flushCallbacks, makeHarness } from "./updatesTestHarness.ts"; const failure = new Settings.DesktopSettingsWriteError({ operation: "replace-settings-file", path: "desktop-settings.json", cause: new Error("simulated settings rename failure"), }); const checkedNightly = { channel: "nightly", minimumVersion: "1.2.5-nightly.20261028.1" }; describe("failed track persistence through IPC", () => { it.effect("control: a stable feed check offers 1.2.4", () => { const harness = makeHarness({ setUpdateChannelError: failure }); return Effect.scoped(Effect.gen(function* () { const updates = yield* Updates.DesktopUpdates; yield* updates.configure; assert.isTrue((yield* updates.check("manual")).checked); harness.emit("update-available", { version: "1.2.4" }); yield* flushCallbacks; assert.equal((yield* updates.getState).availableVersion, "1.2.4"); })).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer))); }); it.effect("a rejected track save preserves stable update offers", () => { const harness = makeHarness({ setUpdateChannelError: failure }); return Effect.scoped(Effect.gen(function* () { const updates = yield* Updates.DesktopUpdates; const settings = yield* Settings.DesktopAppSettings; yield* updates.configure; const error = yield* setUpdateChannel.handler(checkedNightly).pipe(Effect.flip); assert.equal(error._tag, "DesktopUpdateChannelPersistenceError"); assert.equal((yield* settings.get).updateChannel, "latest"); assert.equal((yield* updates.getState).channel, "latest"); assert.isTrue((yield* updates.check("manual")).checked); harness.emit("update-available", { version: "1.2.4" }); yield* flushCallbacks; const state = yield* updates.getState; console.log("after failed save", JSON.stringify({ channel: state.channel, status: state.status, availableVersion: state.availableVersion })); assert.equal(state.availableVersion, "1.2.4"); })).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer))); }); it.effect("control: reselecting the current track restores its update offers", () => { const harness = makeHarness({ setUpdateChannelError: failure }); return Effect.scoped(Effect.gen(function* () { const updates = yield* Updates.DesktopUpdates; yield* updates.configure; yield* setUpdateChannel.handler(checkedNightly).pipe(Effect.flip); yield* setUpdateChannel.handler({ channel: "latest" }); assert.isTrue((yield* updates.check("manual")).checked); harness.emit("update-available", { version: "1.2.4" }); yield* flushCallbacks; assert.equal((yield* updates.getState).availableVersion, "1.2.4"); })).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer))); }); }); Observed once at the baseline in a detached worktree: one failing expected-contract test and two passing controls in the same run. These fresh-clone steps use the same baseline, frozen install command and test contents. This is a service/IPC reproduction with fake Electron and persistence boundaries; a packaged UI session was not run. Expected behaviorIf saving a requested track fails and settings and update state remain on Stable, later Stable update checks should still offer valid newer Stable releases. The bridge contract describes Actual behaviorIn an independent test through the production update-channel IPC handler, the existing harness models a packaged Stable 1.2.3 desktop attempting to select Nightly with checked release ImpactMinor bug or occasional failure Version or commitDesktop manifest EnvironmentObserved on macOS ( Logs or stack tracesThe independent run printed this reduced state and result; checkout paths and runner timestamps are omitted: The real caller passes the checked version to the bridge when crossing tracks (UI helper); the IPC handler accepts the channel and optional string and calls the update service (IPC method). The settings implementation can return the injected error type on a failed rename (write boundary). WorkaroundNo response Impact and scopeImpact: P2 - a settings-write failure during a track switch causes subsequent checks to hide otherwise valid updates on the current track and report up-to-date for that offer. This is consequential update behavior with a bounded, demonstrated recovery path. The observed affected input is a failed Stable-to-Nightly settings save whose checked Nightly release compares above a later Stable offer. The floor remains in memory for subsequent checks; normal checks do not clear it. Reselecting the current track without a minimum version restored the offer in the IPC control. The UI's same-track selection passes no minimum version when no reinstall is needed, as shown in the cited caller. A real UI recovery click and real disk-full incident were not exercised. Frequency in deployed applications is NOT_ENOUGH_INFO: production settings-write failure telemetry would establish how often users reach this path. No data loss or security-boundary crossing was observed. InterfaceUI: Settings → About → Update track; independently reproduced through its production schema-decoding desktop IPC method. Earliest failure stageState or storage: the track-save failure leaves an update-filter change in memory, visible on the next update offer. Analysis or suspected causeSource: Additional contextAfter fetching upstream, Related issuesno duplicate found in open and closed issues and PRs. Related history: #26288 introduced track switching and #3261 structured persistence errors; neither reports this failed-save behavior. ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |