Skip to content

ui-server: deferred startup recovery is not retried while the host runs and keeps only the last cause #4437

Open

Description

@schlessera

Part of #4426 (follow-ups from #4278). Found in the review of PR #4435.

Context

On a capacity or storage refusal, recoverAtOpen (packages/ui-server/src/brain/turn-journal.ts:150-163) leaves the row for the next open, and nothing retries it on the running host:

  • maintain (:628-642) calls only the ledger's recover.
  • A dead turn stays recording, and a dead revert stays applying, which excludes its turn from collectOne (:652-656).
  • Each deferral overwrites journal.cleanup.lastFailure and registers a new settings channel (:158).

Scope

The row-recovery steps in ready, their retry in idle maintenance, and the deferral notice. No contract change. Out of scope: receipt quarantine (#4430).

Acceptance criteria

  • After a refusal clears, the next idle maintain() ends dead recording turns and marks dead applying reverts unknown, without a restart.
  • The retry never touches a turn owned by a live process.
  • With two or more deferred records, the owner-visible status names every unresolved record or their count, and a later cleanup failure does not erase it.
  • Deferrals reuse one settings channel.
  • Each test is shown failing with its guard removed.

Activity

  1. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.
    priority: p3Someday. Needs a driving use case before it starts.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.priority: p3Someday. Needs a driving use case before it starts.type: fixSomething is broken and must behave the way it is documented.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions