Skip to content

Unify run dir enumeration for tracer listing and resolve#147

Merged
AlexanderOnischenko merged 3 commits intocodex/refactor-makefile-help-sectionsfrom
codex/implement-unified-run_dir-enumeration-mechanism
Feb 1, 2026
Merged

Unify run dir enumeration for tracer listing and resolve#147
AlexanderOnischenko merged 3 commits intocodex/refactor-makefile-help-sectionsfrom
codex/implement-unified-run_dir-enumeration-mechanism

Conversation

@AlexanderOnischenko
Copy link
Owner

Motivation

  • Fix disparity between history-based case runs and filesystem scans so tracer listing tools show a consistent, unified view of runs.
  • Normalize historical run_dir values (absolute, repo-relative, DATA_DIR-relative, and .runs/... suffixes) to avoid missed matches.
  • Auto-detect nested runs roots (e.g. .runs/runs/runs) and preserve history-only entries in listings with clear status flags like missing_on_disk.

Description

  • Introduce inventory types and helpers: RunDirInventory, HistoryRunDir, CaseRunListing and functions _load_history_entries, _normalize_history_run_dir, _detect_runs_roots, _iter_fs_run_dirs, and _collect_run_dir_inventory in src/fetchgraph/tracer/resolve.py to merge history and FS sources.
  • Add list_case_run_listings to produce listings that include history-only entries and new statuses (missing_on_disk, missing_case_dir, missing_events, tag_mismatch, missed), and make scan_case_runs history-aware when ordering results.
  • Update CLI in src/fetchgraph/tracer/cli.py to use the new listing path for --list-matches and to expand --print-resolve output with runs_root_cli, runs_root_effective, history_path and counts (history vs fs) including warnings when history entries are missing on disk.
  • Add tests in tests/test_tracer_run_dir_inventory.py covering relative history path normalization, nested runs root discovery, and reporting of history entries missing on disk.

Testing

  • Ran pytest -q tests/test_tracer_run_dir_inventory.py and all tests passed (3 passed).
  • The new tests validate relative history path normalization, nested runs_root scanning and missing_on_disk reporting and succeeded.

Codex Task

@AlexanderOnischenko AlexanderOnischenko merged commit 163c4d7 into codex/refactor-makefile-help-sections Feb 1, 2026
@AlexanderOnischenko AlexanderOnischenko deleted the codex/implement-unified-run_dir-enumeration-mechanism branch February 1, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant