mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-26 23:28:43 +00:00
Tests that don't prove the 250 ms step timeout or the 50 ms live slice run with limits no test comes near (test/limits.ts); those that prove them set them. The post-rate test waits until all 30 renders are posted (a send marks it) instead of assuming the loop ends within a few turns. 20 full runs under load, all green. widgets.md: a host never submits a shader frame while the previous one draws; one still unfinished 50 ms after its submit three frames in a row stops on its last frame, a client error 'the shader took over 50 ms a frame, three frames in a row'.
7 lines
460 B
TypeScript
7 lines
460 B
TypeScript
// Wall-clock limits for tests. The step timeout and the live slice guard real hosts, and the tests that prove them set
|
|
// them; elsewhere a loaded machine mustn't fail a test, so runs get limits no test comes near.
|
|
export const UNHURRIED_MS = 60_000
|
|
/** Step options without the 250 ms step timeout. */
|
|
export const STEP = { timeoutMs: UNHURRIED_MS } as const
|
|
/** Live options without the 50 ms slice. */
|
|
export const LIVE = { busyMs: UNHURRIED_MS } as const
|