Repository navigation
Own native HTTP deadlines, interruption, and private response bytes - #253
Merged
Merged
Conversation
Co-authored-by: GPT-6 <gpt-6@openai.com>
Co-authored-by: Codex (GPT-6) <codex@openai.com>
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.
Native Coworld requests must preserve received bytes and finish owned cleanup before an interrupted engine seals its private episode. Curly streaming calls reset timeout behavior after initial data and hide some interrupted response bytes.
This adds synchronous libcurl transport with one absolute monotonic deadline, typed completion/deadline/interruption/failure results, exact header/body bytes, and actual transfer/status/latency evidence. SIGTERM/SIGINT and owned cleanup share an allocation-free irreversible stop flag. The game still owns provider parsing, identity validation, action acceptance, and private trajectory sealing.
Private attempt records add nullable
response_body_b64,response_headers_b64,response_complete, andhttp_status. Strict wire readers validate canonical base64 and raw-response byte equality. Existing shipped evidence without these new fields stays explicitly unobserved; current writers emit all four. Scripted teacher fixtures carry no serving metadata.Validation: remote Zephyrus, pinned Nim 2.2.4, bounded 2 CPU/2 GiB/180-second owned unit. Fourteen trajectory tests passed. Six real credential-free HTTP fixtures passed: complete binary body, empty 200, incomplete UTF8 body, headers without body, no received response, and SIGTERM during an owned request. Reusing an expired deadline or stopped process starts no second request. CI runs these fixtures with libcurl development headers.
Proof:
/tmp/coworld-bitworld-native-httpon Zephyrus, unitcoworld-bitworld-native-http-cpu-v5inactive/exit 0; native-http.log, trajectory.log, build-probe.log preserved. Earlier failing compiler and transport iterations remain archived.This is a shared transport boundary. Game integration, interrupted episode sealing, authenticated model receipts, and production deployment remain separate required gates. No provider calls, releases, physics changes, or public replay metadata are included.