Skip to content

feat: metrickit_reader.py — MetricKit diagnostic payload reader #63

Description

@conorluddy

Problem

Apps that adopt MetricKit produce rich JSON diagnostics — hangs, crashes, CPU exceptions, disk write exceptions — but those MXMetricPayload files get lost in the sandbox.

Sketch

python scripts/metrickit_reader.py --bundle-id com.example.app --list
python scripts/metrickit_reader.py --bundle-id com.example.app --show 2026-05-22
python scripts/metrickit_reader.py --bundle-id com.example.app --aggregate 30d

Locates MXMetricPayload-*.json and MXDiagnosticPayload-*.json in the app sandbox via container.py (B1), summarises hang counts, crash counts, top symbols, exception breakdown.

Reuses

  • Depends on B1 (container.py) — coordinate ordering. Ship B1 first.
  • common/cache_utils.ProgressiveCache for raw payload archive

Open questions

  • Confirm MetricKit emits payloads on simulator — historically it was device-only via background delivery. If simulator-blocked, script becomes "device-only" with clear messaging.
  • Whether to fall back to scanning the local file system for exported payloads.

Definition of done

  • --list, --show, --aggregate working
  • Clear error message if simulator doesn't emit
  • --json, --help, SKILL.md updated

Part of the v2.0 coverage expansion epic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Polish and low-urgency itemsblast:1Single file — one view or one service, no ripple effectsclarity:2Problem defined, solution unclear — needs a design spikeenhancementNew feature or requestrisk:3Touches shared code, some edge cases, needs careful testingsize:MModerate scope, some design neededtype:featureNew functionality or capability

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions