Skip to content

ui-server: checkout discovery treats probe failures and out-of-tree gitfiles as non-repositories #4492

Open

Description

@schlessera

Part of #4426. Found in the first independent review of PR #4490, which fixes #4486 and #4487. Line numbers refer to that PR's head 6c7256f8c.

Context

CODE_CHECKOUT_LIST_PROGRAM (packages/ui-server/src/brain/code-change-program.ts:240-261) drops a candidate on any non-zero Git exit, including a signalled child or an I/O error. Its outer FileNotFoundError handler turns a missing Git binary into a successful partial inventory. No probe has its own timeout, so one blocking entry can use up the whole 30 s worker deadline.

listCodeCheckouts (packages/ui-server/src/brain/code-change-worker.ts:51-53) binds only the checkpoint's workspaces/. A valid gitfile that points elsewhere in the brain, such as a submodule using the parent's .git/modules, therefore reads as missing.

In each case the directory falls back to ordinary observation, with no recorded cause.

Scope

Tell "Git says this is not a repository" apart from "the probe couldn't run", and bound each probe. Decide whether gitfiles pointing outside workspaces/ are classified against a wider sealed view or recorded as unsupported.

Acceptance criteria

  • A probe that is signalled, times out or hits an I/O error is recorded as an uncertain checkout with a durable cause, not silently dropped.
  • A missing Git binary fails classification with a named cause instead of returning a partial inventory.
  • One slow candidate can't use the whole discovery deadline.
  • A gitfile that resolves outside workspaces/ but inside the brain gets a receipt or a recorded restriction.

Out of scope

Capture after classification (#4486), masks for a failed checkout (#4491), the .gitignore and worktree release paths (#4493).

Notes for the implementer

The gitfile choice is left to the implementer: either outcome in the last criterion is acceptable. Record which one was chosen, and why, in the PR and a code comment. An uncertain checkout uses the same restriction and durable cause as a failed capture from #4486, so the turn is still admitted.

Verification

Unit tests in packages/ui-server/tests/code-change-receipt.test.ts for each criterion (signalled probe, timed-out probe, I/O error, missing Git, a submodule gitfile into the parent's .git/modules), each failing first; a mutation receipt for the per-probe bound; bun run check:pr --base origin/main; recorded independent review (core package).

Contract impact

None expected. If journal detail or a refusal message shape changes, follow docs/integration-contract.md.

Dependencies

The Git probes in CODE_CHECKOUT_LIST_PROGRAM are introduced by PR #4490. Re-check the citations above on main once it merges.

Blocked by #4486

2026-11-23 triage at main 356fa7d: citations still hold at PR #4490 head c1f7103a1; added exclusions, verification, contract impact and the dependency on #4486; type: bug replaced by type: fix.

Activity

  1. added
    area: ui-server
    priority: p2
    on Nov 23, 2026
  2. added
    type: fix
    blocked
    agent-ready
    and removed on Nov 23, 2026
  3. schlessera commented on Nov 23, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #4486 is closed, so scripts/sync-project.ts is removing the blocked label.

  4. removed
    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

    agent-readyarea: ui-serverpriority: p2type: fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions