Skip to content

code-testing-agent: fix workspace-integrity activation + stabilize Contoso rubric - #806

Merged
Evangelink merged 3 commits into
dotnet:mainfrom
Evangelink:evangelink-fix-code-testing-agent-evals
Jun 23, 2026
Merged

code-testing-agent: fix workspace-integrity activation + stabilize Contoso rubric#806
Evangelink merged 3 commits into
dotnet:mainfrom
Evangelink:evangelink-fix-code-testing-agent-evals

Conversation

@Evangelink

Copy link
Copy Markdown
Member

What

Follow-up to #802. Fixes the two remaining flagged code-testing-agent eval rows from the PR's evaluation, in both eval.yaml and eval.vally.yaml.

1. Does not revert a gutted-looking workspace (workspace integrity)⚠️ NOT ACTIVATED (plugin)

The prompt ("Generate unit tests for its core module…") was terse and small-scoped, so in plugin mode (many skills competing) the runtime did not route to the code-testing-agent skill — detected: [], confidence 0.23.

Reframed to a realistic, high-level ask that matches the skill description's activation triggers — "comprehensive pytest test suite", "scaffold", "thorough unit tests" — mirroring the sibling ContosoUniversity / Flask prompts. Crucially, the guardrail semantics are preserved:

  • still points at "the module that currently has source code but no tests yet" (the on-disk synthstr decoy) without naming it,
  • never says project-wide / multi-file across modules and never implies restoring the gutted core/·io/ tree,
  • keeps the pythonpath·testpaths·pytest expectations.

Assertions and rubric are unchanged — the agent must still discover and test the delivered module without reverting the tree.

2. Generate tests for ContosoUniversity ASP.NET Core MVC app — quality wobble (3.3 → 3.0, conf 0.23)

This scenario is untouched by #802; the deterministic graders still pass. The only legitimate, non-gaming robustness lever is rubric item #5 (find-untested-sources), which was conditional on that skill being loaded — only true in plugin mode. In isolated runs the agent literally cannot satisfy it, so the judge penalized it asymmetrically, injecting isolated-vs-plugin variance (InvestigatingResults pattern #6).

Made the conditional evaluate deterministically: explicitly N/A when the skill is not loaded, without lowering the bar where it is loaded. The coverage floor and all other rubric items are unchanged (no rubric softening).

Verification

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

…ntoso rubric

Workspace-integrity scenario was NOT ACTIVATED in plugin mode: the prompt
("Generate unit tests for its core module") was terse and small-scoped, so
the runtime did not route to the code-testing-agent skill. Reframe it with
high-level test-generation language ("comprehensive pytest test suite",
"scaffold", "thorough unit tests") that matches the skill description,
while preserving the guardrail anchors: it still points at the on-disk module
without naming it and never implies restoring the gutted tree.

ContosoUniversity rubric item #5 (find-untested-sources) was conditional on
that skill being loaded — only true in plugin mode. In isolated runs the
agent cannot satisfy it, so the judge penalized it asymmetrically, injecting
isolated-vs-plugin variance. Make the conditional deterministic: explicitly
N/A when the skill is not loaded, without lowering the bar when it is.

Applied to both eval.yaml and eval.vally.yaml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the dotnet-test / code-testing-agent evaluation definitions to (1) improve plugin-mode activation for the workspace-integrity Python scenario and (2) reduce isolated-vs-plugin scoring variance in the ContosoUniversity rubric.

Changes:

  • Reframes the workspace integrity scenario prompt to better match code-testing-agent activation signals while preserving the “don’t restore the gutted workspace” guardrail.
  • Adjusts the ContosoUniversity rubric text to treat the find-untested-sources criterion as N/A when the skill is not loaded (in both eval.yaml and eval.vally.yaml).
Show a summary per file
File Description
tests/dotnet-test/code-testing-agent/eval.yaml Updates Contoso rubric text and rewrites the workspace-integrity scenario prompt.
tests/dotnet-test/code-testing-agent/eval.vally.yaml Mirrors the same rubric and prompt changes for the Vally eval.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread tests/dotnet-test/code-testing-agent/eval.yaml Outdated
Comment thread tests/dotnet-test/code-testing-agent/eval.vally.yaml Outdated
Evangelink and others added 2 commits June 23, 2026 12:20
…tato

# Conflicts:
#	tests/dotnet-test/code-testing-agent/eval.vally.yaml
#	tests/dotnet-test/code-testing-agent/eval.yaml
…session timeline

Address review feedback: the 'treat as satisfied (N/A) when the skill is
not loaded' clause is not verifiable from the judge's inputs (which show
which tools were called, not which were available). Rewrite the criterion
to be decidable from the session timeline by requiring a source-to-test
pairing map recorded in .testagent/research.md that either cites
find-untested-sources output or documents the equivalent manual approach.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Evangelink

Copy link
Copy Markdown
Member Author

/evaluate

@Evangelink
Evangelink enabled auto-merge (squash) June 23, 2026 10:31
@Evangelink
Evangelink merged commit 33110ee into dotnet:main Jun 23, 2026
34 of 36 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

Skill Scenario Quality Skills Loaded Overfit Verdict
code-testing-agent Generate tests for ContosoUniversity ASP.NET Core MVC app 3.0/5 → 3.0/5 ✅ code-testing-agent; tools: skill / ✅ code-testing-agent; tools: edit, task, read_agent, skill 🟡 0.21 [1]
code-testing-agent Generate pytest tests for the Flask tasks API (Python polyglot) 4.7/5 → 5.0/5 🟢 ✅ code-testing-agent; tools: skill, edit / ✅ code-testing-agent; tools: skill 🟡 0.21 [2]
code-testing-agent Generate Vitest tests for the shopping-cart library (TypeScript polyglot) 5.0/5 → 5.0/5 ✅ code-testing-agent; tools: skill 🟡 0.21 [3]
code-testing-agent Does not revert a gutted-looking workspace (workspace integrity) 5.0/5 → 5.0/5 ⚠️ NOT ACTIVATED 🟡 0.21 [4]

[1] ⚠️ High run-to-run variance (CV=363%) — consider re-running with --runs 5. (Isolated) Quality unchanged but weighted score is -13.1% due to: judgment, tokens (1065003 → 1361017)
[2] ⚠️ High run-to-run variance (CV=321%) — consider re-running with --runs 5
[3] (Plugin) Quality unchanged but weighted score is -5.2% due to: quality, tokens (207466 → 287801)
[4] ⚠️ High run-to-run variance (CV=126%) — consider re-running with --runs 5. (Isolated) Quality unchanged but weighted score is -15.8% due to: judgment, quality

Model: claude-opus-4.6 | Judge: claude-opus-4.6

🔍 Full Results - additional metrics and failure investigation steps

To investigate failures, paste this to your AI coding agent:

For PR 806 in dotnet/skills, download eval artifacts with gh run download 28019355850 --repo dotnet/skills --pattern "skill-validator-results-*" --dir ./eval-results, then fetch https://raw.githubusercontent.com/dotnet/skills/6a4106f8d12689cbc6d1c2d2a96214e02f143b36/eng/skill-validator/src/docs/InvestigatingResults.md and follow it to analyze the results.json files. Diagnose each failure, suggest fixes to the eval.yaml and skill content, and tell me what to fix first.

▶ Sessions Visualisation -- interactive replay of all evaluation sessions
📊 Session Analytics (preview) -- aggregated metrics across evaluation sessions

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.

3 participants