Skip to content

The agent that grows with you

fix(scripts): count only committed attempts as batch compactions in the micro-compaction report

kshitijk4poor31d1bd349187
diff --git a/scripts/micro_compaction_report.py b/scripts/micro_compaction_report.py
index 61c95f72944..92e0ff5213b 100644
--- a/scripts/micro_compaction_report.py
+++ b/scripts/micro_compaction_report.py
@@ -67,7 +67,8 @@ def load(paths: list[Path]) -> tuple[list[dict], list[dict]]:
except ValueError:
pass
break
- return micro, batch
+ # The attempt log also records blocked, skipped and refused attempts; only committed ones are compactions.
+ return micro, [b for b in batch if b.get("commit_status") == "committed"]
def pct(values: list[float]) -> tuple[float, float, float] | None: