Skip to content

ui-server: private-state path resolution runs outside the bounded retry and the named refusal #4501

Open

Description

@schlessera

Context

Found in the round-3 independent review of PR #4490 (findings F141, F147), which fixes #4487. Line numbers are at the PR's head c1f7103a1.

  • operationalStateMasks (packages/ui-server/src/brain/operational-state.ts:126-135) canonicalizes every state path with no retry and no error wrapper. It is called at boot from packages/ui-server/src/app.ts:750 and packages/ui-server/src/brain/host-boundary.ts:459. If a symlinked path component is removed between lstatSync and readlinkSync in canonical (operational-state.ts:11-32), createApp rejects with a raw ENOENT, with no named status and no cause chain. Main behaves the same, and the result still fails closed.
  • operationalStateRefusal resolves the brain root once, outside the per-path retry (operational-state.ts:167-168). One transient failure there returns private_state_unverified without a second attempt.

Scope

Apply the bounded retry and the named OperationalStateAliasVerificationUnavailable refusal to mask derivation and to brain-root resolution. Out of scope: the walk itself (#4494, #4499).

Acceptance criteria

  • A transient failure while deriving masks is retried. A persistent one refuses boot as OperationalStateAliasVerificationUnavailable, with the original error in cause.
  • A transient failure resolving the brain root is retried within the same bound before private_state_unverified is returned.
  • A failing-first test injects one readlink failure in each place, with a mutation receipt.

Blocked by #4487 (the code lands in PR #4490).

Activity

  1. added
    type: fix
    area: ui-server
    priority: p3
    blocked
    on Nov 23, 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

    area: ui-serverblockedpriority: p3type: fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions