Repository navigation
test(#1560): the #533 label-shortcut tests take ~850 ms with every phase mocked — one hit 5785 ms on CI and turned main red at da9c4fd49 - #1567
Merged
admarble merged 2 commits intoOct 20, 2026
Conversation
… not spawn gh Entire-Checkpoint: 5b888560d042
3 tasks
…kflow-the-533-label-shortcut-tests-take-85
7 tasks
admarble
deleted the
feature/1560-test-workflow-the-533-label-shortcut-tests-take-85
branch
October 20, 2026 14:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What took the time: an un-mocked
gh issue viewsubprocess took the time.runIssueWithLoggingcallsresolveSpecRecommendation, which defaults to a realGitHubProvider. ItsfetchIssueCommentBodiesSyncrunsspawnSync("gh", ...)for fabricated issue numbers like #42. The test file mocked nogh, so each spec-phase test made a real GitHub call.Fix:
src/lib/workflow/batch-executor.test.tsnow spies onGitHubProvider.prototype.fetchIssueCommentBodiesSyncand returns[]in the top-levelbeforeEach.[]is what the method returns whenghfails, so chain behaviour is unchanged. No timeout was raised, no production code changed, and noexpectline was touched.0, so nolabelcase is over 200 ms.npx vitest run src/lib/workflow/batch-executor.test.tspasses: 151 tests, 0 failed.npm run buildandnpm run lintpass. I ran the wholebatch-executor.test.tsfile in place of the--changedset, since the only diff is that one test file.GitHubProvidersync calls hitting slow tests. The file-wide spy covers any spec-phase test in this file.beforeEach, so a future test that wants real fetch results must override it locally.Next step: the orchestrator opens the PR, and the body must include the AC-2 wording about the un-mocked subprocess.
Fixes #1560
Runner verification (2026-10-20)
After merging main (through #1475), the runner re-ran the ACs at 4882bd4:
0. The seven#533cases take 0–3 ms; they took about 850 ms before.batch-executor.test.ts151 passed.What took the time (AC-2):
resolveSpecRecommendationdefaults to a realGitHubProvider, and itsfetchIssueCommentBodiesSyncspawnedgh issue viewfrom inside the unit test. This was un-mocked I/O. A loaded CI runner stretched it past the 5 s default twice: main went red at da9c4fd and at 755d475 (reverts #1559 and #1562 closed after green re-runs).Still open:
run-orchestrator.test.ts(2 cases over 400 ms) andskills-preflight.test.ts(6) are slow for a reason not yet confirmed. #1506's fake GitHub provider is the structural fix for this class, and its context comment asks it to check those two files.🤖 Generated with Claude Code