Public: anyone can read this; the crew can change it.
Full suite red: test/snapshot.test.ts #12763
Merged 21d 1h ago, live in production
test/snapshot.test.ts ran 21.8 s in the full suite, over the 20 s file budget. I split it into two files that each stay well under it. What moved: the second describe, "a snapshot's uploads", went into the new test/snapshot-uploads.test.ts.
-
Reviews
ApprovedTest-only split of the uploads describe into test/snapshot-uploads.test.ts. The code moved unchanged, imports are pruned, and the five sleeps carry real-timer justifications for the gate. No production code, security surface, README or dependency is touched. Nit, not blocking:
import { dirStore, } fromin test/snapshot.test.ts has a stray comma. -
Checks
shipped production is serving it deploy 69ce311
-
History
- Mark the real waits in the snapshot upload tests (#12746) 3476a86
- Split snapshot upload tests out of test/snapshot.test.ts to stay under the file budget (#12746) 2385702
- Full suite red: test/data-query-limits.test.ts (#12669) 5347ed3
- Full suite red: test/apps-ws.test.ts (#12674) bcd65b2
- The renderers nothing tests by name get a test: toml-config, yaml-config, html_preview, gcode-css, model3d-css, model3d-client (#12708) 20052b1
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1zu7inoki4 is past its budget: trevato/forge: "whether a snapshot is encrypted before it leaves is a setting, and the status says which > by default t… (#12687) 736d7ef
- Full suite red: test/offsite-lane.test.ts (#12685) e716baf
- Full suite red: test/palette-tell.test.ts (#12673) 9f81212
- Full suite red: test/search-production-size.test.ts (#12670) 025ccd2
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:9s216pmb22 is past its budget: trevato/forge: "two hosted forges on one machine: files > a link the forge left where its home goes is never mounted: n… (#12469) 5e1894f
- Full suite red: test/apps-token.test.ts (#12672) 87c40a8
- Full suite red: test/spawn-small-cell.test.ts (#12671) b4feb63
- Red after landing: test/boundary-tenancy-cell.test.ts fails on main (#12686) fe4a0e9
- Full suite red: test/flow-cache.test.ts (#12662) 8701767
- Full suite red: test/spawn-cell-e2e.test.ts (#12668) 24eb133
- The release proof boots a 1-CPU, 512 MiB forge, runs the first-hour journey and fails when memory at rest is over budget (#12579) b9556cb
- Full suite red: test/probe.test.ts (#12663) a328879
- Full suite red: test/composer-draft.test.ts (#12660) fb6b63b
- Full suite red: test/boundary-tenancy-cell.test.ts (#12657) 3605c23
- Full suite red: test/tui-workspace.test.ts (#12666) c05d786
4 earlier comments
test/snapshot.test.ts ran 21.8 s in the full suite, over the 20 s file budget. I split it into two files that each stay well under it.
- What moved: the second
describe, "a snapshot's uploads", went into the newtest/snapshot-uploads.test.ts. That covers the in-flight cap, run-log bundles and the service's progress reporting. Its tests are unchanged: same code, same assertions. - Imports: each file now imports only what it uses.
- Timings: locally the original file took 13 s, of which about 9.5 s was that second
describe. I did not time the two new files separately. - What I did not do: I did not add the file to
SLOWinscripts/gate.ts. Thetest/snapshot*.test.tsnames intest/check-tiers.test.tsare fixtures and needed no change.
Checks:
bun x tsc --noEmitis clean.bun scripts/gate.tsprinted nothing, so I take it as clean.test/snapshot.test.ts,test/snapshot-uploads.test.tsandtest/check-tiers.test.tspass together: 76 tests, 0 failures.- I did not run
scripts/fast.tsor the full suite; the forge runs the full check on the push.
To try it: bun test ./test/snapshot.test.ts ./test/snapshot-uploads.test.ts.
The preview deploy didn't fail because of my change, so I changed nothing and pushed nothing.
- What the message says: the preview is "running at https://lab--12763--forge-trevato-apps.open-platform.sh · no tests declared, none run". The log excerpt is only periodic process and SQL telemetry, with no error in it.
- The preview is up:
/answers 200 on the preview URL. - Why no tests ran:
forge.jsonhas noapp.testkey. The tests live undercheck, and the forge runs those on every push. The preview deploy has no tests to run, which is normal for this repository. - Nothing to fix: the working tree is clean. My earlier local results still stand: tsc and the gate are clean, and the snapshot and check-tiers tests pass.
The full suite went green again on main at 5347ed3, which doesn't include this pull, so the red run looks like load rather than a code fault. I made no new change and pushed nothing.
test/snapshot.test.ts took 21.8 s in the red run, and the 20 s file budget counts the whole file's time. It ran 13 s here with no other load, so it sits close to the limit and a busy machine can push it over. A later run on a quieter machine would pass without any change, which fits the green report.
The split in this pull still helps, because it removes the cause rather than waiting for a quiet run.
- What changed: the "a snapshot's uploads" tests moved unchanged into
test/snapshot-uploads.test.ts. They were about 9.5 s of that file here, so each file now has far more room under the budget. - What I did not do: I did not add the file to
SLOWinscripts/gate.ts. - Checks:
bun x tsc --noEmitandbun scripts/gate.tsare clean, andtest/snapshot.test.ts,test/snapshot-uploads.test.tsandtest/check-tiers.test.tspass together (76 tests). The forge runs the full check on the push. - To try it:
bun test ./test/snapshot.test.ts ./test/snapshot-uploads.test.ts.
The preview's "no tests declared, none run" message is not a failure: forge.json has no app.test key, and the tests run under check.
The check on this pull's head fails, and it is not the preview: the deploy log you were shown is a success. These are the failing lines from check run 01m7eq1s2xxhkpj76cnb8t7mfs (ended 2026-11-15T04:22), quoted from its log:
gate: rule "a test does not wait on a real timer": test/snapshot-uploads.test.ts:61 sleeps; inject a clock and step it, or end the line with `// real-timer: <why>`
gate: rule "a test does not wait on a real timer": test/snapshot-uploads.test.ts:211 sleeps; inject a clock and step it, or end the line with `// real-timer: <why>`
gate: rule "a test does not wait on a real timer": test/snapshot-uploads.test.ts:230 sleeps; inject a clock and step it, or end the line with `// real-timer: <why>`
gate: rule "a test does not wait on a real timer": test/snapshot-uploads.test.ts:245 sleeps; inject a clock and step it, or end the line with `// real-timer: <why>`
gate: rule "a test does not wait on a real timer": test/snapshot-uploads.test.ts:247 sleeps; inject a clock and step it, or end the line with `// real-timer: <why>`
Fix exactly these, then push. Nothing else is being asked.
The gate now passes, and the fix is pushed. I ran bun scripts/gate.ts after committing, and it printed nothing. Before the commit it still flagged all five lines, because it only checks lines the commit adds.
The five Bun.sleep lines in test/snapshot-uploads.test.ts (61, 211, 230, 245 and 247) now end with a // real-timer: <why> comment. I did not swap them for an injected clock. These tests check real overlap between uploads, polling of a background snapshot, and the service's catch-up loop. A fake clock would stop them testing what they exist to test, and the gate accepts the comment for this case. If you want a clock injected, say so.
The edit only adds comments, so behaviour is unchanged. bun test test/snapshot-uploads.test.ts gives 10 pass and 0 fail. I did not re-run bun x tsc --noEmit after the edit.
test/snapshot.test.tsran 21.8 s in the full suite, over the 20 s file budget. I split it into two files that each stay well under it.describe, "a snapshot's uploads", went into the newtest/snapshot-uploads.test.ts. That covers the in-flight cap, run-log bundles and the service's progress reporting. Its tests are unchanged: same code, same assertions.describe. I did not time the two new files separately.SLOWinscripts/gate.ts. Thetest/snapshot*.test.tsnames intest/check-tiers.test.tsare fixtures and needed no change.Checks:
bun x tsc --noEmitis clean.bun scripts/gate.tsprinted nothing, so I take it as clean.test/snapshot.test.ts,test/snapshot-uploads.test.tsandtest/check-tiers.test.tspass together: 76 tests, 0 failures.scripts/fast.tsor the full suite; the forge runs the full check on the push.To try it:
bun test ./test/snapshot.test.ts ./test/snapshot-uploads.test.ts.Closes #12746