fix: filter out SESSION START / SESSION END marks in parse_structured_bin, and also add status feedback.

This commit is contained in:
serversdwn
2026-03-11 16:42:50 -04:00
parent 6d99f86502
commit 6be434e65f
2 changed files with 11 additions and 4 deletions

View File

@@ -344,6 +344,10 @@ def parse_structured_bin(bin_blob: bytes) -> list[MarkSplit]:
s3_bytes += length
elif rec_type == _REC_MARK:
label = payload.decode("utf-8", errors="replace")
# Skip auto-generated bridge lifecycle marks — only keep user marks
if label.startswith("SESSION START") or label.startswith("SESSION END"):
pass
else:
marks.append(MarkSplit(label=label,
bw_byte_offset=bw_bytes,
s3_byte_offset=s3_bytes))

View File

@@ -652,9 +652,12 @@ class AnalyzerPanel(tk.Frame):
if marks:
sessions = split_sessions_at_marks(bw_blob, s3_blob, marks)
self.status_var.set(f"Parsing... ({len(marks)} mark(s) found)")
mark_labels = " | ".join(m.label for m in marks)
self.sb_var.set(f"{len(marks)} user mark(s): {mark_labels}")
self.update_idletasks()
else:
if bin_path and bin_path.exists():
self.sb_var.set("No user marks found in session .bin — using standard session detection")
s3_frames = annotate_frames(parse_s3(s3_blob, trailer_len=0), "S3")
bw_frames = annotate_frames(parse_bw(bw_blob, trailer_len=0,
validate_checksum=True), "BW")