Each og card's cold-render budget is 300 ms on the machine it was set on, scaled by how much slower the plain card renders on this one #51

Merged
grokbot merged 1 commit from grokbot/forge:fix/og-budget-relative into main 2026-10-17 21:16:29 +00:00
Owner

The budget from #2490 was wall-clock: 300 ms on any machine. On main's
check runner (half a CPU, 512 MiB) every design is ~6x slower, the plain
repo card included (295 ms against 45 ms where the budget was set), and
app and pull went red at 616 and 708 ms (run 889) with no change to the
cards.

The test now times the plain repo card first, in the same process, and
scales the budget by max(1, plain / 45 ms). A machine as fast as the one
the budget was set on, or faster, is held to the full 300 ms; a slow one
gets a proportionally longer budget; and a design that grows slow against
the plain card still goes red anywhere. Each test prints its measured
budget.

Checked: on one third of a core, main's test goes red (pull 416 ms) and this
one passes (budget x2.03, pull 335 ms); with 400 ms of extra work planted in
the pull card, this one is still red on a fast machine (457 ms against 300).

Validation

pipeline/validate on bdc1cedf: pass in 10s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands.

step result time
bun install --frozen-lockfile ok (exit 0) 0s
forge.json check.fast ok (exit 0) 2s
check.yml gate (1) pull_request ok (exit 0) 1s
check.yml gate (2) pull_request ok (exit 0) 0s
check.yml gate (3) pull_request ok (exit 0) 7s
  • ⚠️ node v20.19.2 here, v22 on CI (tsc runs under node)
test output (failures, totals)
▶ bun install --frozen-lockfile
  ok  exit 0  0s
▶ forge.json check.fast
Ran 107 tests across 8 files in 2.2s (8 shards).
  ok  exit 0  2s
▶ check.yml gate (1) pull_request
Ran 12 tests across 2 files in 0.1s (2 shards).
  ok  exit 0  1s
▶ check.yml gate (2) pull_request
Ran 12 tests across 3 files in 0.2s (3 shards).
  ok  exit 0  0s
▶ check.yml gate (3) pull_request
Ran 83 tests across 3 files in 6.7s (3 shards).
  ok  exit 0  7s
The budget from #2490 was wall-clock: 300 ms on any machine. On main's check runner (half a CPU, 512 MiB) every design is ~6x slower, the plain repo card included (295 ms against 45 ms where the budget was set), and app and pull went red at 616 and 708 ms (run 889) with no change to the cards. The test now times the plain repo card first, in the same process, and scales the budget by max(1, plain / 45 ms). A machine as fast as the one the budget was set on, or faster, is held to the full 300 ms; a slow one gets a proportionally longer budget; and a design that grows slow against the plain card still goes red anywhere. Each test prints its measured budget. Checked: on one third of a core, main's test goes red (pull 416 ms) and this one passes (budget x2.03, pull 335 ms); with 400 ms of extra work planted in the pull card, this one is still red on a fast machine (457 ms against 300). <!-- pipeline:validation --> ### Validation `pipeline/validate` on `bdc1cedf`: **pass** in 10s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands. | step | result | time | |---|---|---| | `bun install --frozen-lockfile` | ok (exit 0) | 0s | | `forge.json check.fast` | ok (exit 0) | 2s | | `check.yml gate (1) pull_request` | ok (exit 0) | 1s | | `check.yml gate (2) pull_request` | ok (exit 0) | 0s | | `check.yml gate (3) pull_request` | ok (exit 0) | 7s | - ⚠️ node v20.19.2 here, v22 on CI (tsc runs under node) <details><summary>test output (failures, totals)</summary> ``` ▶ bun install --frozen-lockfile ok exit 0 0s ▶ forge.json check.fast Ran 107 tests across 8 files in 2.2s (8 shards). ok exit 0 2s ▶ check.yml gate (1) pull_request Ran 12 tests across 2 files in 0.1s (2 shards). ok exit 0 1s ▶ check.yml gate (2) pull_request Ran 12 tests across 3 files in 0.2s (3 shards). ok exit 0 0s ▶ check.yml gate (3) pull_request Ran 83 tests across 3 files in 6.7s (3 shards). ok exit 0 7s ``` </details>
Each og card's cold-render budget is 300 ms on the machine it was set on, scaled by how much slower the plain card renders on this one
All checks were successful
check / gate (2) (pull_request) Successful in 3m28s
check / gate (3) (pull_request) Successful in 4m13s
check / gate (1) (pull_request) Successful in 10m4s
check / check (pull_request) Successful in 1s
preview / preview (pull_request) Has been skipped
bdc1cedfbb
The budget from #2490 was wall-clock: 300 ms on any machine. On main's
check runner (half a CPU, 512 MiB) every design is ~6x slower, the plain
repo card included (295 ms against 45 ms where the budget was set), and
app and pull went red at 616 and 708 ms (run 889) with no change to the
cards.

The test now times the plain repo card first, in the same process, and
scales the budget by max(1, plain / 45 ms). A machine as fast as the one
the budget was set on, or faster, is held to the full 300 ms; a slow one
gets a proportionally longer budget; and a design that grows slow against
the plain card still goes red anywhere. Each test prints its measured
budget.

Checked: on one third of a core, main's test goes red (pull 416 ms) and this
one passes (budget x2.03, pull 335 ms); with 400 ms of extra work planted in
the pull card, this one is still red on a fast machine (457 ms against 300).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
trevato-apps/forge!51
No description provided.