perf(graph): use coherent offline Argument detail in Graph roundtrips (#740)
Scope
Follows E2E tracker #740 and the merged Concept and Position Graph cache improvements (#761 and #762). Enables existing #760 coherence-guarded preferCacheWhenOffline only for Argument detail (also used by Stances). The Argument index stays server-first; online, reconnecting and missing or invalidated cache cases preserve the normal behavior. PRKS_ARGUMENTS_DOMAIN, prksIsArgumentShape, queue-created/deleted entity handling, Work/Position/Argument overlays, Graph selection and unavailable assertions remain intact. The shared reader, offline state machine and durable writer are unchanged. A focused Node contract locks this scope.
Same-runner A/B completed
GitHub Actions run #39158307945 passed one excluded warm-up and three alternating measured Chromium trials on each exact SHA, baseline merged 173fdad, candidate dc6a982. All eight real browser tests passed.
| Phase | Baseline median | Candidate median | Delta |
|---|---|---|---|
| Whole Graph test | 21.559 s | 17.606 s | −3.953 s (−18.3%) |
| Argument roundtrip | 3.102 s | 1.375 s | −1.727 s |
| Stance roundtrip | 3.328 s | 1.194 s | −2.134 s |
| Concept control | 1.210 s | 1.272 s | +0.062 s |
| Position control | 1.365 s | 1.299 s | −0.066 s |
| Person control | 3.479 s | 3.321 s | −0.158 s |
| Uncached Concept | 2.240 s | 2.359 s | +0.119 s |
| Uncached Graph | 1.199 s | 1.166 s | −0.033 s |
Figures apply solely to this profiled Graph E2E test, not the complete suite. Per-stage timers are nested; do not add parent and child timings. Full Graph/offline assertions were not weakened.
Temporary one-off A/B workflow deleted from final diff after this evidence was captured; result documented in docs/e2e-performance.md and #740. The initial head's normal checks were triggered and final-head checks need to pass. Codex review is usage-limit blocked, which is not a code defect.
Merge gates
- Controlled same-runner A/B shows meaningful Argument/Stance gain
- Keep cache validation, coherence and queue overlays; no assertion reduction
- Remove temporary benchmark workflow
- Record findings in #740 and E2E performance docs
- Final-head normal Full E2E, packaged E2E, unit/API, CodeQL/static/lint/security checks
- Maintainer authorization; do not self-merge
Summary by cubic
Opts the Argument detail route into the coherent confirmed-offline cache read, so Graph navigation roundtrips skip known-failing network fetches while offline. The Argument index and online/reconnecting reads stay server-first.
- Adds a selftest asserting the Argument detail route uses the guarded offline read and the Argument index does not.
- Records the same-runner A/B results (Argument and Stance roundtrips roughly halve, ~18% whole-test gain, control and uncached reads stable) and removes the temporary benchmark workflow.