Skip to content

fix(code): stop CLI arg tests hanging on a live Jira host - #20

Merged
danii1 merged 2 commits into
mainfrom
fix/cli-arg-test-timeout
Aug 19, 2026
Merged

fix(code): stop CLI arg tests hanging on a live Jira host#20
danii1 merged 2 commits into
mainfrom
fix/cli-arg-test-timeout

Conversation

@danii1

@danii1 danii1 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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

  • Point parse-only CLI tests at a closed local port (http://127.0.0.1:1) and skip git.
  • Honor DEVINTERN_FETCH_MAX_RETRIES=0 so Jira’s first ECONNREFUSED is fatal instead of sleeping through backoff.
  • Linear and Trello use raw fetch to hardcoded APIs, so also honor LINEAR_API_URL and TRELLO_API_BASE_URL and point those CLI cases at the same closed port.
  • Assert hyphenated keys are not unknown Commander options and that spawns did not time out.

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)

devintern-internal[bot] 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.
@danii1
danii1 merged commit e208fac into main Aug 19, 2026
1 check 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