Skip to content

fix: harden agent tracing and safety - #65

Draft
HarleyCoops wants to merge 6 commits into
mainfrom
agent/fix-agent-safety-config
Draft

fix: harden agent tracing and safety#65
HarleyCoops wants to merge 6 commits into
mainfrom
agent/fix-agent-safety-config

Conversation

@HarleyCoops

@HarleyCoops HarleyCoops commented Aug 10, 2026

Copy link
Copy Markdown
Owner

What changed

  • disable OpenAI Agents SDK tracing per run for both SDK execution paths
  • add meaningful delegation descriptions to all six legacy Gemini ADK agents
  • enable explicit Gemini safety filters for harassment, hate speech, sexually explicit content, and dangerous content at BLOCK_MEDIUM_AND_ABOVE
  • reuse the same safe generation config in the direct google.genai.Client path, which bypasses ADK execution
  • add offline regression coverage using SDK stubs

Root cause

OpenAI Agents SDK tracing defaults to enabled, and both Runner.run_sync calls inherited that default. The Gemini agents omitted both routing descriptions and explicit generation safety settings. The legacy Gemini pipeline also called google.genai.Client directly 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 passed
  • python -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 — passed
  • GitHub smoke workflow — passed
  • GitHub CI workflow — blocked during collection by an unrelated dependency drift: the unconstrained mcp>=1.2 resolved to mcp==2.0.0, which no longer provides mcp.server.fastmcp; no security regression test failed

The CI dependency failure predates and is outside this focused security patch, so the PR remains a draft rather than expanding scope into dependency migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant