fix: add timeout to az CLI exec preventing test hangs in CI#483
Merged
bradygaster merged 1 commit intobradygaster:devfrom Mar 22, 2026
Merged
Conversation
af828e5 to
8fd1839
Compare
The execFileSync call in getAvailableWorkItemTypes had no timeout, causing CI test failures when az CLI is installed but slow to respond for nonexistent orgs (network timeout > 5s Vitest default). Adding a 2-second timeout ensures the catch block fires promptly, returning the fallback work item types without blocking tests. Fixes validateWorkItemType test timeouts on lines 751 and 807. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8fd1839 to
30af0e2
Compare
Collaborator
Author
|
@bradygaster This is ready for your review. Our team has reviewed and signed off:
Minimal change — 1 file, 3 lines. |
bradygaster
approved these changes
Mar 22, 2026
Owner
bradygaster
left a comment
There was a problem hiding this comment.
EECOM review: Change is correct and minimal. The 3s timeout on execFileSync in getAvailableWorkItemTypes prevents CI hangs when az CLI can't reach a real ADO org. Spread pattern preserves existing EXEC_OPTS cleanly. Catch block already returns sensible defaults. Branch is clean on top of dev — no rebase needed. Ship it.
This was referenced Mar 22, 2026
chrislomonico
pushed a commit
to clomonico/squad
that referenced
this pull request
Mar 26, 2026
…ster#483) * test: human journey — Power user (bradygaster#396) Add E2E journey test covering advanced shell features: - /help and /status slash commands - Tab completion for /commands and @agent names - Ctrl+C cancel during processing - Double Ctrl+C exit - Multiple slash commands in sequence - @agent direct routing with complex messages Closes bradygaster#396 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: human journey — My first conversation (bradygaster#384) Add E2E journey test covering a new user's first interaction with Squad: - Welcome banner display (title, version, agents, help hint) - First message submission and coordinator routing - Thinking indicator during processing - Receiving agent responses via ShellApi - /help command exploration - /status agent roster check - @agent direct message routing - Graceful exit (exit, quit, Ctrl+C) 28 tests across 8 journey steps using createShellHarness() pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: human journey — Something went wrong (bradygaster#386) Add E2E journey tests covering error scenarios users may encounter: - SDK connection failure shows helpful error message - Agent dispatch failure is caught and shown to user - Invalid /command shows conversational hint with /help - Network-like errors during streaming are handled gracefully - ErrorBoundary catches React rendering errors - Shell remains usable after errors (can submit new messages) - Error messages are user-friendly, not raw stack traces 21 tests across 7 describe blocks verify the full error UX. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
🚨 Fix: platform-adapter test timeouts blocking all PRs
Impact: All 4 open PRs are failing CI with the same error. This unblocks them all.
Root Cause
validateWorkItemTypetests (added in PR #444) callgetAvailableWorkItemTypes(), which internally runsexecFileSync('az', ['boards', 'work-item', ...])with no timeout.In CI, the Azure CLI is installed but there's no real ADO organization to reach. The
azcommand hangs indefinitely until Vitest's 5-second test timeout kills it:This affects every PR since #444 was merged into dev on 2026-03-20.
Fix
Added a 2-second timeout to the
execFileSynccall ingetAvailableWorkItemTypes(). When theazCLI doesn't respond within 2s (no ADO credentials, unreachable org, etc.), it throws and falls through to the default work item types — which is the correct behavior.Files Changed
Test Results
All 120 platform-adapter tests pass locally after the fix. The 2 previously-timing-out tests now complete in <100ms.
Note for maintainers
PR #444's CI
testjob showed as failed before merge. The timeout issue was present in the PR itself — it wasn't introduced by subsequent changes. Consider enforcing green CI before merge to prevent this pattern from recurring.