Repository navigation
test(perf): judge signed-in warm reloads with native frame evidence - #185641
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesExtends the warm-reload proof rig with synthetic signed-in admission, calibrated compositor capture, animation attribution, and paired UI-build comparisons. Example: Capture eleven warm chat reloads with 3,000 synthetic sessions.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open as a maintainer-directed draft experiment; it addresses a verified measurement gap, and no definite introduced defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe opt-in performance rig seeds isolated state, starts a built loopback Gateway, drives Chromium, and produces frame captures, inspected-paint records, and comparison reports. flowchart LR
A[Maintainer command] --> B[Synthetic fixture and UI builds]
B --> C[Isolated Gateway]
D[Chromium recorder] --> E[Synthetic admission proxy]
E --> C
D --> F[Raw compositor frames]
F --> G[Pixel analysis and paired reports]
Technical reviewBest possible solution: Complete qualification of the existing rig extension while preserving raw-frame inspection as the authority for visible content. Do we have a high-confidence way to reproduce the issue? Current-main source and the merged predecessor establish the measurement limitations; no target code was executed during this read-only review. Is this the best way to solve the issue? The extension uses the existing fixture, authentication, asset-serving, and capture owners, replaces single-arm orchestration, and preserves independent raw evidence alongside its heuristic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5a3baf1a6e13. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +514, Docs +127, Other +1307. Total +1948 across 13 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 27, 2026, 3:49 AM ET / 07:49 UTC. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
0c2cde9 to
dbe2f25
Compare
Add native synthetic proxy admission, calibrated full-headless capture, conservative visible-state accounting, and paired UI-build comparisons. Preserve raw pixels and inspected paint provenance without changing product runtime behavior.
dbe2f25 to
93ad957
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…he warm-reload proof rig (openclaw#185641) Round 2 of the local warm-reload proof rig (openclaw#185428): signed-in admission parity (one document, like Team's signed-in operators; the token-auth two-document path remains a control), an animation-normalized perceived-state census next to raw pixel states with per-region change attribution, capture of what is displayed between navigation start and the new document's first frame, and a --base/--candidate compare mode that serves both builds against the same state with interleaved warm reloads and side-by-side contact sheets (runbook: scripts/perf/warm-reload-proof.md). Baseline on main 46e552e (AWS c7a.4xlarge, all 48 loads inspected): chat cold 18 / warm 15 [15, 16] perceived states, first transcript 480 ms; dashboard cold 22 / warm 25 [23, 26.5], first transcript 454 ms, first board 1,097 ms. The two-state goal (old page -> complete page) fails in all 44 warm loads: old complete page -> skeleton -> staged restoration. Tooling only; application runtime delta 0. 14 focused tests; CI green; inherited Knip findings reproduce on main.
What Problem This Solves
The campaign evidence recorded a fourteen-state timeline for a signed-in reload of a dashboard deep link. The local rig also had a two-document token-admission path and could not distinguish animation phases from structural changes or observe the old page through navigation. That prevented it from judging the campaign's old page → complete cached page goal.
Why This Change Was Made
The default browser admission now uses a synthetic HttpOnly proxy session, native trusted-proxy identity, and the protected-entry service worker. Token admission remains an explicit diagnostic. Native top-level document requests stay in the census; the signed-in path requires exactly one. The proxy does not rewrite protected responses or redirects.
The recorder observes the old compositor surface before navigation, carries that actual image explicitly at time zero, and retains all delivered post-navigation PNG surfaces. Repo-pinned full Chromium runs headless with PaintHolding enabled. Automatic early/late controls require old→complete and old→blank→complete sequences before any product capture.
A separate animation-normalized census retains the original masked/unmasked counts, exact masks, and timestamped changes for sidebar, header, transcript, Details, composer, and board. Chronological occurrences count every return to a previous image; unique images remain alongside them. Fade grouping requires stable content/geometry and actual pixel structure, preserving blank→content changes.
--base <dist|ref> --candidate <dist|ref>builds pinned refs serially and alternates eleven warm pairs per route against one Gateway process and one synthetic durable fixture. Browser caches are separate; inactive pages are frozen. Complete copied custom UI roots are swapped between samples through the existing uncached custom-root contract.User Impact
Campaign lanes get one repeatable command, raw frames, median/IQR and per-pair deltas, per-region timelines, and native-resolution side-by-side sheets. The visible census is a conservative animation heuristic, with original pixels retained for inspection. Paint milestones require inspected PNGs and their immediate predecessors. These are delivered headless compositor surfaces; they do not establish every physical display-vsync frame. CDP latency shaping is not a calibrated fixed delay on each WebSocket RPC.
Evidence
Product source:
60aaedd81245e7366998c4ea5c0956a503f7545b. Tooling/Gateway build:93ad957fa3ab4ec6b57c79b073643478243ff4d6. Product source is identical between the arms; this is a source-equivalent qualification and pinned-main baseline, with different document/worker build identities. No product speedup is claimed.AWS
cbx_1898f5edb064, fixedc7a.4xlarge, repo-pinned Chromium, 1720 × 1180, CDP latency setting 80 ms, 3000 native sessions, cold plus 11 warm loads per arm per route. Pre-capture check: 93.13% CPU idle on 16 CPUs, load 1.48/1.90/1.63. CPU affinity/cpuset were 0–15; the cgroup quota file was unavailable. Capture and analysis identities, browser switches, native frame clocks, and source/build hashes are retained.Warm source-equivalent distributions
Median [Q1, Q3]. Candidate-minus-base deltas are paired by reload index; negative means lower. Missing Element Timing remains “not emitted.”
chat
dashboard
Cold observations (one per arm/route)
The two-state warm goal fails in44/44 loads. Every new warm document begins with the whole-app skeleton. Actual transcript content returns around 454–480 ms (arm/route medians); board content returns around 1.08–1.10 s. The old complete page is visible before navigation, then restored content arrives through multiple stages.
The normalized dashboard count shifts 25→21 despite identical product source, RPC inventories, JS/CSS path sets, and final bounds; unmasked occurrence medians remain 28/28. The paired normalized shift meets 9/11 and separated-IQRcriteria, but this is not a product win: separate document/worker build identities and unrecorded cache-hit/SW flags leave build/cache-versus-animation sensitivity unresolved. A strict byte-artifact A/A control is needed before using a small normalized-count delta causally. Raw controls and inspected frames remain authoritative.
Representative base warm-01 region-change times in ms; the full report contains every load and exact bounding boxes. Counts here are chronological occurrences.
chat: all eleven paired deltas
dashboard: all eleven paired deltas
Persistent masks are explicit per reload: measured two-pixel caret rectangles, small spinner/icon rectangles (≤40×40), elapsed clocks (100×40), and reconnect status (240×40). Pair-specific animation rectangles require the same attributed target, content, appearance, and geometry on both samples. Original masked and unmasked censuses remain the controls. Region boxes overlap and their counts must not be summed.
Inspected Synthetic Evidence
Selected stages are previews; the full distinct-state sheets and per-load timelines remain in the baseline artifacts. Every capture was inspected for unrelated or private content before publication.
Proof
Full Gateway/UI build: 356.56 s. Pinned main ref full build: 374.6 s. Four focused files passed 14 tests via
corepack pnpm test <file> --maxWorkers=1on the same AWS lease:test/scripts/warm-reload-admission.test.tstest/scripts/warm-reload-compare.test.tstest/scripts/warm-reload-frames.test.tstest/scripts/warm-reload-paint-audit.test.tsThe sandbox-port regression failed on the old helper and passed with the guard. Frame tests cover content appearance versus animation, historical revisits, and independently accumulating regional changes. Paint audit tests cover arm-scoped observations and original-frame provenance. Comparison tests retain missing paint evidence and count repeated transitions between two unique images.
The canonical remote changed-file gate passed changed-file lint, format, script/test type checks, and the other scoped checks. Its sole remaining failure is the whole-repository Knip export scan. A detached pinned-main control reproduced exactly the same production/full-tree findings for five pre-existing exports, including the repeated knowledge export in both scans. No product file was edited. The initial standalone invocation also lacked pnpm on PATH; the corrected invocation used a private workspace-local shim executing Corepack, with no
corepack enableor system install. The original runner result remains failed for that setup/gate result; all 48 captures and subsequent audits completed successfully.Matching inherited findings:
REVIEW_SCRIBE_DECLARATION_KEY,summarizeOpenAITransportError,CHAT_SNAPSHOT_DB_NAME,createProjectorWithAssistantHooks,inputSinks. Both candidate and pinned-main script-export scans passed. Full logs, main control SHA, artifact checksums, and zero-listener proof are retained with the baseline.Exact-head CI completed successfully on
93ad957fa3ab4ec6b57c79b073643478243ff4d6; the native watcher reports GREEN and distinguishes ten superseded cancellations retained in GitHub's aggregate. Independent review is clean through P2. The earlier ClawSweeper review reported no actionable finding; a refresh will be requested after this evidence update.Scope and Size
Tooling only: nine
scripts/perf/warm-reload-*files and four focused test files. Application runtime LOC delta: 0. The requested production-filter command reports 1746 insertions / 236 deletions, net +1510, entirely perf tooling and its runbook. TypeScript tooling accounts for +1374; the runbook adds +136.Growth supplies the four requested measurement contracts plus native paint-holding qualification. The original single-arm orchestration is replaced by the shared arm loop. Existing native auth, sandbox-port, state-seeding, and UI-root owners are reused. No product config options, server schema, protocol, or deployment changes. No changelog edit (release-owned).
All three owned AWS leases are released. No owned Gateway or browser remains. The raw bundle and derived reports are retained locally; raw JSON/archives are not public attachments.
Ready for lead review; stop before merge.