Skip to content

test(codemod): give the Hacker News project test a 30 s timeout - #2275

Merged
domgan-oai merged 1 commit into
mainfrom
test/codemod-hn-timeout
Oct 29, 2026
Merged

domgan-oai merged 1 commit into
mainfrom
test/codemod-hn-timeout

Conversation

@trueadm

@trueadm trueadm commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Gives the codemod's Hacker News project test an explicit 30 s timeout.

Why

Changes

  • packages/codemod/tests/project.test.js: a 30_000 timeout argument on that one test, with a comment on why. 30 s matches the per-test timeouts other heavy tests in the repo use.

Validation

  • pnpm format:check: not run repo-wide; pnpm format:files on the changed file
  • pnpm typecheck: not run; no source change
  • pnpm test: not run in full
  • targeted tests: vitest run --project codemod packages/codemod/tests/project.test.js, 8 passed
  • pnpm sync: no changes
  • perf-review: not applicable; test-only
  • concise-code: one argument and one comment line; no source, new files, or exports; bytes not applicable

Risk / follow-ups

  • A genuinely hung run now takes 30 s to fail instead of 5 s.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Note

Low Risk
Test-only timeout and comment; no runtime or codemod logic changes.

Overview
The codemod Hacker News end-to-end test now uses Vitest’s per-test 30 s timeout (via the third argument to it) instead of the default 5 s, with a short comment that the case runs the codemod over the whole example twice and can exceed 5 s under CI load.

No production or codemod behavior changes—only test stability.

Reviewed by Cursor Bugbot for commit 28e3da4. Bugbot is set up for automated code reviews on this repo. Configure here.

The test runs the codemod over the whole Hacker News app twice, compiling
every module each time. It takes about 1.3 s locally but passed Vitest's
default 5 s under CI load on #2268's test shard 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm marked this pull request as ready for review October 28, 2026 23:45
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent test PR: tests only labels Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No byte growth, no added work, and no timing changes beyond ±3%.

Compares 868ee70aa, the merge commit's first parent with 1954c20b1 on the same runner. Any increase in a js-framework work counter fails this check; byte changes are a report. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 2.642 2.575 +1.9% −3.8% … +6.0% ⚪ within noise
octane-tsrx replace 6.458 6.308 −0.8% −8.3% … +10.5% ⚪ within noise
octane-tsrx add 2.358 2.450 ±0.0% −4.3% … +6.4% ⚪ within noise
octane-tsrx update 0.093 0.092 −0.5% −3.2% … +0.9% ⚪ within noise
octane-tsrx select 0.005 0.005 −0.0% −2.3% … +0.6% ⚪ within noise
octane-tsrx swap 0.016 0.016 +2.0% −0.3% … +3.5% ⚪ within noise
octane-tsrx remove 0.013 0.013 −1.0% −3.8% … +3.7% ⚪ within noise
octane-tsrx runlots 20.858 20.267 −2.2% −7.7% … +0.5% ⚪ within noise
octane-tsrx select_lots 0.006 0.006 +1.2% +0.6% … +1.8% ⚪ within noise
octane-tsrx clear 41.200 41.617 +1.3% −0.6% … +2.5% ⚪ within noise
octane-jsx run 3.142 3.300 ±0.0% −3.2% … +1.5% ⚪ within noise
octane-jsx replace 5.183 5.267 +0.9% −4.8% … +3.8% ⚪ within noise
octane-jsx add 3.092 2.958 −3.4% −10.3% … +3.7% ⚪ within noise
octane-jsx update 0.186 0.192 −2.5% −5.8% … +2.9% ⚪ within noise
octane-jsx select 0.111 0.110 +4.9% −2.9% … +11.0% ⚪ within noise
octane-jsx swap 0.174 0.180 −5.8% −12.9% … +5.2% ⚪ within noise
octane-jsx remove 0.167 0.171 +6.9% −1.1% … +15.4% ⚪ within noise
octane-jsx runlots 26.308 27.142 +3.2% −3.8% … +6.0% ⚪ within noise
octane-jsx select_lots 0.891 0.883 +1.3% −1.9% … +3.1% ⚪ within noise
octane-jsx clear 55.258 53.383 +0.9% −3.8% … +7.9% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

No changes across 111 measured values.

Public-import reachability bundles (bytes)

No changes across 141 measured values.

@domgan-oai
domgan-oai merged commit 067a4db into main Oct 29, 2026
52 of 55 checks passed
@domgan-oai
domgan-oai deleted the test/codemod-hn-timeout branch October 29, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent test PR: tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants