Runner: sidecar oversized Codex tool results#65
Open
gaofeng21cn wants to merge 1 commit intoResearAI:mainfrom
Open
Runner: sidecar oversized Codex tool results#65gaofeng21cn wants to merge 1 commit intoResearAI:mainfrom
gaofeng21cn wants to merge 1 commit intoResearAI:mainfrom
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.
Problem
Large Codex
runner.tool_resultevents can bloat quest event logs and consume follow-up context. The runner also had no durable telemetry for prompt/tool-result byte budgets or compacted result counts.Solution
evidence_packetshelper that writes oversized tool-result payloads to quest-local.ds/evidence_packets/<run_id>/sidecars.runner.tool_resultevents parseable by replacing oversized output with a compact JSON packet containing path, hash, payload bytes, summary, and key blockers.MDS provenance
Adapted the generic context-budget parts of MedDeepScientist commits
793ff56andb911a53. MedDeepScientist, MAS, medical-fork, manuscript-readiness, and publication-authority semantics were intentionally excluded.Tests
python -m py_compile src/deepscientist/evidence_packets.py src/deepscientist/runners/codex.pygit diff --checkuv run pytest -q tests/test_codex_runner.py::test_codex_tool_event_preserves_parseable_bash_exec_payload_and_metadata tests/test_codex_runner.py::test_codex_tool_event_truncates_oversized_bash_exec_log_but_keeps_json_parseable tests/test_codex_runner.py::test_codex_compacts_extreme_tool_result_payload_before_event_write tests/test_codex_runner.py::test_codex_runner_sidecars_oversized_tool_result_event tests/test_codex_runner.py::test_codex_runner_leaves_normal_tool_result_event_parseable tests/test_codex_runner.py::test_codex_runner_writes_tool_result_telemetry_and_sidecar