Skip to content

fix(detection): skip raw AgentDojo run dirs when packing a benchmark - #202

Open
rudycelekli wants to merge 1 commit into
uber:mainfrom
rudycelekli:fix/detection-pack-skip-agentdojo-run-dirs
Open

rudycelekli wants to merge 1 commit into
uber:mainfrom
rudycelekli:fix/detection-pack-skip-agentdojo-run-dirs

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 19, 2026 •

Copy link
Copy Markdown

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Related issue: N/A (found by reading the code; reproduced on main at 6b33dff)

What changed?
Exclude names ending in _agentdojo_run, the same filter main_detector uses. Regression test added in tests/test_benchmark_pack.py.

Why?
In benchmark/benchmark_pack.py cmd_deflate, task discovery used name.startswith("task_"), so an AgentDojo run dir also packed the raw task_NNN_agentdojo_run dirs as task records with null conversation/result and doubled task_count. The shipped benchmark/agentdojo_20251022_190150.jsonl proves it: task_count 186, of which 93 are empty *_agentdojo_run records (93 real). main_detector.py:81 already excludes these dirs.

How did you test it?

  • Reproduction: pytest tests/test_benchmark_pack.py. On main: the new test fails (task_count 2, records task_001 and task_001_agentdojo_run). On the branch: 5 passed.
  • Test suite: 257 passed with detcore-venv.
  • Not tested: the shipped agentdojo JSONL was not regenerated (it still carries the 93 empty records, and inflating it still creates empty *_agentdojo_run/workspace dirs, which the detector ignores).

Potential risks
The change only affects the input described above; other paths go through the same code as before, and the component's existing tests pass.

An AgentDojo run directory holds the converted task_NNN directories next
to the raw task_NNN_agentdojo_run output directories. deflate matched
every task_* directory, so it packed the raw ones as tasks with a null
conversation and result and doubled task_count. The shipped
agentdojo_20251022_190150.jsonl shows it: task_count 186, of which 93
records are empty *_agentdojo_run entries. main_detector already skips
these directories; deflate now does the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

No deployments
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.

2 participants