-
Notifications
You must be signed in to change notification settings - Fork 76
feat: main_thread_sampler.py — sample a stuck PID #62
Copy link
Copy link
Open
Labels
P2Core features, ship after P1Core features, ship after P1ai-shippableDelegatable to AI agents — clarity:4+ and risk:2 or lowerDelegatable to AI agents — clarity:4+ and risk:2 or lowerblast:1Single file — one view or one service, no ripple effectsSingle file — one view or one service, no ripple effectsclarity:3Direction known, details TBD — can start with questionsDirection known, details TBD — can start with questionsenhancementNew feature or requestNew feature or requestrisk:2Small surface area, existing patterns, minor regression chanceSmall surface area, existing patterns, minor regression chancesize:MModerate scope, some design neededModerate scope, some design neededtype:featureNew functionality or capabilityNew functionality or capability
Description
Metadata
Metadata
Assignees
Labels
P2Core features, ship after P1Core features, ship after P1ai-shippableDelegatable to AI agents — clarity:4+ and risk:2 or lowerDelegatable to AI agents — clarity:4+ and risk:2 or lowerblast:1Single file — one view or one service, no ripple effectsSingle file — one view or one service, no ripple effectsclarity:3Direction known, details TBD — can start with questionsDirection known, details TBD — can start with questionsenhancementNew feature or requestNew feature or requestrisk:2Small surface area, existing patterns, minor regression chanceSmall surface area, existing patterns, minor regression chancesize:MModerate scope, some design neededModerate scope, some design neededtype:featureNew functionality or capabilityNew functionality or capability
Problem
When
hang_watcher.py(C1) fires, the next question is always "what's the main thread doing?" macOSsampleproduces that stack trace, but the raw output is unparseable noise. A summary surface is needed.Sketch
Wraps
sample <pid> <duration>and produces a deduplicated top-of-stack summary: most common frame paths, % time, sample counts.Reuses
resolve_device_identifier+ a newbundle_id → pidhelper (probably belongs indevice_utils)common/cache_utils.ProgressiveCachefor the fullsampleoutputOpen questions
--verbose.Definition of done
--pidand--bundle-idboth workingsampleoutput cached and retrievable--json,--help, SKILL.md updatedPart of the v2.0 coverage expansion epic.