Skip to content

fix(server): reject HTTP turn bootstrap clearly - #8633

Open
yashranaway wants to merge 2 commits into
pingdotgg:mainfrom
yashranaway:typed-http-bootstrap-errors
Open

fix(server): reject HTTP turn bootstrap clearly#8633
yashranaway wants to merge 2 commits into
pingdotgg:mainfrom
yashranaway:typed-http-bootstrap-errors

Conversation

@yashranaway

@yashranaway yashranaway commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • add a dedicated HTTP orchestration command schema
  • exclude WebSocket-only turn bootstrap metadata from the HTTP contract
  • reject bootstrap requests during payload validation instead of in the handler
  • cover the HTTP schema boundary with an authenticated integration test

Why

The HTTP endpoint advertised the full WebSocket command contract even though bootstrap execution only exists on the WebSocket route. A transport-specific command schema keeps support decisions in the contract and avoids a growing list of handler conditionals.

Closes #8319.

Testing

  • vp test run apps/server/src/server.test.ts --testNamePattern="rejects WebSocket-only turn bootstrap at the HTTP schema"
  • vp test run packages/contracts/src/environmentHttp.test.ts
  • vp lint packages/contracts/src/orchestration.ts packages/contracts/src/environmentHttp.ts apps/server/src/orchestration/http.ts apps/server/src/server.test.ts
  • vp run --filter @t3tools/contracts typecheck
  • vp run --filter t3 typecheck

Checklist

  • HTTP transport support is represented in contracts
  • WebSocket bootstrap behavior is unchanged
  • targeted tests, lint, and typechecks pass
  • rebased onto latest upstream main

Model: GPT-5.6 Sol
Harness: Codex in T3 Code

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cb7dfb64-4715-4d8f-969f-2a931fbf6c48

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 29, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 29, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 3237dfa

Macroscope's review found this PR approvable — This is a narrow server validation fix that cleanly separates HTTP commands from WebSocket-only bootstrap commands and preserves existing valid request paths. The regression test verifies that unsupported HTTP bootstrap requests fail with a clear 400 response.

You can add or adjust custom eligibility rules. Learn more.

Comment thread apps/server/src/orchestration/http.ts Outdated
Effect.fn("environment.orchestration.dispatch")(function* (args) {
yield* annotateEnvironmentRequest(args.endpoint.name);
yield* requireEnvironmentScope(AuthOrchestrationOperateScope);
if (args.payload.type === "thread.turn.start" && args.payload.bootstrap !== undefined) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the wrong layer to do this in. there's prob many commands that are not handled over HTTP, a big inline if statement for each is not scalable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved HTTP transport support into a dedicated command schema so the handler no longer needs transport-specific conditionals.

@yashranaway
yashranaway force-pushed the typed-http-bootstrap-errors branch from 6a38fad to 3237dfa Compare August 29, 2026 06:49
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 29, 2026 06:49

Dismissing prior approval to re-evaluate 3237dfa

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP dispatch accepts bootstrap on thread.turn.start but only the WS route implements it, yielding an untyped 500

2 participants