Skip to content

feat(performance): collect bounded baseline evidence for every app run - #953

Merged
Juliusolsson05 merged 12 commits into
mainfrom
feat/performance-collector
Sep 12, 2026
Merged

Juliusolsson05 merged 12 commits into
mainfrom
feat/performance-collector

Conversation

@Juliusolsson05

@Juliusolsson05 Juliusolsson05 commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Normal users need background performance evidence without enabling the verbose diagnostics pipeline. This adds one shared main-process sample owner and an always-on utility-process collector with bounded queues, one acknowledged batch in flight, timeout/loss reporting and a run-wide restart cap.

The journal, freeze watchdog and legacy system-stat readers now share completed event-loop/memory samples. Renderer liveness, long tasks and thresholded input timing use one disposable probe; whole-document scans and duplicate verbose observers are removed. Preload projects/validates numeric heartbeat fields and holds one transport credit while main is blocked. Main derives window identity. Automatic heap-pressure capture records metadata; explicit heap capture and the journal's fatal-report path remain separate.

Adds cached typed IPC for the upcoming UI and an Electron helper entry plus isolated smoke harness. Live snapshots expose the last 120 main points; the worker retains a bounded 15-minute ring. Process attribution, UI, incidents, history/export and explicit recordings remain subsequent stages of #944.

Validation: 23 focused unit/renderer tests pass (queue/transport bounds, worker failure/restart cap, passive sample reads, disposal, no DOM scans, journal completeness, metadata-only heap pressure). Full main/renderer TypeScript check passes; the final full application check is delegated to PR CI after stopping redundant local jobs under shared-memory contention. Test-placement contract passes. Isolated real Electron helper smoke passes. Main/preload bundles and the isolated helper built successfully. Final complete distributable verification is delegated to PR CI.

Measured initial helper RSS: 69,746,688 bytes (~66.5 MiB), above the provisional 64 MiB target. This is recorded for stage 6 overhead qualification; no whole-app budget pass is claimed. Both independent Agent Code orchestration reviewers verified head ace79c1 with no remaining findings.

Foundation #949 is merged; this PR now targets main.

Review corrections preserve awake stalls, retain intervening journal peaks with an explicitly labelled worst-window p99, defer terminal teardown until quit admission, validate complete worker snapshots, keep main readings authoritative, reconcile live windows independently of lossy data, use monotonic deadlines, and exclude provider credentials from the helper environment. Regression coverage includes malformed replies, clock rollback and cancelled shutdown.

Fixes #950
Refs #944

Define collection ownership, bounded local evidence, user-facing investigation flows, and measurable rollout gates before changing production diagnostics.

Refs #944
…gation

Separate the baseline vocabulary from arbitrary diagnostic payloads. Bound queues by both records and conservative wire bytes, and preserve count-weighted latency distributions across rollups. Add content-free producer benchmarking before introducing always-on collection.

Refs #944, #948
Base automatically changed from feat/performance-monitoring to main September 12, 2026 22:24
@Juliusolsson05
Juliusolsson05 merged commit 69d3022 into main Sep 12, 2026
2 checks passed
@Juliusolsson05
Juliusolsson05 deleted the feat/performance-collector branch September 12, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(performance): unify baseline sampling and isolate collection

1 participant