test(e2e): attribute remaining Graph detail return overhead (#740)
Purpose
Continue E2E performance tracker #740 after merged #764. The same-runner Chromium A/B in run 39161854813 reduced Person detail entry to ~0.031s but still measured a ~0.922s Person → Graph → Person return stage; its cause is not established.
This measurement-only PR splits each existing real-browser Graph → record return stage into nested, optional phases:
*_return_click: click#prks-graph-open, including any Playwright auto-wait/route transition insideclick().*_return_hash: wait for the correct destination hash.*_return_banner: wait for the offline-provenance banner as before.
It profiles all five record visits, so Concept/Position/Argument/Stance serve as controls for Person. The existing inclusive return/roundtrip phases, assertions, source/packaged CI, fresh context and offline behavior are unchanged. No production code, browser wait policies, service-worker behavior or CI trigger policy is modified. The already-existing manual-only E2E Offline Graph Navigation Profile workflow automatically includes complete optional graph_nav_* phases.
Verification required
- All applicable final-head (
cf4388e) required checks green, including Full E2E, Test Gate, CodeQL, fast static, workflow lint and zizmor; the previous test-code head (3fadc95) passed all six triggered checks. Packaged distribution E2E is path-conditional and did not trigger for this test/docs-only PR. - Manual Graph profile #39165518995 passed on exact test-code head
3fadc95, with 1 excluded warm-up + 3 passing Chromium trials and all 15 nested return phases reported. - Attribution: Person return banner DOM wait median 1.041s (1.041, 1.132, 0.026), versus 0.020–0.025s for the other four routes; Person click 0.046s, hash confirmation 0.002s. Person total return median 1.081s, test wall median 16.065s. See
docs/e2e-performance.md. - Define next investigation: instrument the Person route's awaited durable ops, cached-detail read, effective profile/group overlays, and pending metadata hydration individually, preserving route ownership and fail-closed behavior. No production optimization or speedup claim until attributable and confirmed by controlled A/B.
- Final-head review threads resolved and maintainer explicitly authorizes merge.
Leave open for maintainer approval.
Summary by cubic
Adds nested *_return_click, *_return_hash, and *_return_banner profiling phases to the E2E Graph → record return stage and records the measured results, pinning the ~0.9s Person return overhead to the banner wait.
Profiling all five record visits shows the Person offline-banner DOM wait is the slow phase (median 1.041s vs ~0.02s for Concept, Position, Argument, Stance), while click and hash waits stay around 0.05s and 0.002s. The delay occurs after the hash change and before the Person route's banner exists in the DOM; no contributing operation (Person detail hydration, cache, overlays, metadata) has been timed individually yet. A separate manual master run is not a controlled A/B, so its medians should not be read as a regression or speedup.
No production code, wait policies, assertions, or CI triggers change. The phases run only in the manual offline profile workflow, and nested timers must not be summed with their inclusive return parents.