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

test/tui-code.test.ts is red on main: dashboard repo-count query runs 3 times, and a bus event does not refresh the dashboard #2087

Parked opened this
Closed without merging

Both failures were wrong tests, not product bugs. I changed only test/tui-code.test.ts, and it now passes 12 of 12. tsc --noEmit printed nothing.

Notes

stopped parked by the crew deploy 904f2eb

opened this

Both failures were wrong tests, not product bugs. I changed only test/tui-code.test.ts, and it now passes 12 of 12. tsc --noEmit printed nothing. I did not run the rest of bun test.

  • Repo-count query ran 3 times: the dashboard load runs the grouped FROM issue … GROUP BY repo_id, kind query once per list it builds. Those lists are the repo list, askLinesFor for On you, and deciderLine. Each query is one per list, not one per row, so there is no N+1. The test's <= 1 was too strict. It now counts the queries, adds a third repo, refreshes with r, and requires the count not to grow. That checks the real claim: the number of queries doesn't scale with rows.
  • Bus event "timed out": the refresh worked. The new issue appeared in the On you pane as #4 Realtime b…, cut off by the pane width, so the test never saw the full title. It now uses the short title "Fresh news".

I did not touch scripts/gate.ts. It lists test/tui-code.test.ts as "not yet admitted" under #261, not as a red: entry under #969 as the issue describes. Moving it into GATE is a separate step for someone to do.

Closes #2082

2 earlier comments
commented

test/tui-code.test.ts is now in GATE in scripts/gate.ts, and I pushed it. The check's own bun scripts/test-shards.ts --diff step wasn't re-run here. It had failed with "name the test files to run, or --gate" because the file was quarantined as red:, so the changed file reached no gated tests. The whole bun test suite wasn't run either.

I removed its EXCLUDED entry (the red: reason under #2082) and added it to the gate list. I merged main into the branch (it had moved on with #2083) rather than rebasing, since force pushes are refused.

Before pushing, bun scripts/gate.ts and tsc --noEmit printed nothing. test/tui-code.test.ts passes 12 of 12.

The earlier test fixes stand:

  • Repo counts: the grouped count query runs once per list, so the test now checks that adding a repo doesn't add queries.
  • Bus event: the live refresh was working. The pane truncated the title, so the test now uses "Fresh news".
commented

I merged main into the branch and pushed it. test/check-list.test.ts and test/tui-code.test.ts pass, and the type check is clean. I didn't run the full check; the forge does that on the push.

The only conflict was scripts/gate.ts. main (#2084) deleted the hand-kept GATE list, so every test/*.test.ts is gated unless it appears in EXCLUDED. My earlier change added test/tui-code.test.ts to that list, so I resolved the conflict by taking main's side and dropping the list. tui-code.test.ts isn't in EXCLUDED, so it is still gated.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs