diff --git a/scripts/tier2/failcount.py b/scripts/tier2/failcount.py index 563e0246..992c49f5 100644 --- a/scripts/tier2/failcount.py +++ b/scripts/tier2/failcount.py @@ -114,11 +114,11 @@ def from_dict(d: dict[str, Any]) -> FailcountState: def _state_dir(track_name: str) -> Path: - base = os.environ.get( - "TIER2_STATE_DIR", - r"C:\Users\Ed\AppData\Local\manual_slop\tier2", - ) - return Path(base) / track_name + env_base = os.environ.get("TIER2_STATE_DIR") + if env_base: + return Path(env_base) / track_name + project_root = Path(__file__).resolve().parents[2] + return project_root / "tests" / "artifacts" / "tier2_state" / track_name def load_state(track_name: str) -> FailcountState: diff --git a/scripts/tier2/write_report.py b/scripts/tier2/write_report.py index f6d41d16..83addcdb 100644 --- a/scripts/tier2/write_report.py +++ b/scripts/tier2/write_report.py @@ -16,10 +16,11 @@ from scripts.tier2.failcount import FailcountState def _failures_dir() -> Path: - return Path(os.environ.get( - "TIER2_FAILURES_DIR", - r"C:\Users\Ed\AppData\Local\manual_slop\tier2_failures", - )) + env_base = os.environ.get("TIER2_FAILURES_DIR") + if env_base: + return Path(env_base) + project_root = Path(__file__).resolve().parents[2] + return project_root / "tests" / "artifacts" / "tier2_failures" def compute_report_path(track_name: str, now: datetime) -> Path: