Repository navigation
Delete the adapters' test-only paths - #506
Merged
Merged
Conversation
Every Codex Turn is a Session built by Executor.StartTurn, so the Session-without-Executor branches ran only in tests: Cancel's cancelNativeWork path and the executor guards in emitTerminalFailure, beginOperation/endOperation and onServerRequest. Delete them with the executor marker field, the bare-Session cancellation tests that encoded their semantics, and the Session part of the RPC close test. Prepared only lived until newExecutor took it on the same call, so fold it into Executor: newExecutor prepares the base Session and plan directly, preparation failure releases them in place, and the owner watcher that only ran before the immediate transfer goes with TestPreparedCloseWaitsForOwnerCleanup. Inline startNative into StartTurn and delete session_run.go. The subagent cancellation, blocked steering and readiness cancellation tests now run on the Turn path. Delete Claude's test-only prepare and startRequest.Input, which only prepare set; executor_prepare never carries input. Its tests call prepareConfiguration, the factory's option path, and the Test*Factory* tests are named after the Turn behavior they check.
PrepareExecutor returned newExecutor's nil *Executor as a non-nil agent.Executor when preparation was rejected before any resource existed, such as a read-only or structured-output request. The daemon then kept it as the native Executor and its cleanup called Close on a nil receiver. Return a nil interface, and test read-only rejection through the factory.
No deployment, image or script sets OAC_RUNTIME_CODEX_HARNESS_BIN, so the local Environment declaration never read a value from it.
The Turn Cancel can send turn/interrupt before settlement closes the client, and settlement does not wait for that reply. The observation fixture's server could then persist history after the test removed its temporary home. Cleanup now waits for the server goroutine.
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.
This lane deletes the Codex and Claude SDK adapters' test-only paths (the adapter part of main's J audit) and one unset override.
Codex
Cancel/cancelNativeWorkpath and thes.executorguards. Production builds every Turn with its Executor. Deletes their bare-Session tests.PreparedintoExecutor, which dropswatchOwner, and inlinesstartNativeintoStartTurn.*Executorinside a non-nil interface, and dispatch's cleanup panicked on it.PrepareExecutornow returns a nil interface, and a regression test covers it.OAC_RUNTIME_CODEX_HARNESS_BIN, which nothing sets (audit 40-C6).Claude
prepareandstartRequest.Input. Tests now use the productionprepareConfigurationpath.Test*Factory*tests after what they check.Test fixes
drainEnvelopesnow stops when the output channel closes, instead of looping forever.Net change: 39 files, +193/−766.
Local checks:
gofmtis clean.go vetpasses for linux, darwin and windows.agent/codex,agent/claudesdk,agentand the dispatch Codex/Claude tests.-race -count=50passes on the changed concurrent tests, and-count=200on the timing test the lane fixed.make check-names check-docs check-cipass.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.