Skip to content

fix: sel tail fails a build that did not finish - #157

Merged
natevick merged 2 commits into
mainfrom
natevick/cli-tail-unfinished
Nov 22, 2026
Merged

natevick merged 2 commits into
mainfrom
natevick/cli-tail-unfinished

Conversation

@natevick

Copy link
Copy Markdown
Contributor

sel tail now exits 1 on a build that didn't finish, so sel tail && deploy can't deploy an incomplete or cancelled build.

Needs the server change in selectiveci/selective, which adds status to the summary. Deploy the server first. Against an older server this CLI behaves as v0.4.0 does. No Linear ticket, because the workspace is at its free issue limit.

What changed

  • status of incomplete or cancelled exits 1, including when tests were flaky.
  • Every other case keeps its exit code: no status, an unknown one, success, and failed.
  • Pretty output says build did not finish: <status>. JSON output passes the line through unchanged.
  • sel tail --help and the README's exit-1 row now cover an unfinished build.

Checks

  • Stub server: incomplete and cancelled exit 1, and fail on main. 20 rows of other statuses match main for exit code, pretty output and JSON.
  • Real server, real websocket, re-run independently on e4de3f1: incomplete and cancelled exit 1, success 0, failed 1, retry-passed 2, and several runs with one incomplete exit 1.
  • Against a server without the change, 12 cases match the published v0.4.0 binary.
  • Dropping either status or letting flaky win fails tests by assertion.
  • go vet on all three platforms, go test -race, and golangci-lint 1.64.8 pass.

Not established

  • Each real-socket scenario ran once.
  • macOS and Windows were not run for this change.
  • An archived incomplete run with failures sends status: "failed", failed: 0 and still exits 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_0186m4FrY9RHAiNN1uxztLCp

Nate Vick and others added 2 commits November 22, 2026 10:39
A build whose summary carries status "incomplete" or "cancelled" now
exits 1, including when no test failed and when a test was flaky. Until
now such a build exited 0 (or 2 with a flaky test), so a pipeline gated
on `sel tail` read an unfinished build as a pass.

The pretty summary line names the state ("build did not finish:
incomplete") and its dot is no longer green. The ndjson stream is
unchanged: the summary line is passed through byte for byte.

Every other case keeps its exit code and output: no status (old
servers), an unknown status, "success", and "failed" (including
"failed" with 0 failed tests). A 1011 close with reason
summary_unavailable sends no summary and stays on the existing
retryable network_error path (exit 4).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186m4FrY9RHAiNN1uxztLCp
Exit 1 now also means a build that did not finish (status incomplete or
cancelled), since 42ac7c8. The help text and the README exit-code table
still said "real test failures" only. Both now say what exit 1 covers, in
the same lowercase style as the other rows. A test pins the help line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186m4FrY9RHAiNN1uxztLCp
@natevick
natevick marked this pull request as ready for review November 22, 2026 20:51
@natevick
natevick merged commit e7d757a into main Nov 22, 2026
1 check passed
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