Skip to content

feat(server): refuse a reserved launch whose Linear reservation changed before the provider opens (CLO-1269) - #251

Open
nullStack65 wants to merge 2 commits into
release/native-0.1.10from
infra/feeder-reservation-gate
Open

nullStack65 wants to merge 2 commits into
release/native-0.1.10from
infra/feeder-reservation-gate

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

Summary

A launch that carries a Linear reservation is read again at the provider-turn start, before the provider session opens, and refused when the reservation is no longer intact. This is the worker-entry gate from the feeder claim contract (CLO-1269, comment d712fa49), rule 3: immediately before the worker acts, it reads the issue again and requires the same reservation byte for byte.

  • The reservation rides on the launch's first message, from the t3_thread_launch parameter through the thread.create and message.dispatch commands into the stored message. A launch placed on another environment forwards the same tool params, and a restart replays the same provider-turn.start outbox effect, so the one check inside ProviderTurnStartService.start covers a local launch, a placed launch, and a restart.
  • Intact means the live issue identifier matches, there is no assignee, the state is not Done or Canceled, and the delegate id is unchanged. A person assigning the issue, finishing or canceling it, or changing the delegate refuses the turn before providerSessions.open.
  • A reservation that cannot be read, or a reserved launch with no reader configured, is refused rather than started unverified. A launch with no reservation is unchanged.
  • The live read is a configured command (reservationReadCommand) that prints the issue JSON. The fork adds no Linear client. The feeder's own reads and the reservation itself stay in closura-agent-config and are not touched here.

No client binary is copied and the k3s install is not run.

Test plan

  • ReservationGate.test.ts: intact, assignee present, Done, Canceled, changed delegate, removed delegate, mismatched identifier, a failed read, and a malformed read (9 cases).
  • ProviderTurnStartService.test.ts: a changed reservation settles the run with the refusal title and never calls startRootRun; an empty reader command refuses; a launch with no reservation is not gated.
  • effect-tsgo tsrs --noEmit clean for packages/contracts and apps/server.
  • vp fmt and vp lint clean on the changed files under Node 26.

🤖 Generated with Claude Code

…ed before the provider opens (CLO-1269)

A launch that carries a reservation is read again at the provider-turn
start, before the session opens, and refused when a person has assigned
the issue, moved it to Done or Canceled, or the delegate changed. A
placed launch and a restart both replay the same provider-turn.start
effect, so the one check covers them. A launch with no reservation is
unchanged, and a reservation that cannot be read is refused rather than
started unverified.

Co-Authored-By: Claude Code <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

t3_launch_outcome reports whether a launch keyed by clientRequestId was
accepted, the thread and run it produced, and whether that run reached a
terminal state. It reads the accepted thread.create receipt through the
threads service and the run whose message is the launch command, and it
never calls the provider or creates a thread. Naming the environmentId the
launch acknowledgement carried follows the receipt there instead of assuming
it is local, and a receipt read that fails is a failure rather than an
unknown outcome.

The pre-commit hook's knip check fails on files already unused on the base,
so this commit was made with the hook path disabled after fmt and lint were
run by hand.

Co-Authored-By: Claude Code <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant