Skip to content

The agent that grows with you

fix(desktop): a held update blocks boot behind a recoverable screen, never a timer

Teknium74b5854ebd86
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index ba399cbe746..6dc68c096ab 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -598,7 +598,15 @@ import {
updateHandoffConflict,
writeUpdateMarker
} from './update-marker'
-import { heldCeilingNotice, type HeldState, heldWaitMessage, liveMarkerProbe } from './update-marker-gate'
+import {
+ allowStartOverHold,
+ type HeldState,
+ heldWaitMessage,
+ HOLD_SCREEN_GRACE_MS,
+ liveMarkerProbe,
+ requestHoldRecheck,
+ startAnywayLogLine
+} from './update-marker-gate'
import { updateConnectionsBeforeLocal } from './update-order'
import {
resolveUpdaterMechanism,
@@ -2244,7 +2252,10 @@ let bootProgressState = {
retryable: false,
running: false,
statusCode: null,
- timestamp: Date.now()
+ timestamp: Date.now(),
+ // The blocked boot screen (R8 D3): set while an update hold keeps the local
+ // backend from starting, null otherwise.
+ updateHold: null as UpdateHoldWire | null
}
// Chromium owns its --log-file for the life of the process, so the startup
@@ -3086,6 +3097,70 @@ function relaunchIntoSwappedBundle() {
return true
}
+// What the blocked boot screen shows (R8 D3). The renderer mirrors this as
+// `DesktopUpdateHold` in src/global.d.ts.
+interface UpdateHoldWire {
+ holdId: string
+ verdict: 'held' | 'busy' | 'error'
+ ownerPid: number | null
+ since: number
+ checkedAt: number
+ logPath: string
+}
+
+// The hold the boot screen currently shows; the IPC handlers below act on it
+// only (a Start anyway for a hold the user never saw is refused).
+let currentUpdateHold: HeldState | null = null
+
+function updateHoldWire(state: HeldState): UpdateHoldWire {
+ return {
+ holdId: state.holdId,
+ verdict: state.verdict === 'live' ? 'held' : state.verdict,
+ ownerPid: state.ownerPid,
+ since: state.since,
+ checkedAt: state.checkedAt,
+ logPath: path.join(HERMES_HOME, 'logs', 'update.log')
+ }
+}
+
+function clearUpdateHold() {
+ if (!currentUpdateHold && !bootProgressState.updateHold) {
+ return
+ }
+
+ currentUpdateHold = null
+ updateBootProgress({ updateHold: null })
+}
+
+function showUpdateHold(state: HeldState) {
+ const previous = currentUpdateHold
+ const sameHold = previous?.holdId === state.holdId && previous.verdict === state.verdict
+
+ if (sameHold && previous.checkedAt === state.checkedAt && bootProgressState.updateHold) {
+ return
+ }
+
+ if (previous?.holdId !== state.holdId) {
+ rememberLog(
+ `[updates] boot blocked: the update marker is ${state.verdict}` +
+ `${state.ownerPid ? ` (update pid ${state.ownerPid}, exited)` : ''}, hold ${state.holdId}; ` +
+ 'the backend stays stopped until the hold ends, the user quits, or the user confirms Start anyway'
+ )
+ }
+
+ currentUpdateHold = state
+ updateBootProgress({
+ phase: 'backend.update-held',
+ // Logged by updateBootProgress: only when what holds the install changes,
+ // not on every re-check.
+ ...(sameHold ? {} : { message: heldWaitMessage(state) }),
+ progress: 12,
+ running: true,
+ error: null,
+ updateHold: updateHoldWire(state)
+ })
+}
+
// Block until no live update is in progress (or we hit the wait timeout).
// Emits a boot-progress phase so the renderer shows "Update in progress…"
// rather than a frozen splash. Returns true if it parked at all.
@@ -3095,16 +3170,16 @@ async function waitForUpdateToFinish() {
// Marker line 2 of the run this boot parked on: the result we report is that
// run's, never an older one (C2 started_at match).
let parkedRunStartedAt: number | null = null
- // A dead marker whose checkout a leftover process still holds (R6): its
- // state this poll, and whether its ceiling let us through (review R6 m7).
+ // A dead marker whose checkout a leftover process still holds (R6), or whose
+ // ownership the helper could not establish: its state this poll, and since
+ // when it has blocked this wait (the blocked screen's grace, R8 D3).
let held: HeldState | null = null
- let heldExpired: HeldState | null = null
+ let blockedSince: number | null = null
const gateDeps = updateGateDeps(
marker => (parkedRunStartedAt = marker.startedAt),
state => {
held = state
- heldExpired = state.expired ? state : heldExpired
}
)
@@ -3116,15 +3191,30 @@ async function waitForUpdateToFinish() {
rememberLog(`[updates] update in progress (${reason}); deferring backend start until it finishes`)
}
- const heldNow = held
+ const heldNow: HeldState | null = held
held = null
if (reason === 'marker' && heldNow) {
+ blockedSince = heldNow.blocking ? (blockedSince ?? Date.now()) : null
+
+ // Never a timeout (R8 D3): past the grace the boot shows the blocked
+ // screen and stays parked until the hold ends, the user quits, or the
+ // user confirms Start anyway (IPC below).
+ if (blockedSince !== null && Date.now() - blockedSince >= HOLD_SCREEN_GRACE_MS) {
+ showUpdateHold(heldNow)
+
+ return
+ }
+
+ clearUpdateHold()
await advanceBootProgress('backend.update-wait', heldWaitMessage(heldNow), 12)
return
}
+ blockedSince = null
+ clearUpdateHold()
+
// A live update owner is waited out, never aged out (C1 rule 3): booting
// a backend into a half-replaced runtime is the failure this gate exists
// for. Past the old ceiling, say so instead of silently counting down.
@@ -3153,6 +3243,8 @@ async function waitForUpdateToFinish() {
timeoutMs: UPDATE_WAIT_TIMEOUT_MS
})
+ clearUpdateHold()
+
// The detached hand-off script (scripts/desktop-update/windows.ps1) runs hidden;
// its result file is the ONLY way the user learns a detached update
// failed. Consume it exactly once, here, right where boot passes the
@@ -3224,17 +3316,6 @@ async function waitForUpdateToFinish() {
localBackendLifecycle.assertCanStart()
}
- if (heldExpired) {
- // The way forward when the gate stopped waiting on a held checkout: boot
- // goes on (non-blocking dialog); the marker stays for the scripts/Python.
- void dialog.showMessageBox({
- type: 'warning',
- title: 'Hermes update',
- message: 'Hermes started while an earlier update still holds the install',
- detail: heldCeilingNotice(heldExpired)
- })
- }
-
if (outcome === 'clear') {
return false
}
@@ -12358,8 +12439,22 @@ async function runPoolBackendStart(
// silently for background profiles — so we only log while parked.
{
let poolAnnounced = false
+ let poolHoldLogged: string | null = null
+
+ // A blocking hold never ages out here either (R8 D3). Pool backends have
+ // no boot screen of their own: the primary window's Start anyway (scoped
+ // to the same marker body) releases this wait too.
+ const poolGateDeps = updateGateDeps(undefined, state => {
+ if (state.blocking && poolHoldLogged !== state.holdId) {
+ poolHoldLogged = state.holdId
+ rememberLog(
+ `[updates] pool backend start for profile "${profile}" blocked: update marker ${state.verdict}, ` +
+ `hold ${state.holdId}; waiting for the hold to end or a Start anyway on the boot screen`
+ )
+ }
+ })
- await waitForUpdateClearance(updateGateDeps(), {
+ await waitForUpdateClearance(poolGateDeps, {
signal: localBackendLifecycle.signal,
isCancelled: (): boolean => backendPool.get(poolKey) !== entry,
onWaitTick: reason => {
@@ -16145,6 +16240,57 @@ ipcMain.handle('hermes:bootstrap:repair', async (): Promise<{ ok: boolean; bundl
return { ok: true }
})
+
+// The blocked boot screen's three ways out (R8 D3). Only the primary window's
+// boot surface can drive them, and only for the hold it is showing.
+function isPrimaryBootSender(event: Electron.IpcMainInvokeEvent) {
+ return Boolean(mainWindow && !mainWindow.isDestroyed() && event.sender === mainWindow.webContents)
+}
+
+ipcMain.handle('hermes:update-hold:recheck', async event => {
+ if (!isPrimaryBootSender(event) || !currentUpdateHold) {
+ return { ok: false }
+ }
+
+ rememberLog(`[updates] boot blocked (hold ${currentUpdateHold.holdId}): user asked to check again`)
+ requestHoldRecheck()
+
+ return { ok: true }
+})
+
+ipcMain.handle('hermes:update-hold:quit', async event => {
+ if (!isPrimaryBootSender(event)) {
+ return { ok: false }
+ }
+
+ rememberLog(
+ `[updates] user quit Hermes from the update-hold screen${currentUpdateHold ? ` (hold ${currentUpdateHold.holdId})` : ''}`
+ )
+ app.quit()
+
+ return { ok: true }
+})
+
+ipcMain.handle('hermes:update-hold:start-anyway', async (event, request: { holdId?: unknown; confirmed?: unknown }) => {
+ const hold = currentUpdateHold
+
+ if (!isPrimaryBootSender(event) || !hold || request?.confirmed !== true || request.holdId !== hold.holdId) {
+ rememberLog(
+ `[updates] Start anyway refused: ${hold ? `hold ${hold.holdId}` : 'no hold'} is not the confirmed hold ` +
+ `(${typeof request?.holdId === 'string' ? request.holdId.slice(0, 32) : 'none'})`
+ )
+
+ return { ok: false }
+ }
+
+ rememberLog(startAnywayLogLine(hold))
+ // The override must survive whatever the backend start does next.
+ flushDesktopLogBufferSync()
+ allowStartOverHold(hold.holdId)
+
+ return { ok: true }
+})
+
ipcMain.handle('hermes:bootstrap:continue-local', async () => {
rememberLog('[bootstrap] local install selected by renderer; continuing first-launch bootstrap')
continueFirstRunLocalBootstrap()
diff --git a/apps/desktop/electron/preload.ts b/apps/desktop/electron/preload.ts
index 0a0b35ede0e..543ba6e353c 100644
--- a/apps/desktop/electron/preload.ts
+++ b/apps/desktop/electron/preload.ts
@@ -634,6 +634,12 @@ contextBridge.exposeInMainWorld('hermesDesktop', {
continueBootstrapLocal: () => ipcRenderer.invoke('hermes:bootstrap:continue-local'),
recycleBackend: profile => ipcRenderer.invoke('hermes:backend:recycle', profile),
resetBootstrap: () => ipcRenderer.invoke('hermes:bootstrap:reset'),
+ updateHold: {
+ recheck: () => ipcRenderer.invoke('hermes:update-hold:recheck'),
+ quit: () => ipcRenderer.invoke('hermes:update-hold:quit'),
+ startAnyway: (request: { holdId: string; confirmed: true }) =>
+ ipcRenderer.invoke('hermes:update-hold:start-anyway', request)
+ },
repairBootstrap: () => ipcRenderer.invoke('hermes:bootstrap:repair'),
cancelBootstrap: () => ipcRenderer.invoke('hermes:bootstrap:cancel'),
onBootstrapEvent: callback => {
diff --git a/apps/desktop/electron/update-gate.ts b/apps/desktop/electron/update-gate.ts
index 7241e9f867c..164a9bf1274 100644
--- a/apps/desktop/electron/update-gate.ts
+++ b/apps/desktop/electron/update-gate.ts
@@ -85,9 +85,10 @@ export interface WaitForUpdateClearanceOptions {
* Windows update is exactly the failure the gate exists for. The marker reader
* still bounds the wait: an owner whose creation time cannot be read stops
* reading live at the 20-minute ceiling (A1), so a reused pid never parks
- * boot forever, and a dead marker whose checkout a leftover process still
- * holds (`held`) stops reading live at the scripts' 7200 s ceiling
- * (update-marker-gate.ts, review R6 m7).
+ * boot forever. A dead marker whose checkout a leftover process still holds
+ * (`held`) never ages out: the caller shows a blocked boot screen whose only
+ * way through while the hold lasts is a confirmed, logged Start anyway
+ * (update-marker-gate.ts, review R8 D3).
*/
export async function waitForUpdateClearance(
deps: UpdateGateDeps,
diff --git a/apps/desktop/electron/update-marker-gate.test.ts b/apps/desktop/electron/update-marker-gate.test.ts
index 7c8cb2413dc..3308efc6e7e 100644
--- a/apps/desktop/electron/update-marker-gate.test.ts
+++ b/apps/desktop/electron/update-marker-gate.test.ts
@@ -12,12 +12,23 @@ import path from 'path'
import { afterEach, describe, test } from 'vitest'
import { markerPath } from './update-marker'
-import { HELD_CEILING_MS, type HeldState, heldWaitMessage, liveMarkerProbe } from './update-marker-gate'
+import {
+ allowStartOverHold,
+ type HeldState,
+ heldWaitMessage,
+ liveMarkerProbe,
+ requestHoldRecheck,
+ resetHoldStateForTests
+} from './update-marker-gate'
import { cleanupMarkerFixtures, deadPid, liveOwner, minutesAgo, tmpHome } from './update-marker.test-helpers'
import { runMarkerHelper } from './updater/marker-helper'
import { cleanupFakeCheckouts, fakeHelperCheckout } from './updater/marker-helper.test-helpers'
+// The old held ceiling (scripts' RELEASE_WAIT_S); the gate must not honour it.
+const OLD_HELD_CEILING_MS = 7_200_000
+
afterEach(() => {
+ resetHoldStateForTests()
cleanupMarkerFixtures()
cleanupFakeCheckouts()
})
@@ -45,7 +56,7 @@ describe.skipIf(process.platform === 'win32')('gate over a dead marker (R6)', ()
})
}
- test('`held` stops blocking at the scripts\' 7200 s ceiling: told to the user, logged once, marker never touched (R6 m7)', async () => {
+ test('`held` never opens the gate by itself, long past the old 7200 s ceiling; Retry re-asks at once (R8 D3)', async () => {
const { root, home } = fakeHelperCheckout()
const owner = await deadPid()
const body = `${owner}\n${minutesAgo(1)}\nct:1.000\n`
@@ -53,26 +64,47 @@ describe.skipIf(process.platform === 'win32')('gate over a dead marker (R6)', ()
fs.writeFileSync(path.join(home, 'helper-verdict'), 'held')
let clock = Date.now()
const states: HeldState[] = []
- const logs: string[] = []
- const hasLiveMarker = gate(root, home, () => clock, { onHeld: s => states.push(s), log: l => logs.push(l) })
-
- assert.equal(await hasLiveMarker(), true, 'held: still parked')
- clock += HELD_CEILING_MS - 2 * 60_000
- assert.equal(await hasLiveMarker(), true, 'still inside the ceiling (counted from line 2, a minute ago)')
+ const hasLiveMarker = gate(root, home, () => clock, { onHeld: s => states.push(s) })
- clock += 2 * 60_000
- assert.equal(await hasLiveMarker(), false, 'past the ceiling the gate stops blocking')
- assert.equal(await hasLiveMarker(), false)
+ assert.equal(await hasLiveMarker(), true, 'held: parked')
+ clock += 10 * OLD_HELD_CEILING_MS
+ assert.equal(await hasLiveMarker(), true, 'still parked: a hold is never aged out')
+ assert.equal(await gate(root, home, () => clock)(), true, 'a later gate wait is parked too')
assert.equal(fs.readFileSync(markerPath(home), 'utf8'), body, 'Desktop never mutates the marker (A7)')
const [first] = states
- assert.deepEqual([first.verdict, first.ownerPid, first.expired], ['held', owner, false])
- assert.ok(first.remainingMs! > HELD_CEILING_MS - 2 * 60_000, 'counted from line 2, not from boot')
+ assert.deepEqual([first.verdict, first.ownerPid, first.blocking], ['held', owner, true])
+ assert.equal(states.at(-1)!.holdId, first.holdId, 'one hold id per marker body')
assert.match(heldWaitMessage(first), new RegExp(`update \\(process ${owner}\\) exited.*still holds`))
- assert.equal(states.at(-1)!.expired, true)
- assert.equal(logs.filter(l => l.includes('no longer blocking')).length, 1, 'logged once')
- assert.equal(await gate(root, home, () => clock)(), false, 'a later gate wait does not restart the ceiling')
+ const calls = helperCalls(home).length
+ assert.equal(await hasLiveMarker(), true)
+ assert.equal(helperCalls(home).length, calls, 'inside the re-probe interval: not re-asked')
+ requestHoldRecheck()
+ fs.writeFileSync(path.join(home, 'helper-verdict'), 'reclaimed')
+ assert.equal(await hasLiveMarker(), false, 'Retry re-asks at once; the hold ended, so the gate opens')
+ assert.equal(helperCalls(home).length, calls + 1)
+ })
+
+ test('a confirmed Start anyway opens only the hold it names, for every wait; a new marker body blocks again (R8 D3)', async () => {
+ const { root, home } = fakeHelperCheckout()
+ const body = `${await deadPid()}\n${minutesAgo(1)}\nct:1.000\n`
+ fs.writeFileSync(markerPath(home), body)
+ fs.writeFileSync(path.join(home, 'helper-verdict'), 'held')
+ const states: HeldState[] = []
+ const logs: string[] = []
+ const primary = gate(root, home, undefined, { onHeld: s => states.push(s), log: l => logs.push(l) })
+
+ assert.equal(await primary(), true)
+ allowStartOverHold(states[0].holdId)
+ assert.equal(await primary(), false, 'the confirmed hold no longer blocks this wait')
+ assert.equal(await primary(), false)
+ assert.equal(await gate(root, home)(), false, 'nor a pool backend wait in the same process')
+ assert.equal(logs.filter(l => l.includes('chose Start anyway')).length, 1, 'the override is logged once per wait')
+ assert.equal(fs.readFileSync(markerPath(home), 'utf8'), body, 'the marker stays in place')
+
+ fs.writeFileSync(markerPath(home), `${await deadPid()}\n${minutesAgo(1)}\nct:2.000\n`)
+ assert.equal(await primary(), true, 'a different marker body is a different hold: blocked again')
})
test('a failing protocol-2 helper keeps the gate parked and is retried after recovery', async () => {
@@ -99,25 +131,11 @@ describe.skipIf(process.platform === 'win32')('gate over a dead marker (R6)', ()
fs.writeFileSync(path.join(home, 'helper-verdict'), 'busy')
const states: HeldState[] = []
assert.equal(await gate(root, home, undefined, { onHeld: s => states.push(s) })(), true)
- assert.equal(states[0].remainingMs, null)
- assert.equal(states[0].expired, false)
+ assert.equal(states[0].blocking, true, 'blocks like held: the boot screen offers the same ways out')
assert.match(heldWaitMessage(states[0]), /verify.*ownership/)
})
- test('a malformed held marker counts its ceiling from the first sighting, across gate waits', async () => {
- const { root, home } = fakeHelperCheckout()
- fs.writeFileSync(markerPath(home), `garbage-${process.pid}-${Date.now()}\n`)
- fs.writeFileSync(path.join(home, 'helper-verdict'), 'held')
- let clock = Date.now()
-
- assert.equal(await gate(root, home, () => clock)(), true)
- clock += HELD_CEILING_MS - 1_000
- assert.equal(await gate(root, home, () => clock)(), true, 'a new wait continues the same count')
- clock += 1_000
- assert.equal(await gate(root, home, () => clock)(), false)
- })
-
- test('a helper `live <pid>` names a live identity: no ceiling', async () => {
+ test('a helper `live <pid>` names a live identity: waited out, not a blocked screen', async () => {
const { root, home } = fakeHelperCheckout()
fs.writeFileSync(markerPath(home), `${await deadPid()}\n${minutesAgo(1)}\nct:1.000\n`)
fs.writeFileSync(path.join(home, 'helper-verdict'), 'live 4242')
@@ -126,9 +144,9 @@ describe.skipIf(process.platform === 'win32')('gate over a dead marker (R6)', ()
const hasLiveMarker = gate(root, home, () => clock, { onHeld: s => states.push(s) })
assert.equal(await hasLiveMarker(), true)
- clock += 10 * HELD_CEILING_MS
+ clock += 10 * OLD_HELD_CEILING_MS
assert.equal(await hasLiveMarker(), true)
- assert.equal(states.at(-1)!.remainingMs, null)
+ assert.equal(states.at(-1)!.blocking, false)
assert.equal(states.at(-1)!.livePid, 4242)
})
diff --git a/apps/desktop/electron/update-marker-gate.ts b/apps/desktop/electron/update-marker-gate.ts
index e2c08db42b1..049eba2994e 100644
--- a/apps/desktop/electron/update-marker-gate.ts
+++ b/apps/desktop/electron/update-marker-gate.ts
@@ -14,29 +14,31 @@
* (dead = not running, as before minus the deletion).
*
* The helper is asked once per distinct dead marker body per wait; a `held` /
- * `busy` / `live` answer is re-asked every `reprobeMs` (5 s) because only the
- * script can see the lock being released.
+ * `busy` / `error` / `live` answer is re-asked every `reprobeMs` (5 s), or on
+ * the next poll after a Retry, because only the script can see the lock being
+ * released.
*
- * Only verified `held` has a ceiling (review R6 m7): no owner identity is alive,
- * only some process still holding the checkout lock, and that can be a
- * leaked long-lived one. The scripts stop waiting on it after RELEASE_WAIT_S
- * (7200 s); the gate stops blocking after the same span, counted from the
- * marker's line 2 (the last time an owner wrote it; the scripts keep it young
- * while they live) or, when line 2 is unreadable, from the first time this
- * process saw the body held. Past the ceiling the probe answers "not
- * running", logs it once and reports it through `onHeld` so the caller can
- * tell the user; the marker is left exactly as it is. A helper `live <pid>`
- * names a live identity and is waited out like any live marker (C1 rule 3).
- * `busy`/`error` are indeterminate, retried without granting clearance.
+ * No verdict has a ceiling (review R8 D3). `held` means no owner identity is
+ * alive but some process still holds the checkout lock; it may be a leaked
+ * long-lived one, and it may still be writing the install. `busy` / `error`
+ * mean the helper could not establish ownership at all. None of them ever
+ * opens the gate by itself: past a short grace the caller shows a blocked
+ * boot screen (what holds the install, Retry, Quit) whose only way through
+ * while the hold lasts is an explicit, confirmed, logged "Start anyway"
+ * (`allowStartOverHold`), scoped to the exact marker body the user saw. The
+ * marker is never touched. A helper `live <pid>` names a live identity and is
+ * waited out like any live marker (C1 rule 3).
*/
+import { createHash } from 'node:crypto'
+
import { type CreateTimeProbe, inspectUpdateMarker } from './update-marker'
import type { MarkerHelperVerdict } from './updater/marker-helper'
export const HELD_REPROBE_MS = 5_000
-/** The scripts' own wait on the checkout lock (posix.sh RELEASE_WAIT_S, marker.ps1 MarkerReleaseWaitSeconds). */
-export const HELD_CEILING_MS = 7_200_000
+/** How long a blocking verdict must last in one wait before the boot shows the blocked screen. */
+export const HOLD_SCREEN_GRACE_MS = 5_000
/** Why a dead marker still keeps the gate closed, as the script helper put it. */
export interface HeldState {
@@ -45,12 +47,14 @@ export interface HeldState {
ownerPid: number | null
/** The live process the helper named (`live <pid>`), else null. */
livePid: number | null
- /** Epoch ms the ceiling counts from. */
+ /** Stable id of the marker body this answer is about; "Start anyway" is scoped to it. */
+ holdId: string
+ /** Epoch ms this process first saw this marker body keep the gate closed. */
since: number
- /** Ms until the gate stops blocking; null when there is no ceiling (`live`). */
- remainingMs: number | null
- /** The ceiling passed: the gate is open and the marker untouched. */
- expired: boolean
+ /** Epoch ms of the helper answer this state reflects. */
+ checkedAt: number
+ /** No live identity owns the install (`held`), or ownership could not be established (`busy`/`error`). */
+ blocking: boolean
}
export interface LiveMarkerProbeOptions {
@@ -59,22 +63,20 @@ export interface LiveMarkerProbeOptions {
reclaim: (() => Promise<MarkerHelperVerdict>) | null
createTime?: CreateTimeProbe
onLiveMarker?: (marker: { startedAt: number | null }) => void
- /** Every answer that comes from a running helper verdict (boot progress, the ceiling notice). */
+ /** Every answer that comes from a running helper verdict (boot progress, the blocked screen). */
onHeld?: (state: HeldState) => void
log?: (line: string) => void
now?: () => number
reprobeMs?: number
- /** Test seam; production is HELD_CEILING_MS. */
- heldCeilingMs?: number
}
const STILL_RUNNING = new Set(['held', 'busy', 'live', 'error'])
// First sighting of each held body, process-wide: a later gate wait (a pool
-// backend, a reconnect) continues the same ceiling instead of restarting it.
+// backend, a reconnect) reports the same "since".
const firstHeldAt = new Map<string, number>()
-function heldSince(key: string, startedAt: number | null, at: number): number {
+function heldSince(key: string, at: number): number {
if (!firstHeldAt.has(key)) {
if (firstHeldAt.size >= 16) {
firstHeldAt.clear()
@@ -83,9 +85,40 @@ function heldSince(key: string, startedAt: number | null, at: number): number {
firstHeldAt.set(key, at)
}
- const written = startedAt !== null && Number.isFinite(startedAt) && startedAt > 0 ? startedAt * 1000 : Infinity
+ return firstHeldAt.get(key)!
+}
+
+// Marker bodies the user explicitly chose to start over (R8 D3), process-wide
+// so a pool backend wait honours the same decision. A different body (a new
+// update, a new owner) blocks again.
+const startAnywayHolds = new Set<string>()
+
+// Bumped by an explicit Retry: every probe re-asks the helper on its next poll.
+let recheckGeneration = 0
- return Math.min(firstHeldAt.get(key)!, written)
+/** The stable id of a marker body (what `HeldState.holdId` carries). */
+export function markerHoldId(raw: Buffer): string {
+ return createHash('sha256').update(raw).digest('hex').slice(0, 16)
+}
+
+/**
+ * The user confirmed "Start anyway" over this exact held marker body. The
+ * caller logs the override; the marker is left in place.
+ */
+export function allowStartOverHold(holdId: string): void {
+ startAnywayHolds.add(holdId)
+}
+
+/** Retry: ask the script helper again on the next poll instead of waiting out the re-probe interval. */
+export function requestHoldRecheck(): void {
+ recheckGeneration += 1
+}
+
+/** Test seam: forget process-wide hold state. */
+export function resetHoldStateForTests(): void {
+ firstHeldAt.clear()
+ startAnywayHolds.clear()
+ recheckGeneration = 0
}
/** `hasLiveMarker` for one gate wait (create it per wait, never module-wide). */
@@ -97,10 +130,12 @@ export function liveMarkerProbe({
onHeld,
log,
now = Date.now,
- reprobeMs = HELD_REPROBE_MS,
- heldCeilingMs = HELD_CEILING_MS
+ reprobeMs = HELD_REPROBE_MS
}: LiveMarkerProbeOptions): () => Promise<boolean> {
- const asked = new Map<string, { verdict: MarkerHelperVerdict; at: number; expiryLogged?: boolean }>()
+ const asked = new Map<
+ string,
+ { verdict: MarkerHelperVerdict; at: number; generation: number; overrideLogged?: boolean }
+ >()
return async () => {
const inspection = await inspectUpdateMarker(hermesHome, { createTime, now })
@@ -115,19 +150,27 @@ export function liveMarkerProbe({
return false
}
- const key = inspection.raw.toString('hex')
- const previous = asked.get(key)
+ const holdId = markerHoldId(inspection.raw)
+ const previous = asked.get(holdId)
let entry = previous
- if (!previous || (STILL_RUNNING.has(previous.verdict.kind) && now() - previous.at >= reprobeMs)) {
+ const due =
+ !previous ||
+ (STILL_RUNNING.has(previous.verdict.kind) &&
+ (now() - previous.at >= reprobeMs || previous.generation !== recheckGeneration))
+
+ if (due) {
+ const generation = recheckGeneration
const verdict = await reclaim()
if (!previous || STILL_RUNNING.has(previous.verdict.kind) !== STILL_RUNNING.has(verdict.kind)) {
- log?.(`[updates] dead update marker: script helper says ${verdict.kind}${'pid' in verdict ? ` ${verdict.pid}` : ''}`)
+ log?.(
+ `[updates] dead update marker: script helper says ${verdict.kind}${'pid' in verdict ? ` ${verdict.pid}` : ''}`
+ )
}
- entry = { ...previous, verdict, at: now() }
- asked.set(key, entry)
+ entry = { ...previous, verdict, at: now(), generation }
+ asked.set(holdId, entry)
}
const { verdict } = entry!
@@ -136,47 +179,35 @@ export function liveMarkerProbe({
return false
}
- const startedAt = inspection.marker?.startedAt ?? null
- const since = heldSince(key, startedAt, now())
- // `busy`/`error` did not establish ownership: stale bytes cannot grant clearance.
- const remainingMs = verdict.kind === 'held' ? Math.max(0, since + heldCeilingMs - now()) : null
-
const state: HeldState = {
verdict: verdict.kind as HeldState['verdict'],
ownerPid: inspection.marker?.pid ?? null,
livePid: 'pid' in verdict ? verdict.pid : null,
- since,
- remainingMs,
- expired: remainingMs === 0
+ holdId,
+ since: heldSince(holdId, now()),
+ checkedAt: entry!.at,
+ blocking: verdict.kind !== 'live'
}
- onHeld?.(state)
-
- if (state.expired) {
- if (!entry!.expiryLogged) {
- entry!.expiryLogged = true
+ if (state.blocking && startAnywayHolds.has(holdId)) {
+ if (!entry!.overrideLogged) {
+ entry!.overrideLogged = true
log?.(
- `[updates] update marker still ${state.verdict} ${Math.round((now() - since) / 60_000)} min after its owner` +
- `${state.ownerPid ? ` (pid ${state.ownerPid})` : ''} last wrote it; no longer blocking start-up` +
- ' (the scripts stop waiting at the same ceiling). The marker is left in place.'
+ `[updates] update marker still ${state.verdict} (hold ${holdId}); not blocking start-up because the user ` +
+ 'chose Start anyway. The marker is left in place.'
)
}
return false
}
- onLiveMarker?.({ startedAt })
+ onHeld?.(state)
+ onLiveMarker?.({ startedAt: inspection.marker?.startedAt ?? null })
return true
}
}
-function duration(ms: number): string {
- const m = Math.max(1, Math.ceil(ms / 60_000))
-
- return m >= 120 ? `${Math.round(m / 60)} hours` : m === 1 ? '1 minute' : `${m} minutes`
-}
-
/** Boot-progress text while a dead marker's checkout is still held. */
export function heldWaitMessage(state: HeldState): string {
if (state.verdict === 'busy' || state.verdict === 'error') {
@@ -189,20 +220,15 @@ export function heldWaitMessage(state: HeldState): string {
const who = state.ownerPid ? `the update (process ${state.ownerPid}) exited, but a process` : 'a process'
- return (
- `An update is still finishing: ${who} it started still holds the Hermes install. ` +
- `Hermes will start when that process exits, or in ${duration(state.remainingMs ?? 0)} at the latest.`
- )
+ return `An update is still finishing: ${who} it started still holds the Hermes install. Hermes will start when it lets go.`
}
-/** Dialog detail once the ceiling let Hermes start over a still-held checkout. */
-export function heldCeilingNotice(state: HeldState): string {
- const owner = state.ownerPid ? ` (process ${state.ownerPid}, now exited)` : ''
-
+/** The log line for a confirmed "Start anyway" (R8 D3). */
+export function startAnywayLogLine(state: HeldState): string {
return (
- `An earlier update${owner} left a process that still held the Hermes install ${duration(HELD_CEILING_MS)} ` +
- 'later, so Hermes started without waiting for it. The update marker was left in place.\n\n' +
- 'If something looks wrong: quit Hermes, end leftover git or hermes processes (or restart the computer), ' +
- 'then run the update again from Settings or with `hermes update`. Details are in logs/update.log.'
+ `[updates] USER OVERRIDE: Start anyway over an update marker the helper reports ${state.verdict}` +
+ `${state.ownerPid ? ` (update pid ${state.ownerPid}, exited)` : ''}, hold ${state.holdId}, ` +
+ `blocking since ${new Date(state.since).toISOString()}; starting the local backend without waiting. ` +
+ 'The marker is left in place.'
)
}
diff --git a/apps/desktop/src/app/contrib/wiring.tsx b/apps/desktop/src/app/contrib/wiring.tsx
index 169dee315b1..e4ae14512bb 100644
--- a/apps/desktop/src/app/contrib/wiring.tsx
+++ b/apps/desktop/src/app/contrib/wiring.tsx
@@ -36,6 +36,7 @@ import { RemoteDisplayBanner } from '@/components/remote-display-banner'
import { SendDiagnosticsHost } from '@/components/send-diagnostics-dialog'
import { SharedMetricsConsentDialog } from '@/components/shared-metrics/consent-dialog'
import { TipHost } from '@/components/tips'
+import { UpdateHoldOverlay } from '@/components/update-hold-overlay'
import { emitGatewayEvent } from '@/contrib/events'
import { translateNow } from '@/i18n'
import { type ChatMessage, chatMessageText } from '@/lib/chat-messages'
@@ -1405,6 +1406,7 @@ export function ContribWiring({ children }: { children: ReactNode }) {
<UpdatesOverlay />
<GatewayConnectingOverlay />
<BootFailureOverlay />
+ <UpdateHoldOverlay />
<CommandPalette />
<PluginInstallModal />
<PetGenerateOverlay />
diff --git a/apps/desktop/src/components/update-hold-overlay.tsx b/apps/desktop/src/components/update-hold-overlay.tsx
new file mode 100644
index 00000000000..2ff0973601a
--- /dev/null
+++ b/apps/desktop/src/components/update-hold-overlay.tsx
@@ -0,0 +1,164 @@
+import { useStore } from '@nanostores/react'
+import { useEffect, useId, useState } from 'react'
+
+import { Button } from '@/components/ui/button'
+import type { DesktopUpdateHold } from '@/global'
+import { useI18n } from '@/i18n'
+import { AlertTriangle, FileText, Loader2, Power, RefreshCw } from '@/lib/icons'
+import { $desktopBoot } from '@/store/boot'
+
+type Busy = 'quit' | 'recheck' | 'start' | null
+
+const formatTime = (ms: number) =>
+ new Date(ms).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' })
+
+/**
+ * The blocked boot screen (review R8 D3). While an earlier update's leftover
+ * process holds the install — or the update helper cannot tell who owns it —
+ * the local backend does not start, ever, on a timer. The user sees what holds
+ * the install and can check again or quit; the only way through while the
+ * hold lasts is an explicit, confirmed Start anyway that main logs. Main
+ * starts the backend by itself as soon as the hold ends.
+ */
+export function UpdateHoldOverlay() {
+ const boot = useStore($desktopBoot)
+ const { t } = useI18n()
+ const titleId = useId()
+ const [busy, setBusy] = useState<Busy>(null)
+ const [confirming, setConfirming] = useState(false)
+ const [refused, setRefused] = useState(false)
+ const hold: DesktopUpdateHold | null = boot.error ? null : (boot.updateHold ?? null)
+ const holdId = hold?.holdId ?? null
+ const checkedAt = hold?.checkedAt ?? null
+
+ // A new check landed: Check again is done.
+ useEffect(() => {
+ setBusy(current => (current === 'recheck' ? null : current))
+ }, [checkedAt])
+
+ // A different hold is a different decision: drop a pending confirmation.
+ useEffect(() => {
+ setConfirming(false)
+ setBusy(null)
+ }, [holdId])
+
+ if (!hold) {
+ return null
+ }
+
+ const copy = t.boot.updateHold
+ const unverified = hold.verdict !== 'held'
+
+ const recheck = async () => {
+ setRefused(false)
+ setBusy('recheck')
+ const result = await window.hermesDesktop?.updateHold.recheck().catch(() => null)
+
+ if (!result?.ok) {
+ setBusy(null)
+ }
+ }
+
+ const quit = async () => {
+ setBusy('quit')
+ await window.hermesDesktop?.updateHold.quit().catch(() => undefined)
+ }
+
+ const startAnyway = async () => {
+ setBusy('start')
+
+ const result = await window.hermesDesktop?.updateHold
+ .startAnyway({ holdId: hold.holdId, confirmed: true })
+ .catch(() => null)
+
+ if (!result?.ok) {
+ setRefused(true)
+ setConfirming(false)
+ setBusy(null)
+ }
+ }
+
+ const openLogs = () => void window.hermesDesktop?.revealLogs().catch(() => undefined)
+
+ return (
+ <div
+ aria-labelledby={titleId}
+ aria-modal="true"
+ className="fixed inset-0 z-(--z-setup) flex items-center justify-center bg-(--ui-chat-surface-background) p-6"
+ // Masks the whole app while the boot is blocked — must stay filled under
+ // window glass. Contract: `[data-glass-opaque]` in styles.css.
+ data-glass-opaque=""
+ data-testid="update-hold-overlay"
+ role="alertdialog"
+ >
+ <div className="relative w-full max-w-[40rem] overflow-hidden rounded-xl border border-(--stroke-nous) bg-(--ui-chat-bubble-background) shadow-nous">
+ <div className="flex items-start gap-3 px-5 py-4">
+ <AlertTriangle className="mt-0.5 size-5 shrink-0 text-amber-500" />
+ <div>
+ <h2 className="text-[0.9375rem] font-semibold tracking-tight" id={titleId}>
+ {confirming ? copy.confirmTitle : unverified ? copy.titleUnverified : copy.title}
+ </h2>
+ <p className="mt-1 text-[0.8125rem] leading-5 text-(--ui-text-tertiary)">
+ {confirming ? copy.confirmBody : copy.description}
+ </p>
+ </div>
+ </div>
+
+ <div className="grid gap-4 p-5 pt-0">
+ <div
+ className="rounded-2xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-xs text-(--ui-text-secondary)"
+ data-testid="update-hold-detail"
+ >
+ <p>{unverified ? copy.unverified : hold.ownerPid ? copy.heldByProcess(hold.ownerPid) : copy.heldUnknown}</p>
+ <p className="mt-1 text-muted-foreground">
+ {copy.since(formatTime(hold.since))} · {copy.lastChecked(formatTime(hold.checkedAt))}
+ </p>
+ </div>
+
+ {refused ? <p className="text-xs text-destructive">{copy.startAnywayRefused}</p> : null}
+
+ {confirming ? (
+ <div className="flex flex-wrap gap-2">
+ <Button disabled={Boolean(busy)} onClick={() => setConfirming(false)} variant="secondary">
+ {copy.confirmKeepWaiting}
+ </Button>
+ <Button disabled={Boolean(busy)} onClick={() => void startAnyway()} variant="destructive">
+ {busy === 'start' ? <Loader2 className="animate-spin" /> : null}
+ {copy.confirmStart}
+ </Button>
+ </div>
+ ) : (
+ <div className="grid gap-2">
+ <div className="flex flex-wrap gap-2">
+ <Button disabled={Boolean(busy)} onClick={() => void recheck()}>
+ {busy === 'recheck' ? <Loader2 className="animate-spin" /> : <RefreshCw />}
+ {copy.checkAgain}
+ </Button>
+ <Button disabled={Boolean(busy)} onClick={() => void quit()} variant="secondary">
+ {busy === 'quit' ? <Loader2 className="animate-spin" /> : <Power />}
+ {copy.quit}
+ </Button>
+ <Button onClick={openLogs} variant="ghost">
+ <FileText />
+ {copy.openLogs}
+ </Button>
+ <Button
+ className="ml-auto"
+ disabled={Boolean(busy)}
+ onClick={() => {
+ setRefused(false)
+ setConfirming(true)
+ }}
+ variant="ghost"
+ >
+ {copy.startAnyway}
+ </Button>
+ </div>
+ <p className="text-xs text-muted-foreground">{copy.recoveryHint}</p>
+ </div>
+ )}
+ </div>
+ </div>
+ </div>
+ )
+}
diff --git a/apps/desktop/src/global.d.ts b/apps/desktop/src/global.d.ts
index 0159edf0902..e544fe3f4dc 100644
--- a/apps/desktop/src/global.d.ts
+++ b/apps/desktop/src/global.d.ts
@@ -610,6 +610,12 @@ declare global {
continueBootstrapLocal: () => Promise<{ ok: boolean }>
recycleBackend?: (profile?: null | string) => Promise<{ ok: boolean }>
resetBootstrap: () => Promise<{ ok: boolean }>
+ // The blocked boot screen's actions (an earlier update still holds the install).
+ updateHold: {
+ recheck: () => Promise<{ ok: boolean }>
+ quit: () => Promise<{ ok: boolean }>
+ startAnyway: (request: { holdId: string; confirmed: true }) => Promise<{ ok: boolean }>
+ }
repairBootstrap: () => Promise<{ ok: boolean; error?: string }>
cancelBootstrap: () => Promise<{ ok: boolean; cancelled: boolean }>
onBootstrapEvent: (callback: (payload: DesktopBootstrapEvent) => void) => () => void
@@ -1394,6 +1400,22 @@ export interface DesktopBootProgress {
/** Structured HTTP status when the boot failure carried one (e.g. 503). */
statusCode?: number | null
timestamp: number
+ /** Set while an earlier update's hold keeps the local backend from starting (blocked boot screen). */
+ updateHold?: DesktopUpdateHold | null
+}
+
+/** What holds the install while the boot is blocked (electron/main.ts UpdateHoldWire). */
+export interface DesktopUpdateHold {
+ holdId: string
+ /** `held`: a leftover process holds the checkout lock; `busy`/`error`: ownership could not be verified. */
+ verdict: 'held' | 'busy' | 'error'
+ /** The update process that wrote the marker (exited), when known. */
+ ownerPid: number | null
+ /** Epoch ms the hold was first seen. */
+ since: number
+ /** Epoch ms of the latest check. */
+ checkedAt: number
+ logPath: string
}
// First-launch install ("bootstrap") event types -- emitted by
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index b76e2beea4d..77f0da7ef16 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -481,6 +481,33 @@ export const deOverrides = {
signInToRemoteGateway: 'Beim Remote-Gateway anmelden',
signInWithProvider: provider => `Mit ${provider} anmelden`,
identityProvider: 'Ihr Identity-Provider'
+ },
+ updateHold: {
+ title: 'Ein früheres Update hält Hermes noch fest',
+ titleUnverified: 'Hermes kann nicht bestätigen, dass das letzte Update fertig ist',
+ description:
+ 'Hermes startet noch nicht, damit es keine Dateien lädt, die ein Update womöglich noch ändert. Sobald die Sperre endet, startet Hermes von selbst.',
+ heldByProcess: pid =>
+ `Das Update (Prozess ${pid}) wurde beendet, aber ein von ihm gestarteter Prozess hält die Hermes-Installation noch fest.`,
+ heldUnknown:
+ 'Ein Update wurde beendet, aber ein von ihm gestarteter Prozess hält die Hermes-Installation noch fest.',
+ unverified:
+ 'Der Update-Helfer konnte gerade nicht prüfen, wem die Hermes-Installation gehört. Hermes prüft weiter.',
+ since: time => `Wartet seit ${time}`,
+ lastChecked: time => `Zuletzt geprüft ${time}`,
+ recoveryHint:
+ 'Das löst sich meist in wenigen Minuten. Falls nicht: Hermes beenden, übrig gebliebene git- oder hermes-Prozesse beenden (oder den Computer neu starten) und Hermes erneut öffnen.',
+ checkAgain: 'Erneut prüfen',
+ quit: 'Hermes beenden',
+ openLogs: 'Logs öffnen',
+ startAnyway: 'Trotzdem starten…',
+ confirmTitle: 'Hermes starten, obwohl das Update es noch festhält?',
+ confirmBody:
+ 'Der übrig gebliebene Update-Prozess ändert womöglich noch Dateien von Hermes. Ein Start jetzt kann eine halb aktualisierte Installation laden, die erst nach einem erneuten Update wieder funktioniert. Hermes protokolliert diese Entscheidung und lässt die Update-Markierung bestehen.',
+ confirmKeepWaiting: 'Weiter warten',
+ confirmStart: 'Trotzdem starten',
+ startAnywayRefused:
+ 'Was die Installation festhält, hat sich geändert, bevor Hermes starten konnte. Bitte erneut prüfen.'
}
},
notifications: {
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index f1d6cfead87..09db4785118 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -471,6 +471,30 @@ export const en: Translations = {
signInToRemoteGateway: 'Sign in to remote gateway',
signInWithProvider: provider => `Sign in with ${provider}`,
identityProvider: 'your identity provider'
+ },
+ updateHold: {
+ title: 'An earlier update still holds Hermes',
+ titleUnverified: "Hermes can't confirm the last update finished",
+ description:
+ "Hermes is holding off on starting so it can't load files an update may still be changing. It starts by itself as soon as the hold ends.",
+ heldByProcess: pid =>
+ `The update (process ${pid}) exited, but a process it started still holds the Hermes install.`,
+ heldUnknown: 'An update exited, but a process it started still holds the Hermes install.',
+ unverified: "The update helper couldn't check who owns the Hermes install right now. Hermes keeps checking.",
+ since: time => `Waiting since ${time}`,
+ lastChecked: time => `Last checked ${time}`,
+ recoveryHint:
+ 'This usually clears in a few minutes. If it does not: quit Hermes, end leftover git or hermes processes (or restart the computer), then open Hermes again.',
+ checkAgain: 'Check again',
+ quit: 'Quit Hermes',
+ openLogs: 'Open logs',
+ startAnyway: 'Start anyway…',
+ confirmTitle: 'Start Hermes while the update still holds it?',
+ confirmBody:
+ "The leftover update process may still be changing Hermes' files. Starting now can load a half-updated install, which may not work until you run the update again. Hermes records this choice in its log and leaves the update marker in place.",
+ confirmKeepWaiting: 'Keep waiting',
+ confirmStart: 'Start anyway',
+ startAnywayRefused: 'What holds the install changed before Hermes could start. Review it and try again.'
}
},
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index a2edb8425a1..a00f7670f10 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -481,6 +481,32 @@ export const esOverrides = {
signInToRemoteGateway: 'Iniciar sesión en el gateway remoto',
signInWithProvider: provider => `Iniciar sesión con ${provider}`,
identityProvider: 'tu proveedor de identidad'
+ },
+ updateHold: {
+ title: 'Una actualización anterior todavía retiene Hermes',
+ titleUnverified: 'Hermes no puede confirmar que la última actualización terminó',
+ description:
+ 'Hermes espera antes de iniciar para no cargar archivos que una actualización quizá todavía esté cambiando. Se inicia solo en cuanto termine la retención.',
+ heldByProcess: pid =>
+ `La actualización (proceso ${pid}) terminó, pero un proceso que inició todavía retiene la instalación de Hermes.`,
+ heldUnknown: 'Una actualización terminó, pero un proceso que inició todavía retiene la instalación de Hermes.',
+ unverified:
+ 'El asistente de actualización no pudo comprobar quién tiene la instalación de Hermes. Hermes sigue comprobando.',
+ since: time => `Esperando desde ${time}`,
+ lastChecked: time => `Última comprobación ${time}`,
+ recoveryHint:
+ 'Esto suele resolverse en unos minutos. Si no: cierra Hermes, termina los procesos git o hermes que queden (o reinicia el equipo) y vuelve a abrir Hermes.',
+ checkAgain: 'Comprobar de nuevo',
+ quit: 'Salir de Hermes',
+ openLogs: 'Abrir registros',
+ startAnyway: 'Iniciar de todos modos…',
+ confirmTitle: '¿Iniciar Hermes mientras la actualización todavía lo retiene?',
+ confirmBody:
+ 'El proceso de actualización restante quizá siga cambiando archivos de Hermes. Iniciar ahora puede cargar una instalación a medio actualizar, que puede no funcionar hasta que vuelvas a ejecutar la actualización. Hermes registra esta decisión y deja el marcador de actualización en su lugar.',
+ confirmKeepWaiting: 'Seguir esperando',
+ confirmStart: 'Iniciar de todos modos',
+ startAnywayRefused:
+ 'Lo que retiene la instalación cambió antes de que Hermes pudiera iniciar. Revísalo e inténtalo de nuevo.'
}
},
notifications: {
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index f605cb43385..cf20e84dbd2 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -481,6 +481,33 @@ export const frOverrides = {
signInToRemoteGateway: 'Se connecter au gateway distante',
signInWithProvider: provider => `Se connecter avec ${provider}`,
identityProvider: "votre fournisseur d'identité"
+ },
+ updateHold: {
+ title: 'Une mise à jour précédente bloque encore Hermes',
+ titleUnverified: 'Hermes ne peut pas confirmer la fin de la dernière mise à jour',
+ description:
+ "Hermes attend avant de démarrer pour ne pas charger des fichiers qu'une mise à jour modifie peut-être encore. Il démarre tout seul dès que le blocage cesse.",
+ heldByProcess: pid =>
+ `La mise à jour (processus ${pid}) s'est terminée, mais un processus qu'elle a lancé bloque encore l'installation de Hermes.`,
+ heldUnknown:
+ "Une mise à jour s'est terminée, mais un processus qu'elle a lancé bloque encore l'installation de Hermes.",
+ unverified:
+ "L'assistant de mise à jour n'a pas pu vérifier qui détient l'installation de Hermes. Hermes continue de vérifier.",
+ since: time => `En attente depuis ${time}`,
+ lastChecked: time => `Dernière vérification ${time}`,
+ recoveryHint:
+ "Cela se règle généralement en quelques minutes. Sinon : quittez Hermes, arrêtez les processus git ou hermes restants (ou redémarrez l'ordinateur), puis rouvrez Hermes.",
+ checkAgain: 'Vérifier à nouveau',
+ quit: 'Quitter Hermes',
+ openLogs: 'Ouvrir les journaux',
+ startAnyway: 'Démarrer quand même…',
+ confirmTitle: 'Démarrer Hermes alors que la mise à jour le bloque encore ?',
+ confirmBody:
+ 'Le processus de mise à jour restant modifie peut-être encore les fichiers de Hermes. Démarrer maintenant peut charger une installation à moitié mise à jour, qui risque de ne pas fonctionner avant une nouvelle mise à jour. Hermes consigne ce choix dans son journal et laisse le marqueur de mise à jour en place.',
+ confirmKeepWaiting: 'Continuer à attendre',
+ confirmStart: 'Démarrer quand même',
+ startAnywayRefused:
+ "Ce qui bloque l'installation a changé avant que Hermes puisse démarrer. Vérifiez et réessayez."
}
},
notifications: {
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index 9a88a48f8d2..74aef256be3 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -500,6 +500,27 @@ export interface Translations {
signInWithProvider: (provider: string) => string
identityProvider: string
}
+ // The blocked boot screen while an earlier update still holds the install (R8 D3).
+ updateHold: {
+ title: string
+ titleUnverified: string
+ description: string
+ heldByProcess: (pid: number) => string
+ heldUnknown: string
+ unverified: string
+ since: (time: string) => string
+ lastChecked: (time: string) => string
+ recoveryHint: string
+ checkAgain: string
+ quit: string
+ openLogs: string
+ startAnyway: string
+ confirmTitle: string
+ confirmBody: string
+ confirmKeepWaiting: string
+ confirmStart: string
+ startAnywayRefused: string
+ }
}
notifications: {
diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.json
index 67e80ac0a43..a0f44a82d0c 100644
--- a/locales/_keys.desktop.json
+++ b/locales/_keys.desktop.json
@@ -496,6 +496,24 @@
"boot.steps.retryingRemoteBackend",
"boot.steps.startingDesktopConnection",
"boot.steps.startingHermesDesktop",
+ "boot.updateHold.checkAgain",
+ "boot.updateHold.confirmBody",
+ "boot.updateHold.confirmKeepWaiting",
+ "boot.updateHold.confirmStart",
+ "boot.updateHold.confirmTitle",
+ "boot.updateHold.description",
+ "boot.updateHold.heldByProcess",
+ "boot.updateHold.heldUnknown",
+ "boot.updateHold.lastChecked",
+ "boot.updateHold.openLogs",
+ "boot.updateHold.quit",
+ "boot.updateHold.recoveryHint",
+ "boot.updateHold.since",
+ "boot.updateHold.startAnyway",
+ "boot.updateHold.startAnywayRefused",
+ "boot.updateHold.title",
+ "boot.updateHold.titleUnverified",
+ "boot.updateHold.unverified",
"commandCenter.actionDone",
"commandCenter.actionFailed",
"commandCenter.actionRunning",