Add deterministic performance regression harness and hitch profiling lane #14
Labels
No labels
delivered
outstanding
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kayg/hermternal-apple#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add deterministic performance regression coverage for Hermternal's local hot paths, plus a scheduled native UI-hitch lane and repeatable Instruments review.
Performance is priority one, but network/auth/server timing and arbitrary UI wall-clock thresholds are too noisy for per-commit gates.
Architecture first
Extract a Foundation-focused
HermternalCorelibrary target and addHermternalCoreTests; keep the executable target andScripts/build-app.shunchanged.Inject or extract seams for:
TranscriptSourceand bounded prefetch coordinator.Per-commit deterministic contracts
Fixed local fixtures, no SSO/network/live Hermes:
Use correctness assertions as hard gates. Where native macOS 26 SDK support compiles, collect XCTest clock/CPU/memory/storage metrics as controlled-run trends, not host-independent fixed limits. Run measurements in Release with coverage/sanitizers disabled and fixture setup outside the measured region.
Nightly / controlled Mac lane
Add deterministic app fixture/launch mode and semantic accessibility identifiers. Use XCUITest for functional launch/sidebar/chat flows and Xcode 26
XCTHitchMetric(application:)around fixed sidebar/transcript scrolling. Baseline only on controlled hardware; reset gestures outside the measured interval. Do not use sleeps or generic XCUITest elapsed time as performance gates.Release profiling
Add stable
OSSignposterintervals for cache reconcile/hit/open, prefetch, gateway ingest, Markdown completion parse, and transcript first paint. Capture Xcode 26 Instruments SwiftUI + Time Profiler/Hangs & Hitches/Allocations/File Activity/Points of Interest scenarios:Attach
xctraceartifacts for diagnosis; do not use Instruments sampling output as a brittle per-commit pass/fail gate. MetricKit on macOS 26 is daily/field observation, not CI.Official references
Acceptance
The deterministic suite fails on plausible cache/race/parser regressions, the scheduled lane records repeatable hitch trends on one controlled Mac, and release traces isolate each named hot path without requiring live credentials or a live agent.
Status update for architecture planning: a
HermternalTeststest target was added in commitb944320, targeting the executable target directly. This may conflict with the plan here to extract aHermternalCorelibrary withHermternalCoreTests; reconcile that target structure when #14 is picked up.The extraction is now intended to happen BEFORE the search-index work, because the index needs the same seams listed here. The six identity tests currently in
HermternalTestsshould move toHermternalCoreTestsas part of that extraction.