Skip to content

kit-1257-fixture-commands-bounded: test/lib/kit.mjs's peekFixture and inboxFixture bound every command they run - #1015

Merged
hhff merged 5 commits into
mainfrom
ticket/kit-1257-fixture-commands-bounded
Dec 5, 2026
Merged

hhff merged 5 commits into
mainfrom
ticket/kit-1257-fixture-commands-bounded

Conversation

@hhff

@hhff hhff commented Dec 5, 2026

Copy link
Copy Markdown
Member

Follow-up to kit-1253's final review (F1): the test fixtures bareProject, peekFixture and inboxFixture ran their git and devteam commands with no time limit, so a hang there showed only TAP version 13 until run.mjs's 300 s watchdog killed the file.

What changes

  • test/lib/kit.mjs gets fixtureRun(step, shown, file, args, opts): spawnSync with a 60 s timeout and killSignal: 'SIGKILL' (a child that ignores SIGTERM keeps spawnSync waiting past a SIGTERM timeout). Past the limit it throws <fixture>: <command>: no exit in 60 s, killed; the same command asked for again in that process is refused at once, so a file that rebuilds its fixture per test still fails fast. With check, a non-zero exit throws as execFileSync did.
  • bareProject runs its three commands through it; nothing else in it changes.
  • peekFixture and inboxFixture run every dt and git call through it, and each prints one line, # peekFixture: <n> commands in <s> s, slowest <s> s: <command>, so CI logs show the fixture step times.
  • One visible change on success: git's stderr is no longer echoed to the test's output (spawnSync keeps it).

How to verify

  • A stand-in git or devteam that never exits and ignores SIGTERM, in each fixture step: on main each hangs to the outer kill; on this branch each throws in about 60 s, naming the step and the command. A real Chrome file (test/dashboard-peek.calls.test.mjs) with the hang printed only TAP version 13 until killed on main; on this branch it fails naming the step.
  • CI: every file that uses the fixtures or bareProject passes on every major.

One-way doors

None.

🤖 Generated with Claude Code

Hugh Francis and others added 5 commits December 5, 2026 08:14
…mmands

A fixture command past 60 s is killed (SIGKILL) and throws naming the
fixture and the command; one that ran out of time is refused at once after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…very command through fixtureRun

Each prints one line with its command count, total and slowest step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff
hhff merged commit d8031bd into main Dec 5, 2026
86 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant