Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis/events_to_cumulative.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<run_id>.*logs\.zip)-(?P<name>.+)$")
IGNORED_LOG_FILENAMES = {"runner_commands.log"}
IGNORED_LOG_FILENAMES = {"foundry_showmap.log", "runner_commands.log"}


def die(msg: str) -> None:
Expand Down
20 changes: 20 additions & 0 deletions analysis/tests/test_analyze_log_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down