Skip to content

Delete the unprepared prompt request - #473

Merged
SaladDay merged 1 commit into
mainfrom
refactor/delete-prompt-request
Oct 7, 2026
Merged

SaladDay merged 1 commit into
mainfrom
refactor/delete-prompt-request

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Core starts every Run with execution_prepare and then execution_start. Both callers of Dispatcher.deliver already passed a prepared handle, so the unprepared prompt_request path was unreachable. This deletes it end to end.

Core–Runtime protocol

  • Deletes the prompt_request message and its rows in docs/runtime-protocol.md and the zh mirror.
  • PromptRequestPayload is now only the execution_prepare configuration. The ConversationID field is deleted, since nothing read it.
  • ReleaseOnCompletion is deleted in favor of WorkspaceReadOnly, which always carried the same value.
  • validateExecutionEnvironment now owns the exactly-one local_environment / disable_execution_environment rule. Drop unsent Harness options and reject prompts without an environment #468 placed it beside that function only because prompt_request fixtures sent neither.
  • The done row now describes the prepared ordering: native settlement, then the in-flight receipt send.

Daemon: deletes dispatch/prompt.go, output.go, the retained idle-session pool, releaseCompletedSession, finishSteering, emitTerminalError, and the unprepared branches in cancel, shutdown, suspend, workspace write and runtime preparation. Executor idle expiry is unchanged.

Core: deliver requires the prepared handle.

Tests

  • Dispatch tests that asserted live behavior now run through prepare/start: steering, cancellation, receipts, function tools, MCP HTTP, interactions, suspend, shutdown and workspace.
  • Deleted: tests that covered only prompt_request, and one timing-racy idle test whose guard is covered deterministically elsewhere.
  • One dropped clause: "native release waits for the receipt". The prepared design settles natively first, and TestPreparedHandoffReleaseWaitsForMutationReceipt asserts that ordering.

Checks

  • gofmt, build, vet (./apps/daemon/... ./internal/... ./services/core/...)
  • dispatch with -race -count=2
  • focused tests for transport, agentdaemon, execution, runtimegateway, localworkspace, the agents, cli and wireconformance
  • the 14 touched integration tests against a test DB
  • make check-runtime-contract, check-names, translations

Blind review: no blockers. Its fixes are in this commit. Two follow-ups get their own PRs: deleting the direct-call Harness factory (Runtime–Harness protocol) and a Shutdown flake that already occurs on main.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Core starts every Run through execution_prepare and execution_start, so
the prompt_request frame, its daemon path and Core's unprepared delivery
branch had no caller.

- Delete proto.TypePromptRequest and its protocol rows; the daemon drops
  the frame as an unknown type. PromptRequestPayload stays as the
  execution_prepare configuration.
- Delete the daemon prompt path (prompt.go, output.go, the retained idle
  session pool, the completion barrier and the unprepared cancel and
  shutdown branches). A Run's session is now an agent.Turn, so durable
  steering support is enforced by type.
- Core deliver takes the prepared handle, Run ID and input explicitly.
- Delete ConversationID and ReleaseOnCompletion; WorkspaceReadOnly alone
  marks a read-only preparation.
- validateExecutionEnvironment owns the exactly-one local_environment /
  disable_execution_environment rule.
- Port the dispatch tests that cover behavior execution_start keeps to
  shared execution_prepare/execution_start helpers.
@SaladDay
SaladDay merged commit e60d8ff into main Oct 7, 2026
20 checks passed
@SaladDay
SaladDay deleted the refactor/delete-prompt-request branch October 7, 2026 08:35
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