Skip to content

Eval-contamination guard does not cover tool descriptions or parameter schemas #1932

Closed

Description

@malibio

Summary

guidance_is_not_contaminated_by_eval_prompts (packages/agent/src/agent_guidance.rs:298) guards model-facing guidance against absorbing eval-scenario text. Its corpus does not include tool descriptions or parameter-schema descriptions, so text in that channel is unguarded.

guidance_corpus() (agent_guidance.rs:157-194) enumerates:

  • SCHEMA_CREATION_RULES, TOOL_STRATEGY_RULES, NODE_REFERENCE_FORMAT
  • skill_rules::SCHEMA_RULES / INTERACTION_RULES imperatives
  • seed_skill_nodes() markdown
  • seed_agent_guidance_nodes() markdown

all_tool_definitions() and the def_* description strings are absent.

Why this matters now

ADR-064 rule 1 assigns argument shape to tool schemas, with measured 100% compliance versus prose that does not repair shape. The doctrine therefore actively pushes model-facing instructional text into the one channel this guard cannot see, and each such change is unguarded by default.

The guard's fixture side already enumerates dynamically, with an explicit anti-goal recorded in its own doc comment:

a hand-maintained list is exactly how the earlier version of this guard missed a contaminated file

The corpus side is still hand-listed and now has a real hole.

Proposed fix

Extend guidance_corpus() to include, for every entry in all_tool_definitions():

  • the tool description
  • each parameters_schema property description string

Deriving these from the registry function keeps coverage automatic for tools added later — the same property the fixture-side enumeration already has.

Note

Not a live contamination report. This was surfaced while reviewing PR #1931, whose def_update_node wording was checked manually and passes (longest shared run with the scenario-6 prompt is 2 words, against MAX_SHARED_RUN = 4), and its example key was subsequently changed to one drawn from outside the eval. The gap is structural: nothing would have failed had it not passed.

Related: #1927 (where this surfaced), ADR-064.

Activity

  1. malibio commented on Aug 3, 2026

    @malibio
    CollaboratorAuthor

    Baseline on worktree issue-1932-tooldesc-contamination-guard — Frontend: 172 test files passed, 4112 tests passed (49.5s).

  2. self-assigned this
    on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions