fix: harden agent tracing and safety - #65
Draft
HarleyCoops wants to merge 6 commits into
Draft
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.
What changed
BLOCK_MEDIUM_AND_ABOVEgoogle.genai.Clientpath, which bypasses ADK executionRoot cause
OpenAI Agents SDK tracing defaults to enabled, and both
Runner.run_synccalls inherited that default. The Gemini agents omitted both routing descriptions and explicit generation safety settings. The legacy Gemini pipeline also calledgoogle.genai.Clientdirectly with only a system instruction, so configuring the ADK agent alone would not have protected the actual pipeline request.Impact
Agent prompts, outputs, and tool data are no longer exported through default OpenAI tracing in these execution paths. Gemini delegation metadata is explicit, and all Gemini requests made by this pipeline use an explicit, consistent content-filter policy.
Validation
python -m unittest -v tests.test_agent_security_configuration— 3 passedpython -m py_compile archive/codex-pipeline/math_to_manim/agents/base.py legacy/Math-To-Manim/Gemini3/src/agents.py legacy/Math-To-Manim/Gemini3/src/pipeline.py tests/test_agent_security_configuration.py— passedsmokeworkflow — passedCIworkflow — blocked during collection by an unrelated dependency drift: the unconstrainedmcp>=1.2resolved tomcp==2.0.0, which no longer providesmcp.server.fastmcp; no security regression test failedThe CI dependency failure predates and is outside this focused security patch, so the PR remains a draft rather than expanding scope into dependency migration.