Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:l7ak92kn4l was degraded 60 minutes today: trevato/forge: "report a problem in the terminal > the palette has the row" failed on 3 pulls in the last hour — the la… #7506

opened this

Merged 38d 21h ago, live in production

I changed test/tui-report.test.ts so the "report a problem in the terminal" tests no longer depend on how busy the check machine is. The file passes here (4 tests, about 2.5 s) and tsc is clean.

Notes

opened this

I changed test/tui-report.test.ts so the "report a problem in the terminal" tests no longer depend on how busy the check machine is. The file passes here (4 tests, about 2.5 s) and tsc is clean. I couldn't see the failing check logs, so a 5 s timeout hit by the cold first test is my best guess at why it failed on the lane. Nothing in the file failed locally, so I couldn't reproduce the red.

  • Warm-up: beforeAll now opens one palette before any test runs. The first palette load pays for lazy imports and a cold page cache. It used to count against the "the palette has the row" test's own deadline.
  • Timeouts: the suite's default timeout is 30 s, and beforeAll gets 60 s, instead of bun's 5 s default.

I changed only the test file. No application code changed, because nothing in the palette itself looked wrong. If the lane stays red on this test after the push, the cause is something other than timing.

To try it: bun test test/tui-report.test.ts.

Closes #7471

2 earlier comments
commented

I changed test/tui-report.test.ts so the "report a problem in the terminal" tests no longer depend on how busy the check machine is. The file passes here (4 tests, about 2.5 s) and tsc is clean. I couldn't see the failing check logs, so a 5 s timeout hit by the cold first test is my best guess at why it failed on the lane. Nothing in the file failed locally, so I couldn't reproduce the red.

  • Warm-up: beforeAll now opens one palette before any test runs. The first palette load pays for lazy imports and a cold page cache. It used to count against the "the palette has the row" test's own deadline.
  • Timeouts: the suite's default timeout is 30 s, and beforeAll gets 60 s, instead of bun's 5 s default.

I changed only the test file. No application code changed, because nothing in the palette itself looked wrong. If the lane stays red on this test after the push, the cause is something other than timing.

To try it: bun test test/tui-report.test.ts.

commented

I took out the timeout changes and the warm-up. What's left is a one-line data-directory change, and I still don't know why the lane failed.

What I measured (5 s default timeout, quiet 80-core machine):

  • beforeAll: about 360 ms in total. The cold createApp is roughly 200–330 ms, and a second createApp in the same process takes about 10 ms.
  • Cause of the cold cost: createApp itself (schema setup and first-run JIT). There are no lazy imports in src/tui, src/app.ts or the db modules, so there is nothing to import eagerly.
  • First palette round trip: about 130 ms, and each later keypress about 25 ms.
  • Debounced palette search: I held the screen for 600 ms after typing and the row stayed in place, so the search results don't push it out.
  • Under load: with 24 busy-loop processes running alongside, three runs passed. I could not reproduce a failure.

What changed:

  • Removed: setDefaultTimeout, the 60 s hook, and the warm-up palette. That answers your points 1 and 2.
  • Kept: the test now uses scratchDir instead of mkdtemp(tmpdir()). test/helpers/scratch.ts says a check cell's /tmp is a 256 MiB tmpfs shared by every file, and a file that can't get space there fails in setup with no test named (#3693). A setup failure shows up against the first test, which is this one. That fits the symptom, but it's a hypothesis I couldn't confirm. I didn't get the failing log, and a SQLite file of this size is small.

Not shown: the lane going green. The pull has no before/after cold-palette timing, because the cold cost didn't change. I'm not claiming a fix. If the lane stays red on this test, the failing log is the next thing to read: it will say whether the failure was beforeAll (a timeout or ENOSPC) or the assertion.

bun test test/tui-report.test.ts passes (4 tests, about 1.6 s) and tsc --noEmit is clean.

commented

I changed nothing on this turn. The new message is an automatic triage note that files the issue under P0 Trust, and there is nothing in it to act on.

The branch is already pushed and up to date. Its one change is that test/tui-report.test.ts now uses scratchDir instead of mkdtemp(tmpdir()), so the test's database stays off the shared 256 MiB /tmp tmpfs in the check cell. I removed the raised timeouts and the warm-up palette, as @juniper asked.

I still don't know why the lane failed, and I can't show it going green from here. In my measurements, the setup took about 360 ms and the first palette round trip about 130 ms. I couldn't reproduce a failure, even with 24 busy-loop processes running alongside. The /tmp explanation is a hypothesis that fits the symptom: a setup failure is reported against the first test, which is this one.

If the lane stays red on "the palette has the row", the failing log will say whether it was setup (a timeout or running out of space) or the assertion. That log is the next thing to read.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs