Skip to content

Fix CI for #125: cover the new spawn-failure branches in tests - #127

Closed
davidanthoff wants to merge 4 commits into
mainfrom
agents/fix-red-legs-in-test-item
Closed

davidanthoff wants to merge 4 commits into
mainfrom
agents/fix-red-legs-in-test-item

Conversation

@davidanthoff

Copy link
Copy Markdown
Member

Opened by Claude (Claude Code) on David's behalf.

This branch is #125 (disberd:fix/spawn-failure-errors-items at 8e6d7c8) plus one test commit. It fixes the red checks on #125. Merge this PR or #125 with the commit cherry-picked onto it, not both.

What was red on #125 and why

  • codecov/patch: 76.47% of the diff hit, target 83.36%. This is the only failure caused by Error the test items when the controller cannot spawn a test process #125. The missed lines were the "juliaCmd is run as a single program; pass arguments … in juliaArgs" hint (src/testprocess.jl), the unchanged "crashed during startup" @info branch next to the new launch-failure branch (src/testitemcontroller.jl), and two catch-only paths.
  • run-tests (macos-26, 1.13.1~aarch64): test_julia_versions.jl "Julia 1.9 platform" hung in Precompiling project... for BasicPackage until the 1800 s timeout. This is not related to Error the test items when the controller cannot spawn a test process #125. Earlier test_julia_versions.jl runs failed the same way on main and on release branches (runs 35488840838 and 36153559028).
  • run-tests (windows-latest, 1.13.1~x86): "A timed-out test item leaves hang diagnostics in its output" got only the header of the hang dump. The "Task backtraces" section never arrived before the process was killed. This is not related to Error the test items when the controller cannot spawn a test process #125 either: the PR does not touch the watchdog. Main's latest run (37085021065) also failed, on two other Windows legs with other timeouts.

Change

Two new test items in test/test_process_crash.jl:

  • A Julia command with arguments in it points the user at juliaArgs: runs with julia_cmd="julia +1.12". It checks that the item errors with "Could not start the test process" and with the juliaArgs hint.
  • A Julia process that exits during startup errors its test items as crashed: runs the real Julia with --no-such-option, so Julia exits before it connects. It checks that the item gets the "crashed before running test item" message and not the launch-failure one, and that the process is reported as terminated. This test also keeps the two messages apart.

Together they bring the patch coverage to about 88% (15 of 17 lines). The two lines that remain are catch-only paths.

Run locally on Windows with Julia 1.13.1: the spawn-failure, juliaArgs and startup-crash test items in test_process_crash.jl all pass (16/16 assertions).

The macOS and Windows flakes are left alone here; they need their own investigation.

🤖 Generated with Claude Code

disberd and others added 4 commits September 30, 2026 15:31
`start` spawns the test process before its own error handler. When the
spawn fails, for example because the program in `juliaCmd` does not
exist, the error escapes to the `@async` task in
`_launch_julia_process!`, and its `catch` only logs it. The reactor gets
no message, so the process stays in ProcessStarting, its test run never
completes, and a shutdown waits the full grace period for the process.

The `catch` now also posts `TestProcessIOErrorMsg(ps.id, :fatal)`, as
the other error paths in this file do. The existing fatal IO error path
then errors the queued test items and removes the process.
A `juliaCmd` that cannot be run is a configuration mistake, but it was
logged with `@error`. Under the crash-reporting logger that VS Code
installs, any `@error` sends a crash report and exits the test item
controller, so the reactor message added in the previous commit never ran
there.

`start` now catches the `IOError` from the spawn itself, logs a warning,
and posts the fatal IO error with a short reason such as
"`…/julia`: no such file or directory (ENOENT)". The reason is built from
the error code because the `IOError` message embeds the whole environment.
The startup-crash path errors the queued test items with that reason
instead of saying the process crashed. In `_launch_julia_process!`, which
now only sees unexpected errors, the message is posted before the
`@error` rather than after it.

New test: one controller completes a run with a bad `juliaCmd` and then
runs the same item with a working one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov/patch on #125 was below target because no test reached the hint
for a `juliaCmd` that holds arguments, nor the plain "crashed during
startup" branch next to the new launch-failure one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidanthoff

Copy link
Copy Markdown
Member Author

Superseded: the test commit was pushed directly onto #125.

@davidanthoff
davidanthoff deleted the agents/fix-red-legs-in-test-item branch October 3, 2026 06:34
davidanthoff added a commit that referenced this pull request Oct 5, 2026
1e169a21 Set version to v3.1.1
caa18a4c Merge pull request #127 from julia-vscode/crashfix/int64-request-ids
7b9fd4e3 Don't use `only` in the request id test
3b7b9e1b Type incoming request ids as Int64, not Int
14e3bb51 Merge pull request #125 from julia-vscode/dependabot/julia/UUIDs-lt-0.0.1-and-1
9b015bbe Merge branch 'main' into dependabot/julia/UUIDs-lt-0.0.1-and-1
c559dc3e Merge pull request #126 from julia-vscode/dependabot/julia/Sockets-lt-0.0.1-and-1
7d5d4a8e Update Sockets requirement to < 0.0.1, 1
1c342abf Update UUIDs requirement to < 0.0.1, 1
1857bf9c Merge pull request #124 from julia-vscode/claude/cancel-on-pr-close
28bdf569 Cancel the JSON 0.20 workflow's runs on PR close as well
9ee0cd5c Cancel CI runs when a pull request is closed
d8d83d82 Set version to v3.1.1-DEV

git-subtree-dir: packages/JSONRPC
git-subtree-split: 1e169a213b39b432e2861b50503a4a83cf4dcd9d
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.

2 participants