Skip to content

ui-server: a failed checkout's mask cannot be prepared when strict was selected by fallback #4504

Open

Description

@schlessera

Context

Found in the round-6 independent review of PR #4490 (finding F181), which fixes #4486. Line numbers are at the PR's head 59d19b125.

restrictFailedCheckouts (packages/ui-server/src/brain/checkout-restrictions.ts:4-21) calls resolveWorkerProtection. That always re-checks root env names, outside links and mounts (packages/ui-sdk/src/server/worker-protection.ts:73-83, :112). When the sandbox fell back to strict because one of those checks failed (packages/ui-sdk/src/server/worker-launcher.ts:1102), the same check fails again. Admission then throws at packages/ui-server/src/ws/session-run/admission.ts:196, and the turn is refused after the checkout's failure row is already durable.

Strict needs only the workspaces/* directory masks (worker-launcher.ts:726-730). The configuration needs a fallback to strict (a root env symlink, an outside hardlink or a nested mount) plus a writable checkout whose capture fails. Main refuses the same turn, so this is no regression; the PR only falls short of #4486's criterion that the turn is admitted.

Scope

For a strict sandbox, build the failed-checkout masks without the governed-only checks on unrelated live paths. Governed behaviour is unchanged.

Acceptance criteria

  • With a root .env symlink and a checkout whose capture is refused, the strict turn is admitted. The checkout is masked, and the cause appears in the journal's missing.
  • A failed checkout that is itself a symlink or not a directory still refuses.
  • The governed-profile restriction test is unchanged.
  • A mutation receipt shows the new test going red when the strict path re-runs the full resolver.

Blocked by #4486 (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