perf(graph): use coherent offline Concept detail snapshot for Graph roundtrip (#740)
Summary
Follow-up to #740, #753 and the guarded cache-reader merged in #760. Only the Concept detail navigation route opts into the existing preferCacheWhenOffline flag; the prksOfflineDetailFetch helper forwards it without changing defaults. Online, reconnecting, unrecognized cache entries and cache misses use the existing server-first behavior. The route retains PRKS_CONCEPTS_DOMAIN, prksIsConceptShape, pending create/deletion logic, route ownership, Graph selection and existing unavailable-state checks.
The Node helper/route contract checks the opt-in and the default server-first read. No Graph assertions were removed; no shared offline-runtime code was changed.
Completed same-runner A/B
GitHub Actions run 39144040444 passed an excluded warm-up for each exact SHA plus three alternating successful measured Chromium trials per SHA (baseline 570239c, candidate initial head 5024f41).
| Profiled phase | Baseline median | Candidate median | Change |
|---|---|---|---|
| Full test | 27.260s | 22.928s | -4.332s (-15.9%) |
| Concept roundtrip | 3.187s | 1.387s | -1.800s |
| Concept detail enter | 0.969s | 0.038s | -0.931s |
| Concept detail return | 1.117s | 0.068s | -1.049s |
| Position control roundtrip | 3.162s | 3.292s | +0.130s |
| Uncached Concept destination | 2.042s | 2.144s | +0.102s |
| Uncached Graph | 3.033s | 0.994s | -2.039s |
These are single-test profiling measurements, not total E2E-suite savings. The Position control and uncached destination remain within a narrow range; the Concept navigation change accounts for the targeted gain. All full-test real-browser assertions passed.
The temporary A/B workflow has been removed from the PR diff after collection. The P2 finding requesting removal is resolved. The measured results are recorded in #740 and docs/e2e-performance.md.
Merge requirements
- Meaningful positive same-runner Concept navigation result
- Real Chromium A/B passes without weakening unavailable/Graph assertions
- Remove temporary profiling workflow
- Resolve outstanding review finding
- Record evidence and safety limits in #740
- Full exact-head final CI passes (including unit/API, packaged E2E, full E2E and security checks)
- Explicit maintainer merge approval
Summary by cubic
Opts the Concept detail route into the existing guarded cache-first offline read, so an offline cached Concept renders without waiting on a known-failing detail fetch. Online and reconnecting reads stay server-first, and the temporary A/B workflow used to validate it has been removed, with results recorded in docs/e2e-performance.md (4.3s, 15.9%, faster Graph navigation test; 1.8s faster Concept roundtrip).
prksOfflineDetailFetchforwardspreferCacheWhenOffline; all other callers keep the server-first default.- The route keeps its coherence domain, shape guard, and offline/unavailable handling.
- Route source and read-through tests lock in the opt-in and confirm default reads stay server-first.