diff --git a/analysis/events_to_cumulative.py b/analysis/events_to_cumulative.py index 161c66b..268bbbf 100644 --- a/analysis/events_to_cumulative.py +++ b/analysis/events_to_cumulative.py @@ -20,7 +20,7 @@ # per-round prefix so zero-event seeding produces one entry per round instead of # collapsing every round into a single "unknown" run. Mirrors analyze.py. MATRIX_RUN_PREFIX_RE = re.compile(r"^(?P.*logs\.zip)-(?P.+)$") -IGNORED_LOG_FILENAMES = {"runner_commands.log"} +IGNORED_LOG_FILENAMES = {"foundry_showmap.log", "runner_commands.log"} def die(msg: str) -> None: diff --git a/analysis/tests/test_analyze_log_filtering.py b/analysis/tests/test_analyze_log_filtering.py index eb9793e..962a4d4 100644 --- a/analysis/tests/test_analyze_log_filtering.py +++ b/analysis/tests/test_analyze_log_filtering.py @@ -7,6 +7,26 @@ class AnalyzeLogFilteringTests(unittest.TestCase): + def test_cumulative_inventory_ignores_foundry_showmap_replay(self): + with tempfile.TemporaryDirectory() as tmp_dir: + logs_dir = Path(tmp_dir) + instance_dir = logs_dir / "i-abcd1234-foundry-git-test" + instance_dir.mkdir(parents=True) + (instance_dir / "foundry_showmap.log").write_text( + '{"timestamp":1000,"event":"failure",' + '"invariant":"replay_only_failure",' + '"target":"CryticToFoundry"}\n', + encoding="utf-8", + ) + + self.assertEqual(analyze.discover_log_files(logs_dir), ()) + self.assertEqual( + build_cumulative_rows( + [], include_zero=True, logs_dir=logs_dir, run_id="run-1" + ), + [], + ) + def test_foundry_showmap_replay_is_not_parsed_as_benchmark_data(self): with tempfile.TemporaryDirectory() as tmp_dir: logs_dir = Path(tmp_dir)