Skip to content

Build juliati on TestItemRuns.jl (+ Esc/Ctrl-C cancellation) - #5

Merged
davidanthoff merged 1 commit into
mainfrom
testitemruns
Aug 22, 2026
Merged

Build juliati on TestItemRuns.jl (+ Esc/Ctrl-C cancellation)#5
davidanthoff merged 1 commit into
mainfrom
testitemruns

Conversation

@davidanthoff

@davidanthoff davidanthoff commented Aug 18, 2026

Copy link
Copy Markdown
Member

Part of the TestItemRuns migration. Needs TestItemRuns 1.1.0, which is registered.

src/engine.jl (634 lines of discovery, controller wiring, result assembly and console reporting) is deleted. What replaces it:

  • src/run.jl — a thin front end over TestItemRuns.run_tests, keeping the legacy NamedTuple filter contract and the progress_ui/output_mode/stream reporting options.
  • src/console.jlConsoleReporter, an event sink doing the progress bar, :log lines, output echo, summary and failure printing.
  • src/keys.jl — new: raw-mode stdin, Esc/q/Ctrl-C cancellation, CANCEL_EXIT_CODE = 130.

juliati runs once and exits, so it builds and closes its own TestSession rather than sharing the process-wide default one. JuliaWorkspaces and TestItemControllers are dropped from [deps] entirely — everything now comes through TestItemRuns' re-exports.

Net −663/+503 lines.

The one thing worth a close look

A --failfast run is cancelled underneath, and juliati maps a cancelled run to exit 130. Reporting a plain test failure as "the user interrupted this" would be a silent CI regression. TestItemRuns 1.1 reports a failfast run as :completed with stop_reason(run) === :failfast, so the existing cancellation check is already correct — and there is now a test pinning juliati --failfast to exit 1, not 130.

Rebased onto the four features that landed while this branch waited

All of them lived in the deleted engine.jl, so they are re-expressed as TestItemRuns kwargs rather than replayed: --failfast, --log-level, --activation-timeout, and the src/ext coverage roots (now the TestItemRuns default, so nothing to wire). Three things this branch had dropped are restored: write_lcov(...; root=abspath(opts.path)), the skipped-item exemption in the exit code, and the append-rather-than-assign JULIA_DEBUG semantics behind --debug.

test/test_engine.jltest/test_run.jl; it no longer tests an engine.

Verification

Pkg.test() green against the registered TestItemRuns 1.1.0: 226/226.

juliati smoke-tested end to end against the fixtures: --failfast exits 1 with one failure and the rest skipped; --log-level debug surfaces the package's own @debug; --coverage --coverage-lcov writes SF:src/AppTestPkg.jl — repo-relative, no test/ files; --activation-timeout 0.001 errors the items instead of hanging; --timeout none runs.

🤖 Generated with Claude Code

The discovery/execution engine moves to TestItemRuns.jl; TestItemApp keeps the
CLI, the console rendering (ConsoleReporter over the TestItemRuns event stream),
result files and exit codes. Pressing Esc/q or Ctrl-C during a run cancels it
cleanly (exit code 130), still writing the partial results.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@davidanthoff
davidanthoff marked this pull request as ready for review August 22, 2026 18:15
@davidanthoff
davidanthoff merged commit 769ff7e into main Aug 22, 2026
20 of 35 checks passed
@davidanthoff
davidanthoff deleted the testitemruns branch August 22, 2026 19:05
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