Repository navigation
test(codex): tolerate date context after tool results - #615
Open
stamp-build[bot] wants to merge 1 commit into
Open
stamp-build[bot] wants to merge 1 commit into
stamp-build[bot] wants to merge 1 commit into
Conversation
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.
Codex can append a native
environment_contextafter a successful tool result when the UTC date changes. The scripted two-round fixture required the tool result to be the last message and treated that context as a new user turn, causing a provider 404 after both tools had run.Match the latest tool result after the latest non-context user message. Keep the three stages exclusive, restart for a real new user turn, and reject an unrelated latest result even if history or context contains a matching marker. Existing vendor tool-framing assertions remain unchanged.
Validation: five deterministic Responses API fixture tests cover date refresh after either or both results, a normal request, new-turn reset, and stale-marker refusal; the three refresh cases fail on the original fixture. Replaying the original CI request changes the post-refresh response from 404 to 200. The existing real-tool framing case passes for Codex, Claude, Pi SDK and Pi RPC.
CI=1 pnpm run checkpassed (3,146 tests and 18 mock behavior checks); build passed.