fix(m3): stop clobbering per-domain scoping and scope Vakra output files to the workspace bundle - #172
fix(m3): stop clobbering per-domain scoping and scope Vakra output files to the workspace bundle#172haroldship wants to merge 3 commits into
Conversation
… bundle evaluate_single_task wrote _vakra/prediction/<domain>.json (and, in GT mode, _vakra/groundtruth/) to the shared benchmarks/m3/results/ directory regardless of experiment. Two concurrent eval.sh runs for different experiments hitting the same domain name could clobber each other's prediction file there, and old runs' files were never cleared. Use bundle_dir/results when a workspace bundle exists (same fallback pattern _finalize_and_save_results already uses), so each named experiment gets its own isolated, self-cleaning directory tree and the files land inside the bundle automatically. Legacy (un-experimented) runs keep the old shared path.
evaluate_single_task re-derived `domains` from m3_data_loader.available_domains(task_id) and unconditionally overwrote the caller's value with the full domain list for the task. That discarded the single-domain narrowing rewrite_config_with_loader_ domains + expand_registry_config already apply upstream specifically so the sequential per-service loop can start one registry per domain. The first call (e.g. domain "address") would then try to walk every domain for the task using only the registry actually started for the first one, so every domain after it had zero tools registered. Observed on cap3-guard-test: address completed fine, then airline failed with "Application 'airline' not found in registry" / "Loaded 0 tools for 'airline'".
|
Warning Review limit reached
On-demand reviews are free for the next 24 days. After that, they cost $0.25 per reviewed file. Or wait 55 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
|
@coderabbitai full review |
|
|
@coderabbitai full review |
|
|
@coderabbitai full review |
|
Summary
Split out of PR #121 into its own issue/PR: #169.
Fixes #169.
Bug 1: domains after the first silently lose all tools in --no-ground-truth mode
evaluate_single_taskre-deriveddomainsfromm3_data_loader.available_domains(task_id)and unconditionally overwrotethe caller's narrowed-down value with the full domain list for the task.
That discarded the single-domain narrowing that
rewrite_config_with_loader_domains+expand_registry_configalreadyapply upstream specifically so the sequential per-service loop can start one
registry per domain.
The first call (e.g. domain "address") completes fine; every domain after
it fails with
Application 'airline' not found in registry/Loaded 0 tools for 'airline', because only the first domain's registry was everstarted. Observed on
cap3-guard-test.Bug 2: Vakra prediction/groundtruth files not scoped per experiment
evaluate_single_taskwrote_vakra/prediction/<domain>.json(and, in GTmode,
_vakra/groundtruth/) to the sharedbenchmarks/m3/results/directory regardless of experiment. Two concurrent
eval.shruns fordifferent experiments hitting the same domain name can clobber each other's
prediction file there, and old runs' files are never cleared.
Changes
domainslist.bundle_dir/resultswhen a workspace bundle exists (same fallbackpattern
_finalize_and_save_resultsalready uses), so each namedexperiment gets its own isolated, self-cleaning directory tree. Legacy
(un-experimented) runs keep the old shared path.
Tests
test_sequential_domain_scoping.py:evaluate_single_taskdoesn'toverride domains from the loader;
--no-ground-truthflag still computedcorrectly.
test_vakra_output_scoping.py: predictions/groundtruth isolated byoutput dir;
evaluate_single_taskuses the bundle-scoped output dir whenpresent.
Test plan for reviewers
uv run --no-sync pytest benchmarks/m3/tests/test_sequential_domain_scoping.py benchmarks/m3/tests/test_vakra_output_scoping.py -v