Repository navigation
fix(web,mobile): a 9.96-second workflow step reads 10s, not 10.0s - #42492
juliusmarminge merged 3 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tepTime Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceRan the same synthetic workflow on fresh databases: ordinary steps sleeping 9,700 ms and 9,960 ms, then opened the completed run. Web browser: 1280×800, light theme. Both headers read
Not shown:
|


Problem
workflowStepTime(packages/client-runtime/src/workflows.ts), used by the web run feed and mobile workflow timeline, documents "0.3s, 9.7s, 12s, then minutes" but chose tenths withms < 10_000before rounding, so 9,951–9,999 ms displayed10.0swhile 10,000 ms displayed10s.Change
End the tenths branch at
ms < 9_950, the first value that rounds to 10.0 (1 line). 9,950 ms now reads10s(half rounds up, likeMath.round); it read9.9sbefore only because 9.95 is stored just below 9.95. The existingkeeps one shape down the columntest case now also pins9_949→"9.9s",9_950→"10s", and9_999→"10s".Scope
No issue: this is a 1-line fix for an obvious rounding bug in
packages/client-runtimeplus test rows.Verification
--no-seedper commit and only the synthetictimingworkflow below.timing(a 9.7 s step, then a 9.96 s step) witht3 workflow start timing→ open the finished run on each client. Server-recorded step times were 9.702 s / 9.961 s on9ca304dand 9.701 s / 9.961 s on1b2b8d7.Web on 9ca304d: the 9.7 s step reads 9.7s, the 9.96 s step reads 10.0s
Web on 1b2b8d7: the 9.7 s step reads 9.7s, the 9.96 s step reads 10s
Android on 9ca304d: the 9.7 s step reads 9.7s, the 9.96 s step reads 10.0s
Android on 1b2b8d7: the 9.7 s step reads 9.7s, the 9.96 s step reads 10s
An AI agent ran each check and capture. On
9ca304d, the head test fails at the9_950row (expected"10s", received"9.9s") and9_999formats as"10.0s"; the test also fails withms < 9_951, and passes 3 of 3 runs on1b2b8d7.vp run check:changedpasses.Failing base test output and synthetic timing workflow
Failing test on
9ca304d:Synthetic workflow (
workflows/timing.ts):Generated with Gemini 4 Neon in T3 Code Nightly