Skip to content

Unit suite cost: run-retry-wait.test.ts pins 59s of explicit retry delays against the 20-minute CI step budget #698

Closed

Description

@agenteinstinct1-max

Problem

The silvercode-ai unit suite runs ~1075-1185s in CI against a hard 20-minute step timeout (.github/workflows/test.yml).

A measured diagnostic found the single largest instrumented cost: packages/opencode/test/cli/run/run-retry-wait.test.ts carries 59 seconds of explicit retry delays — 12+12+1+11+11+12 across six provider retry-after waits in five tests. Each long wait exists only to clear run.ts's 10s notice threshold so the #555 wait-notice, retry ordering and recovery behavior can be asserted end to end.

Measured on a single run of the file: 101.28s wall for 5 tests / 25 expect calls.

Proposed direction

Keep at least one real-clock end-to-end test that genuinely sleeps out a long retry, and move the remaining cases onto an injected clock in the spawned CLI child (test-side, no production changes) so the same notice/ordering/recovery assertions run at unchanged production values in controlled time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions