fix(code): stop CLI arg tests hanging on a live Jira host - #20
Merged
Conversation
added 2 commits
August 19, 2026 11:19
Argument-handling tests spawned the real CLI against test.atlassian.net with no fetch timeout. Under pre-push load that lookup could sit until bun's 30s limit, failing CLI Argument Handling > should handle task keys that look like options and aborting PR creation. Point tracker traffic at a closed local port, skip git, and honor DEVINTERN_FETCH_MAX_RETRIES=0 so the first connection refused is fatal.
Those spawnSync cases still called api.linear.app and api.trello.com (raw fetch, so DEVINTERN_FETCH_MAX_RETRIES did not apply). Honor LINEAR_API_URL and TRELLO_API_BASE_URL and point parse-only CLI tests at a closed local port so they fail immediately instead of hanging.
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
CLI argument tests spawned the real CLI against live tracker hosts with no fetch timeout. Under pre-push load a lookup could sit until bun’s 30s limit and abort PR creation — the flake after DEV-74, even on a first push.
Changes
http://127.0.0.1:1) and skip git.DEVINTERN_FETCH_MAX_RETRIES=0so Jira’s firstECONNREFUSEDis fatal instead of sleeping through backoff.fetchto hardcoded APIs, so also honorLINEAR_API_URLandTRELLO_API_BASE_URLand point those CLI cases at the same closed port.Jira parse tests ~105ms; Linear 2.5s → ~110ms; Trello ~550ms → ~110ms.
Related: #18 (DEV-74), #19 (skip hook re-run when already on origin).
Test plan
bun test fetch-retry.test.ts(utils)bun test linear-client.test.ts trello-search.test.ts(task-trackers)bun run test cli.test.ts(code)