1414
1515## Directory Layouts
1616
17- ` runs/official/ ` contains batches with ** three different directory structures** .
17+ ` runs/official/ ` now has a split layout:
18+
19+ - Raw run data (source of truth): ` runs/official/_raw/ `
20+ - Organized symlink views: ` runs/official/csb_sdlc/ ` , ` runs/official/csb_org/ ` , etc.
21+ - Canonical manifest: ` runs/official/MANIFEST.json `
22+
23+ Any scanner that reads run artifacts MUST scan ` runs/official/_raw/ ` (or use
24+ ` scripts/official_runs.py:raw_runs_dir(...) ` ), not top-level ` runs/official/ ` .
25+
26+ Inside the raw root, batches use ** three different directory structures** .
1827Any scanner MUST handle all three or it will under-count results.
1928
2029### Layout 1: Old Promoted Format (pre-2026-02-24)
2130
2231```
23- runs/official/{suite}_{model}_{date}/
32+ runs/official/_raw/ {suite}_{model}_{date}/
2433 baseline/
2534 {suite}_{task_id}_{config_name}/ ← wrapper dir
2635 {trial_dirname}/ ← e.g. sgonly_task-name__AbCdEfG
@@ -40,7 +49,7 @@ Example (historical, from pre-split `csb_sdlc_build` runs): `csb_sdlc_build_haik
4049### Layout 2: Harbor Nested Format (2026-02-24+)
4150
4251```
43- runs/official/{suite}_{model}_{timestamp}/
52+ runs/official/_raw/ {suite}_{model}_{timestamp}/
4453 baseline-local-direct/
4554 {harbor_timestamp}/ ← e.g. 2026-02-26__00-09-23
4655 {task_dirname}/ ← e.g. task-name__AbCdEfG
@@ -57,7 +66,7 @@ runs/official/{suite}_{model}_{timestamp}/
5766### Layout 3: CodeScaleBench-Org / Artifact Format
5867
5968```
60- runs/official/{suite}_{model}_{timestamp}/
69+ runs/official/_raw/ {suite}_{model}_{timestamp}/
6170 baseline-local-direct/ (or baseline-local-artifact)
6271 {harbor_timestamp}/
6372 bl_{TASK_ID}_{hash}__hash/ ← bl_ prefix, uppercase task ID
@@ -191,15 +200,17 @@ def extract_task_id_from_result(data: dict, parent_dir: str, suites: set[str]) -
191200from pathlib import Path
192201
193202# Use rglob to find ALL result.json at any depth
194- for rj in Path(' runs/official' ).rglob(' result.json' ):
203+ from official_runs import raw_runs_dir
204+ raw_root = raw_runs_dir(Path(' runs/official' ))
205+ for rj in raw_root.rglob(' result.json' ):
195206 data = json.loads(rj.read_text())
196207
197208 # 1. Skip batch-level results
198209 if ' task_name' not in data:
199210 continue
200211
201212 # 2. Determine config from PATH COMPONENTS (not from result content)
202- parts = rj.relative_to(official ).parts
213+ parts = rj.relative_to(raw_root ).parts
203214 is_baseline = any (p in BL_NAMES for p in parts)
204215 is_mcp = any (p in MCP_NAMES for p in parts)
205216
@@ -217,6 +228,7 @@ for rj in Path('runs/official').rglob('result.json'):
217228
218229| Mistake | Consequence |
219230| ---| ---|
231+ | Scanning top-level ` runs/official/ ` instead of ` _raw ` | Mixes in organized symlink views and non-run artifacts |
220232| Only checking 2-3 levels deep | Misses Layout 1 (old promoted, 4 levels deep) |
221233| Using ` task_id ` field without checking if it's a dict | Crash or empty string |
222234| Not stripping ` sgonly_ ` prefix from ` task_name ` | No match against selection file |
0 commit comments