Repository navigation
Delete the adapter Prepared path - #498
Merged
Merged
Conversation
Every Run starts through Executor.StartTurn, and read-only preparations are served from the bound local workspace, so the adapter Prepared surface and its registered preparation factories have no production caller. Port the deletion from the agent-outside-sandbox branch with the same shape: delete agent.Prepared, PreparedCancellation, PreparationFactory, Runtime.Preparation, RegisterPreparation and ResolvePreparation, the Codex, Claude SDK and MiniMax Code preparation factories, and the Claude session's unused drain. Adapters declare WorkspaceReadPreparation beside LocalEnvironment and dispatch readies the local preparation directly. Delete the unenforced Runtime initialization network field and bump the protocol version. Delete the Codex one-shot start path (Prepared.start and Session.run), which only tests reached, and port its behaviour tests to Executor.StartTurn. Adapters no longer write the Preparation capability that registration derives. The local read-only preparation holds no resource, so delete its always-nil Close, the preparationState.prepared closer, the read-only cleanup_unconfirmed retry path and the handoff branches that executor-less preparations never reach.
The read-only preparation holds no resource, so its release only drops ownership. Drop it in the same state change instead of a cleanup goroutine behind the busy flag, and delete closePreparationResource and the shutdown close loop. A preparation that is still publishing its readiness keeps ownership until that returns, as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every Run starts through
Executor.StartTurn, and dispatch serves read-only workspace preparation from the local workspace directory, so the adapter Prepared path had no production caller. This deletes it and the dead code it kept alive.Delete the adapter Prepared path (ports the agent-outside-sandbox commit 91007ef with its shape unchanged)
agent.PreparationFactory,Prepared,PreparedCancellation,Runtime.Preparation,Runtime.WorkspaceReadPreparation, andRegistry.RegisterPreparation/ResolvePreparation.WorkspaceReadPreparationbesideLocalEnvironment. Dispatch gates read-onlyexecution_prepareon that declaration and readies the preparation itself.harness-onboarding.mdstates when to declare it.Prepared.start/Session.runpath andclaimed. Their recovery, required-MCP and MCP-preflight tests now run throughStartTurn.networkfield. Core always sentenabled, and the Runtime checked it but never enforced it.proto.Versiongoes to 0.13.0, so a 0.12 Runtime is rejected at connect instead of failing initialization.localDirectoryPreparation, whoseClosealways returned nil, along withpreparationState.preparedand the read-onlycleanup_unconfirmedretry branch.caps.Preparationwrites thatRegisterKindalready derives.Settle read-only preparation release synchronously
closePreparationResource, the shutdown close loop and the deadownsclause in the publish guard.releasedcarries one revision fewer, because no unpublished intermediate revision exists any more.Blind review: no blockers. The two should-fix items (the test-only codex start path, and documenting
WorkspaceReadPreparation) and the nits are fixed here.Checks:
go build ./...(plus windows/darwin for./apps/daemon/...); module-wide vet.go testfor agent, dispatch (-race; read-only status tests at-race -count=200), localworkspace, cli, wireconformance,internal/agentdaemon, execution and runtimegateway.make check-runtime-contract check-harness-catalog check-docs,check-names.py, and the translation test.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.