Skip to content

test(editormcp): bound the waits in the per-call notice test - #2726

Merged
houko merged 1 commit into
mainfrom
fix/editormcp-bounded-notice-waits
Dec 1, 2026
Merged

houko merged 1 commit into
mainfrom
fix/editormcp-bounded-notice-waits

Conversation

@houko

@houko houko commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2716.

Why

A -count=30 run of the first version of TestChangeStreamSendsOneNoticePerToolCall failed with only the test process exited before reporting an outcome. The log shows panic: test timed out after 20m0s: the test selected "ghost", which the fixture scene does not have, so no notice was sent and a bare <-got blocked until the package deadline. #2716 fixed the object, but the receives stayed unbounded, so any future missing notice would again hang the whole package instead of failing the test.

Change

The three receives go through one want(by) helper that times out after 5 s with timed out waiting for the selection by <who>, as TestChangeStream already bounds its own waits. Test-only; no behaviour change.

Verification

  • go tool nsgo test ./pkg/editor/editormcp -- -run '^TestChangeStream' -count=30 -race -cpu=1,4 on macOS arm64: 120 passed, 0 failed.
  • With the first select temporarily changed back to "ghost": the test fails in 5.1 s with timed out waiting for the selection by person instead of hanging for 20 minutes.

Screenshots

None.

The test read notices with bare channel receives. When its first version selected an object the fixture does not have, no notice came and the receive blocked until the 20-minute package deadline killed the binary, which nsgo test reports only as "the test process exited before reporting an outcome". Each wait now times out after five seconds and names the notice it was waiting for, as TestChangeStream already does.
@houko houko added the skip-changelog Internal change that needs no changelog.d fragment label Dec 1, 2026
@houko
houko merged commit bd524bc into main Dec 1, 2026
100 of 101 checks passed
@houko
houko deleted the fix/editormcp-bounded-notice-waits branch December 1, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/editor size/S skip-changelog Internal change that needs no changelog.d fragment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant