Skip to content

fix(testing): keep duration cache repo-relative - #51900

Open
lin-hongkuan wants to merge 1 commit into
NousResearch:mainfrom
lin-hongkuan:fix/run-tests-duration-cache-relative
Open

fix(testing): keep duration cache repo-relative#51900
lin-hongkuan wants to merge 1 commit into
NousResearch:mainfrom
lin-hongkuan:fix/run-tests-duration-cache-relative

Conversation

@lin-hongkuan

Copy link
Copy Markdown
Contributor

Summary

  • keep scripts/run_tests_parallel.py duration-cache writes limited to repo-local test files
  • skip new timings for files outside the checkout, such as absolute temp probe paths
  • prune stale POSIX and Windows absolute-path keys when rewriting test_durations.json

Testing

  • ./venv/Scripts/python.exe -m pytest tests/test_run_tests_parallel.py::test_duration_cache_skips_paths_outside_repo tests/test_run_tests_parallel.py::test_duration_cache_drops_stale_absolute_keys -q
  • ./venv/Scripts/python.exe -m pytest tests/test_run_tests_parallel.py -q
  • ./venv/Scripts/python.exe scripts/check-windows-footguns.py --all

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation labels Jun 24, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused cache-portability fix. Current main still writes duration keys via _format_file() in scripts/run_tests_parallel.py:500; that helper returns the absolute input after a failed relative_to() at scripts/run_tests_parallel.py:360-363. The existing external probe path in tests/test_run_tests_parallel.py:81-150 makes this reachable.

The PR correctly keeps display formatting unchanged while introducing a cache-specific repo-relative key, filters both POSIX and Windows absolute legacy keys, and adds direct coverage for both behaviors. GitHub currently reports the PR mergeable despite its old base.

Automated hermes-sweeper review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants