Repository navigation
test: share native chat render cost setup - #29316
Conversation
…audit-runtime-construction
…ntime-construction
…test-audit-runtime-title-startup
…test-audit-chat-render-startup
…at-render-startup
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
…at-render-startup
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f9efa099-1646-454b-a467-5d1ac2b81cfa
📒 Files selected for processing: 2
src/renderer/src/components/native-chat/NativeChatMessageList.render-cost.test.tsxsrc/renderer/src/components/native-chat/NativeChatMessageList.work-run-memo.test.tsx
💤 Files with no reviewable changes: 1
- src/renderer/src/components/native-chat/NativeChatMessageList.work-run-memo.test.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
| for (let frame = 1; frame <= 5; frame += 1) { | ||
| rerender(list(tail(frame))) | ||
| } | ||
| expect(entriesCalls.count).toBe(5) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Verify that each call rebuilds the live run.
The total of five calls does not identify the run passed to nativeChatWorkRunEntries. If one settled run rebuilds on each update while the live run stays stale, this assertion still passes. Record the wrapper’s members arguments and assert that every post-reset call contains the updated live run, not a settled run. This directly checks the stated purpose of the case.
…at-render-startup
ELI5
Keep the three chat rendering performance checks together so each PR loads their shared component graph once.
What Changed
Combine the streaming-render and work-run memo tests in one render-cost suite. Preserve settled-prose work per frame, lazy diff parsing and rebuilding only the live tool/reasoning run. Every probe calls the real implementation; counters reset before each case. The separate tool-stream pacing suite stays with its own environment. Production code is unchanged; test code drops31lines.
Why
The two suites loaded the same rendering graph separately. Sharing that setup reduces worker work while retaining three independent performance contracts. Keeping the real probes preserves protection against expensive chat updates.
Linked Issue
Maintainer-requested audit of tests run on every PR.
Visual Proof
N/A — test organization only.
Testing
Linux, background launch, Node24.21.0/Bun1.4.3. Six owner/marker suites pass59cases with shuffle104729. Three alternating one-worker pairs retain the exact three performance names: median wall6.889→6.061s and summed module5.187→4.450s. These are selected local measurements, without a whole-PR timing claim.
Three deliberate production regressions fail their intended retained assertions: defeating row reuse, eagerly parsing diff details and rebuilding settled work runs. All production sources were restored byte-for-byte and all three performance cases pass afterward. Renderer typecheck, changed-code quality, lint, formatting and whitespace pass.
Historical hosted measurements are retained as historical evidence; final main-based exact-head CI and source-qualified hosted costs are required before merge.
Review
Independent preservation review approved all original assertions and real call-through probes. Initial120-row positive control, exact diff summary/detail counts and rendered text, and four mounted work runs with exactly five tail rebuilds remain. The refreshed delta preserves the original two logical paths, +116/-147 test lines, with no production change.
Agent skill upstream boundary
Checklist
Final hosted qualification: exact393063c7a3 full .github/workflows/pr.yml run38878737147 passes verify116903217505 and all five unit shards; current separate Headless38878736888 and LoC38878737080 checks pass or intentionally skip. Earlier same-head event runs are superseded. Actual checkouta8500a87 matches all26 inspected relevant blobs. All five inventories reconcile12333unique module paths with zero missing/duplicate/omitted failures or unhandled errors. Baseline actual549ea6c2 equals main2e97 tree. The three unchanged performance cases measure3504→2065ms selected module time (-41.07%); displayed execution731→855ms. Historical/unpaired runner observations establish neither a causal execution change nor whole-PR elapsed savings.