mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
Stop the log analyzer double-counting outbound peer promotions
The shared analyzer matched two strings for one event: "Peer promoted to active", emitted at info, and "Outbound handshake completed", emitted at debug. Both come from handle_msg2 on the same call path for the same outbound promotion, so any run at debug level counted every outbound promotion twice. Measured rather than argued. On the archived debug-level churn-mixed run of 2026-07-25, the node logs carry 20 of each string; the old matcher reported 40 promotions and the new one reports 20. The neighbouring counters are unmoved at 13 sessions and 33 parent switches. Info-level runs are unaffected, which was checked rather than assumed: on the tcp-mesh run of the same date the debug string occurs zero times, and the old and new matchers both report 7 against 7 raw occurrences. Three scenarios run at debug, one of them gating, so this corrects the promotion figure in their artifacts. No assertion reads the counter, so no suite's verdict changes. The earlier fix that introduced this added the live string alongside the dead one where it needed to replace it.
This commit is contained in:
@@ -148,8 +148,11 @@ def _analyze_lines(result: AnalysisResult, source: str, log_text: str):
|
|||||||
# Session establishment
|
# Session establishment
|
||||||
if "Session established" in line:
|
if "Session established" in line:
|
||||||
result.sessions_established.append((source, line))
|
result.sessions_established.append((source, line))
|
||||||
# Peer promotion
|
# Peer promotion. Match only the info-level string. "Outbound handshake
|
||||||
if "Peer promoted to active" in line or "Outbound handshake completed" in line:
|
# completed" is emitted from handle_msg2 on the same call path for the
|
||||||
|
# same promotion, so matching it too double-counted every outbound
|
||||||
|
# promotion in any run at debug level.
|
||||||
|
if "Peer promoted to active" in line:
|
||||||
result.peers_promoted.append((source, line))
|
result.peers_promoted.append((source, line))
|
||||||
# Peer removal
|
# Peer removal
|
||||||
if "Peer removed" in line:
|
if "Peer removed" in line:
|
||||||
|
|||||||
Reference in New Issue
Block a user