Repository navigation
revert(crash-reporting): drop the dead terminal_parking_pass retained-slot reservation (#14867) - #15005
Conversation
📝 WalkthroughWalkthroughThe crash-breadcrumb store now retains only renderer memory highwater entries. The total retained-breadcrumb limit is four entries. Terminal parking census retention and separate memory-entry eviction logic were removed. Tests for terminal parking census retention and retention fairness were also removed. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5f18fccf-95c3-4775-b8c5-b34e69475b5c
📒 Files selected for processing (2)
src/main/crash-reporting/crash-breadcrumb-store.test.tssrc/main/crash-reporting/crash-breadcrumb-store.ts
💤 Files with no reviewable changes (1)
- src/main/crash-reporting/crash-breadcrumb-store.test.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 3 remain after this review.
| // Why: retain two thresholds for each renderer surface without growing the ring. | ||
| const MAX_RETAINED_BREADCRUMBS = 4 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update the retention comment to describe the global cap.
MAX_RETAINED_BREADCRUMBS limits all retained breadcrumbs to four entries. The current comment says that the store retains two thresholds for each renderer surface. The adjacent test records five surfaces, so that per-surface guarantee is not provided. Replace the comment with wording that describes the total cap.
Proposed comment
-// Why: retain two thresholds for each renderer surface without growing the ring.
+// Why: retain up to four renderer memory highwater breadcrumbs without growing the ring.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Why: retain two thresholds for each renderer surface without growing the ring. | |
| const MAX_RETAINED_BREADCRUMBS = 4 | |
| // Why: retain up to four renderer memory highwater breadcrumbs without growing the ring. | |
| const MAX_RETAINED_BREADCRUMBS = 4 |
…dcrumb slot without starving memory highwaters (stablyai#14867)" (stablyai#15005) This reverts commit 28c93da.
…dcrumb slot without starving memory highwaters (stablyai#14867)" (stablyai#15005) This reverts commit f0d167c.
ELI5
We reserved a guaranteed "save this one" slot in the crash-report breadcrumb ring for a
terminal_parking_passevent that a sibling PR was going to start emitting. That sibling PR was closed without merging, so nothing ever produces the event. This reverts the reservation so the store doesn't carry config and tests for a breadcrumb that cannot exist.What Changed
Reverts #14867 (
28c93da474) viagit revert:MAX_RETAINED_BREADCRUMBSback to 4 with its original comment ("retain two thresholds for each renderer surface without growing the ring")MAX_RETAINED_MEMORY_BREADCRUMBS,RETAINED_SINGLETON_BREADCRUMB_NAMES, the singleton early-return inretainedBreadcrumbKey, and the memory-specific trim loop inrecordCrashBreadcrumbterminal_parking_passretention/starvation behaviorNo dangling references remain:
terminal_parking_pass,RETAINED_SINGLETON_BREADCRUMB_NAMES, andMAX_RETAINED_MEMORY_BREADCRUMBSappear nowhere insrc/after this change.Memory-highwater capacity is unchanged at 4. Pre-revert, main retained 4 memory highwaters (
MAX_RETAINED_MEMORY_BREADCRUMBS = 4) within a total of 5. Post-revert, onlyrenderer_memory_highwaterbreadcrumbs get a retained key (retainedBreadcrumbKeyreturnsnullfor every other name), and the retained map caps atMAX_RETAINED_BREADCRUMBS = 4— so all 4 slots are memory highwaters, exactly as before #14867. The pre-existing "caps retained high-water profiles" test still pins this.Why
#14867 provisioned a retained singleton slot for
terminal_parking_passin anticipation of #14660, which would have emitted it as part of investigating the React #185 parking-oscillation hypothesis. #14660 has since been closed (#14660 (comment)): park churn appeared in 0 of 16 #185 field reports vs 3 of 336 non-#185 reports, the paired fix #14653 closed at zero diff, and the #185 cluster spans five error boundaries rather than being a terminal parking bug.With #14660 closed, nothing in production emits
terminal_parking_pass— it exists only in the retention set and that file's tests. The reservation is dead config, and the constant split served no purpose independent of it, so a full revert (not a targeted trim) is the right shape.Linked Issue
No standalone issue exists for this cleanup — it reverts #14867, whose reservation was made for the emitter proposed in the now-closed #14660.
Fixes # (revert of #14867; see #14660 for the closure that made it dead config)
Visual Proof
N/A — main-process crash-breadcrumb retention config with no UI surface or interaction change.
Testing
vitest run --config config/vitest.config.ts --no-file-parallelism src/main/crash-reporting/crash-breadcrumb-store.test.ts— 21 passedAdjacent breadcrumb suites (
crash-breadcrumb-store-leak,crash-breadcrumb-store-orphan-cleanup,durable-crash-breadcrumb,suppressed-process-gone-breadcrumb) — 14 passedpnpm run typecheck:node— cleanVerified the revert restores the exact pre-fix(crash-reporting): give the parking census a retained breadcrumb slot without starving memory highwaters #14867 file state and leaves zero references to the removed names (macOS local)
I manually tested these changes locally
Automated tests added/updated, or explained why not below — the reverted tests only exercised the removed dead behavior; surviving coverage still pins the 4-slot memory-highwater cap
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Platform-neutral main-process config; no wire, SSH, or mobile impact. Crash-report snapshots simply stop reserving a slot for an event that is never recorded.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author