Skip to content

fix: repair broken test blocking all PR CI#67

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/broken-test-main
Mar 4, 2026
Merged

fix: repair broken test blocking all PR CI#67
github-actions[bot] merged 2 commits into
mainfrom
fix/broken-test-main

Conversation

@spboyer

@spboyer spboyer commented Mar 4, 2026

Copy link
Copy Markdown
Member

Problem

TestCopilotExecute_StartRespectsTimeout fails on every PR — the mock expects Start() to be called during Execute(), but Execute() calls CreateSession() directly. Start() is only called by Initialize().

This was introduced by PR #43's merge and is blocking CI on all 7 open PRs.

Fix

Changed the test to exercise Initialize() (which actually calls Start()) and verify error propagation. The regression guard for the deadlock fix (#31) is preserved — just targeting the correct code path now.

Verified

  • go test ./... -count=1 — all tests pass
  • Fix is minimal (7 insertions, 11 deletions in test file only)

Copilot AI review requested due to automatic review settings March 4, 2026 22:58
@github-actions github-actions Bot enabled auto-merge (squash) March 4, 2026 22:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a CI-blocking regression in Copilot engine tests by aligning the test with the engine’s actual lifecycle (where Start() is invoked via Initialize(), not Execute()).

Changes:

  • Updates the failing timeout-related test to call Initialize() and assert start error wrapping/propagation.
  • Adjusts test setup/mocking to reflect the corrected call path (and adds an import for constructing the mocked error).

Comment thread internal/execution/copilot_test.go Outdated
Comment thread internal/execution/copilot_test.go Outdated

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@richardpark-msft I've opened a new pull request, #68, to work on those changes. Once the pull request is ready, I'll request review from you.

spboyer and others added 2 commits March 4, 2026 18:25
The test was mocking Start() expecting Execute() to call it, but
Execute() calls CreateSession() directly — Start() is only called
by Initialize(). Fixed to test Initialize() error propagation
directly, which is the actual regression guard for the deadlock fix.

This test failure was blocking CI on all open PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rename TestCopilotExecute_StartRespectsTimeout to
  TestCopilotExecute_InitializePropagatesStartError to match
  what the test actually asserts
- Use errors.New instead of fmt.Errorf for constant string (staticcheck S1028)
- Remove unused fmt import

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@spboyer spboyer force-pushed the fix/broken-test-main branch from dd13355 to a899545 Compare March 4, 2026 23:25
@github-actions github-actions Bot merged commit 91cade3 into main Mar 4, 2026
6 checks passed
spboyer added a commit to spboyer/waza-fk that referenced this pull request Mar 5, 2026
* fix: repair broken TestCopilotExecute_StartRespectsTimeout mock setup

The test was mocking Start() expecting Execute() to call it, but
Execute() calls CreateSession() directly — Start() is only called
by Initialize(). Fixed to test Initialize() error propagation
directly, which is the actual regression guard for the deadlock fix.

This test failure was blocking CI on all open PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: address review feedback — rename test, use errors.New

- Rename TestCopilotExecute_StartRespectsTimeout to
  TestCopilotExecute_InitializePropagatesStartError to match
  what the test actually asserts
- Use errors.New instead of fmt.Errorf for constant string (staticcheck S1028)
- Remove unused fmt import

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chlowell pushed a commit to chlowell/waza that referenced this pull request Mar 5, 2026
Also, shuffled some gitignore rules around so we're not ignoring our own source code.
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.

4 participants