Skip to content

ui-server: the deferral ambiguity latch misses refused-route requests, overlap outside a boundary and reused call IDs #4427

Open

Description

@schlessera

Part of #4278. Deferred from the second review of PR #4395 (#4292).

Context

The deferral latch immediateOnly is set in only three places, and three cases escape it:

  • A request on a wrong method or an unauthorized route returns before an operation exists (packages/ui-sdk/src/server/inference-relay.ts:120-121). It is answered during an armed window and never reaches requestStarted.
  • Overlap is detected only while a boundary is deferred or claimed (packages/ui-server/src/brain/turn-journal.ts:614-618).
  • A call entry is deleted on its result, so a reused ID reads as new (turn-journal.ts:742, :759).

No ruled guarantee breaks today: each boundary still needs zero operations at arming, one new request and an exact body match.

Scope

Decide per case whether it latches. Measure the eligibility cost of latching on overlap before adopting it. No change to the observation schedule.

Acceptance criteria

  • Any relay request during an armed window, on any route, claims the boundary before its answer is written, with a test.
  • A call ID seen earlier in the turn never arms, with a test.
  • Overlap outside a boundary either latches, or is recorded as a documented no with eligible-request counts from the native fixture.

Activity

  1. added
    type: fix
    area: ui-server
    priority: p3
    agent-ready
    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-readyarea: ui-serverpriority: p3type: fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions