Repository navigation
Dedupe Iroh selected-path diagnostics - #8497
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughDiagnosticLog now tracks the latest diagnostic path kind and skips retaining repeated matching selected-path notifications while still counting them as processed. Session clearing resets this state, and a regression test verifies exported events and metadata. ChangesDiagnostic log deduplication
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds deduplication of
Confidence Score: 4/5Safe to merge; the dedup logic is correct, actor isolation is maintained, and the drain-barrier semantics are preserved. The implementation is clean: The test file could use one additional case exercising Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[record event] --> B[Ingress.record\nyield onto event stream]
B --> C{Stream buffer full?\n.bufferingNewest drops oldest pending}
C -- no --> D[drain task: Store.append]
C -- yes --> E[oldest pending dropped\nnever the caller]
D --> F[totalProcessed += 1]
F --> G{event.diagnosticPathKind\nnon-nil?}
G -- no, not a path event --> H[write to ring slot\nadvance head]
G -- yes --> I{nextPathKind == selectedPathKind?}
I -- yes, duplicate --> J[early return\nevent discarded\ntotalProcessed still incremented]
I -- no, changed --> K[selectedPathKind = nextPathKind\nwrite to ring slot]
L[clear command] --> M[Store.clear\nwipe slots, reset head/filled\ntotalProcessed = 0\nselectedPathKind = nil]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[record event] --> B[Ingress.record\nyield onto event stream]
B --> C{Stream buffer full?\n.bufferingNewest drops oldest pending}
C -- no --> D[drain task: Store.append]
C -- yes --> E[oldest pending dropped\nnever the caller]
D --> F[totalProcessed += 1]
F --> G{event.diagnosticPathKind\nnon-nil?}
G -- no, not a path event --> H[write to ring slot\nadvance head]
G -- yes --> I{nextPathKind == selectedPathKind?}
I -- yes, duplicate --> J[early return\nevent discarded\ntotalProcessed still incremented]
I -- no, changed --> K[selectedPathKind = nextPathKind\nwrite to ring slot]
L[clear command] --> M[Store.clear\nwipe slots, reset head/filled\ntotalProcessed = 0\nselectedPathKind = nil]
|
Summary
Verification
4a5060a47abecause duplicate relay/private notifications are exportedswift test --package-path Packages/Shared/CMUXMobileCore --filter duplicateSelectedPathNotificationsDoNotExportFalseChangesswift test --package-path Packages/Shared/CMUXMobileCore(230 tests)irpded, run https://github.com/manaflow-ai/cmux/actions/runs/29702843263Scope
This removes diagnostic noise only. It does not infer socket churn or suppress genuine unavailable, relay, private-network, or session-lifecycle transitions.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Reduce noise in Iroh path diagnostics by deduping consecutive selected-path updates. Prevents exporting false changes while keeping session lifecycle rows intact.
selectedPathChangedonly when the redacted path kind actually changes.Written for commit aa3a6d4. Summary will update on new commits.
Summary by CodeRabbit