Problem
#320 restructured main so every invocation falls through to a single process::exit preceded by telemetry::finalize(), with the hidden telemetry send child as the sole intended early exit. Three pre-existing paths still bypass that tail (found by the #320 adversarial review):
crates/clickhousectl/src/local/mod.rs:489 — foreground local server start exits with the server child's exit code
crates/clickhousectl/src/local/docker.rs:389 and :522 — docker exec paths exit with the container command's exit code
These invocations produce no telemetry event when they end with a non-zero child exit code, and they skip the update-notice tail.
Design question
All three deliberately pass an arbitrary child exit code through to the shell, which Error::exit_code() (gh-style closed set: 0/1/2/4) cannot represent. Fixing this means either an Error variant carrying a raw exit code (and deciding how that interacts with the documented gh-style codes), or a dedicated "exit code override" channel from handlers back to main's tail.
Non-goal
The success paths of these commands (child exits 0) already flow through the tail and are counted normally; only the non-zero passthrough is affected.
Problem
#320 restructured
mainso every invocation falls through to a singleprocess::exitpreceded bytelemetry::finalize(), with the hiddentelemetry sendchild as the sole intended early exit. Three pre-existing paths still bypass that tail (found by the #320 adversarial review):crates/clickhousectl/src/local/mod.rs:489— foregroundlocal server startexits with the server child's exit codecrates/clickhousectl/src/local/docker.rs:389and:522— docker exec paths exit with the container command's exit codeThese invocations produce no telemetry event when they end with a non-zero child exit code, and they skip the update-notice tail.
Design question
All three deliberately pass an arbitrary child exit code through to the shell, which
Error::exit_code()(gh-style closed set: 0/1/2/4) cannot represent. Fixing this means either anErrorvariant carrying a raw exit code (and deciding how that interacts with the documented gh-style codes), or a dedicated "exit code override" channel from handlers back tomain's tail.Non-goal
The success paths of these commands (child exits 0) already flow through the tail and are counted normally; only the non-zero passthrough is affected.