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

Full suite red: test/tui-signins-password.test.ts #12819

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

The "new passwords that differ" test in test/tui-signins-password.test.ts was over the 2 s budget. It now runs in about 0.35 s. I ran only this one test, three times, and it passed each time.

Notes

shipped production is serving it deploy 5bb6da3

opened this

The "new passwords that differ" test in test/tui-signins-password.test.ts was over the 2 s budget. It now runs in about 0.35 s. I ran only this one test, three times, and it passed each time. I did not run the other six tests in that file or the --rerun-each 10 reproduction after the change. bun scripts/gate.ts printed nothing and bun x tsc --noEmit reported nothing; I did not capture their exit codes.

Cause: the test typed about 68 characters, one key at a time, and waited for the terminal to settle and painted a frame after each key. The time was in those waits, not in password hashing.

Change: I added a paste helper to the test harness that sends a whole word and settles once. Only the mismatched-passwords test uses it. Its assertions are unchanged: the mismatch message shows, the old password still signs in, and no typed text appears in any frame.

Left out: this test no longer checks for a leak after every keystroke. The other tests in the file still type per key and still check every frame, so that coverage remains. I did not add anything to SLOW in scripts/gate.ts, since the test is now fast enough.

Try it: bun test ./test/tui-signins-password.test.ts

🤖 Generated with Claude Code

Closes #12797

5 earlier comments
commented

The "new passwords that differ" test in test/tui-signins-password.test.ts was over the 2 s budget. It now runs in about 0.35 s. I ran only this one test, three times, and it passed each time. I did not run the other six tests in that file or the --rerun-each 10 reproduction after the change. bun scripts/gate.ts printed nothing and bun x tsc --noEmit reported nothing; I did not capture their exit codes.

Cause: the test typed about 68 characters, one key at a time, and waited for the terminal to settle and painted a frame after each key. The time was in those waits, not in password hashing.

Change: I added a paste helper to the test harness that sends a whole word and settles once. Only the mismatched-passwords test uses it. Its assertions are unchanged: the mismatch message shows, the old password still signs in, and no typed text appears in any frame.

Left out: this test no longer checks for a leak after every keystroke. The other tests in the file still type per key and still check every frame, so that coverage remains. I did not add anything to SLOW in scripts/gate.ts, since the test is now fast enough.

Try it: bun test ./test/tui-signins-password.test.ts

🤖 Generated with Claude Code

commented

Nothing in my change failed, and I changed nothing in this turn. The preview is running and answers / with 200 at https://lab--12819--forge-trevato-apps.open-platform.sh.

The "no tests declared, none run" in that message is the preview deploy noting that forge.json has no app.test command. That is how the repository is set up, not something my change broke. The log you pasted shows only the forge's own background output (SQL and process counters), with no error from the app.

The pull is the same as before: only the paste helper and the mismatched-passwords test in test/tui-signins-password.test.ts changed. That test ran in about 0.35 s here and passed. The forge's check runs the gate, type check and tests on each push and judges the pull. If that check reports red, send me its log.

commented

The full suite is green again on main as of the comment (check run 01m7dp4w5mj2dsp13bjervc8q0, cb42fc8). That run was a pass on a different commit, so it doesn't show the 2.1 s test is safe from a loaded machine. I've left the pull as it is and pushed nothing new.

What changed: the "new passwords that differ keep the prompt open and change nothing" test in test/tui-signins-password.test.ts types the mismatched passwords with a new paste helper. The helper sends the whole word and settles once, instead of once per key. The test went from 2.1 s to about 0.35 s, which is what the budget report in #12797 asked for.

Left out: this test no longer checks for a leak after every keystroke. The other tests in the file still type per key and still check every frame. I added nothing to SLOW in scripts/gate.ts.

Try it: bun test ./test/tui-signins-password.test.ts. I ran only the "differ" test after the change, and it passed. The "no tests declared" note on the preview deploy comes from forge.json having no app.test command, not from this change.

🤖 Generated with Claude Code

commented

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 01m7eq1qrxp6237jd63qvvg063 (ended 2026-11-15T04:22), quoted from its log:

gate: rule "a comment line is wrapped at 100 columns": test/tui-signins-password.test.ts:65 is 114 long; rewrap it

Fix exactly these, then push. Nothing else is being asked.

commented

I rewrapped the one comment the check flagged, at test/tui-signins-password.test.ts:65, so it is under 100 columns. Nothing else changed, and the fix is pushed.

  • Gate: bun scripts/gate.ts now prints nothing. It only passed once the fix was committed, because it reads the committed tree and still reported the old line before that.
  • Tests: the 7 tests in test/tui-signins-password.test.ts pass. I ran them before the commit, and the comment is the only line that moved.
  • Types: bun x tsc --noEmit printed no errors.
  • Not run: the full suite. The forge runs it on this push.
commented

Declined: I can't find a failure to fix. The preview of #12819 answers 200 on / right now, and the pull's checks API reports state: none for head ab327bddd and gives no deploy log. Without the log I can't tell what failed. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m7er46r94957wz0xxyrthq3x Left open: someone has spoken on this pull.

Approved

Test-only change that fits the pipeline direction (#1242, a time budget per test). The mismatch test goes from about 2.1 s to about 0.35 s with a paste helper that sends the word and settles once. The helper is used and the assertions are unchanged. It touches no src/web, so there is no experience surface. The preview is unaffected. The other tests in the file still type per key and check every frame, so leak coverage remains. Next, in order: (1) keep one per-key leak check on the new-password entry so the mismatch path keeps keystroke-level coverage cheaply, for example by typing only the first 3 characters per key. (2) Run the file with --rerun-each 10 under load to confirm the 2 s budget holds.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs