Pre-test report — PR #178 "Keep the default Windows Ctrl-C termination while loading" (head 43c6ea78)
Recommendation: DO NOT refer to hardware testing. This supersedes my 2026-11-26 report, which was written against the pre-rebase head 85fb08c that edited the deleted flare/src/main.rs (not opened). That blocker is gone; the reason not to test is now purely a fleet limitation.
- Our fleet cannot execute any changed line. The entire executable change is
#[cfg(windows)]: theSetConsoleCtrlHandler(Some(stop_console), 1)registration is removed fromrun()and re-added inserve_local(flare-cli/src/main.rs:704-710). cn5 (amd64 Linux, 4× RTX PRO 6000) and cn7 (arm64 Linux, GB10) compile it out and cannot deliver a WindowsCTRL_C_EVENT. Expected validation value on both hosts: zero — the fix cannot be observed and no regression can appear, because no Linux-visible line changes. - Nothing for a GPU benchmark to measure. No kernel, scheduler, transport, serving-loop or Unix change; the second file is two lines of prose. No A/B throughput test is in scope.
- Code is not the blocker; prose and evidence are. Architecture, Simplicity, Conventions and Correctness all report no blocking code defect at this head. What is missing is a correct PR description and a Windows compile.
1. What actually changed (verified independently)
| Item | Verified at head 43c6ea78 |
|---|---|
| Removed block | #[cfg(windows)] unsafe { if SetConsoleCtrlHandler(Some(stop_console),1)==0 {…} } deleted from run(), previously immediately after the Windows multi-host rejection (flare-cli/src/main.rs:178-186) and before load_core (:397) and NativeModel::load_agreeing (:313) |
| Added block | Same expression in serve_local at :704-710, after let session = loaded.start() (:696) and the #[cfg(unix)] libc::signal block (:699-703), before progress.finish_animation() (:711), start_dashboard() (:712) and the serving loop (:715) |
| Docs | docs/windows.md:141-142 rewritten in place (2→2 lines): "Ctrl-C and Ctrl-Break end loading immediately and drain native work before releasing CUDA resources once serving has started." |
| Unchanged | stop_console still returns 1 and stores STOP for Ctrl-C/Ctrl-Break (:737-746); Unix stop (:52-55) and both Unix installs (:647-651, :699-703) untouched; drain path session.close() (:719), !shutdown.drained (:720-725), drop(session) (:732) untouched |
| Dependency | None added; windows-sys with Win32_System_Console already enabled (flare-cli/Cargo.toml:49) |
| Single site | search_code SetConsoleCtrlHandler → flare-cli/src/main.rs:707 only (plus heliopause/src/processes_windows.rs:38 (not opened),48, a cdylib that is not a flare-cli dependency) |
The fix is reachable on Windows and is sound. Windows rejects every multi-host flag (:178-186), membership is None (:267-268), cluster is (None,None,None) (:315-319), and serve() dispatches if cluster.is_none() { return serve_local(...) } (:596-598); LoadedSession::new also rejects clustered owners (helios/src/server/session.rs:27-29). A registration failure at :707-709 returns with the session still owned, so ServingSession::drop → close() (session.rs:104-108) and DrainGuard (:125-133) either drain or retain the model. The diagnosis of the bug is correct: stop_console answering 1 suppresses the default termination, and on Windows nothing read STOP before the serving loop.
2. Corrections to the review summaries (these change what a tester would look for)
- False claim in the Value Proposition lens: "deleting the early registration also stops swallowing Ctrl-C in
flare downloadandflare models download." It does not.run()dispatchesDownloadat:91-93,Inspect:95-97,Doctor:99-105,Models:106-108,Parallax:110-112,HardwareRevision:114-118, all withreturnbefore the old registration site. Onlyflare runever reached it. - "Nothing reads
STOPbefore serving" nit: imprecise tree-wide (flare-cli/src/parallax.rs:217reads it) but correct for the path —parallaxreturns at:110-112before any handler exists, anddistribution.rs:192(not opened) /launch.rs:176(not opened) are#[cfg(unix)]. - Real behavior a tester would see, not a regression: after the loop at
:715exits,stop_consolekeeps returning1, so a second Ctrl-C duringsession.close()(:719) cannot escalate to a forced exit; Unixstop(:52-55) has the same gap. Likewise Ctrl-C during "Start server" (tuning graphs under 120 s per-graph deadlines,helios/src/execution/transport.rs:739-791) now terminates by default rather than being swallowed — deliberately smaller than the pre-PR window, which also covered download and load. - Abrupt exit is safe: hub transfers append to
.partblobs and install by rename (flare/src/hub.rs:787, 1585, 4586, 5302), cancellation goes throughcheck_cancel(:120and ~20 sites), andload_corewrites nothing durable. - Do not pursue
heliopause::CliSignalsreuse as a defect: it callsExitProcess(130)(heliopause/src/processes_windows.rs:16-51(not opened)), i.e. the no-drain exit this PR avoids, and is not aflare-clidependency. Maintainer call.
3. What must be fixed before merge (not hardware-testable)
- PR description is still wrong at head. It says "Register the handler immediately before
Server::start" and "A Ctrl-C duringServer::startsetsSTOP, so the serving loop exits at once"; the code registers afterloaded.start()(:696), so Ctrl-C during startup tuning is a default termination. It also says "neither compiled for nor run on Windows" while the author's 2026-11-28 comment reports Linuxcargo testpassing (221 passed / 0 failed / 3 ignored). Four lenses flag this; perAGENTS.md's description rules it should be rewritten before merge. - No
Discord:line in the description body (AGENTS.md:142-153), although the author's comment says one was added. Commit trailers (Signed-off-by,Design-Signed-Off-By) cannot be checked with the tools available here. - No Windows compile evidence.
.github/workflows/native-serving.yml:45(not opened) buildsflare-clionwindows-2022for everypull_request(:6, :20-21), tests it at:73, and runsflare.exe --help/--version/agentat:78-89. Per open PR #177 that job is red onmainfor unrelated reasons (I/O-ring DLL needs Windows build 22000+; 8 CLI test failures), so a CI run may not settle the build; the CPU-only alternative iscargo xwin build --locked --release --manifest-path flare-cli/Cargo.toml --target x86_64-pc-windows-msvc(docs/windows.md:29-36, ~15-30 min, no GPU). This is a build check, not a hardware test.
4. Conditional test plan — run only if a Windows 11 x64 host with an SM120/SM121 GPU joins the fleet
One session, ~1-1.5 h. No full suite, no A/B throughput, no cn5/cn7 run.
- Step 0 — build (stop if it fails):
cargo xwin build --locked --release --manifest-path flare-cli/Cargo.toml --target x86_64-pc-windows-msvc, or a native Windows build perdocs/windows.md:41-117. - Step 1 — behavior,
flare run CORE --gpus 0with one prepared core:- Ctrl-C during core download/verification → process exits within ~1 s, no swallowing; re-run resumes from
.partand the core still digest-verifies. - Ctrl-C during "Load tokenizer"/weight load (
flare-cli/src/main.rs:691-694) → exits within ~1 s; the nextflare runsucceeds (no orphaned lock). - Ctrl-C after the
http://…line (:715) → drains: "Shut down server" phase, exit 0, nonative replay did not drain; then complete one request to show the CUDA context is intact. - Record only (not pass/fail): Ctrl-C during "Start server" stays unresponsive until
Server::startreturns; a second Ctrl-C during the drain cannot force exit. Log the observed latency once for the maintainer.
- Ctrl-C during core download/verification → process exits within ~1 s, no swallowing; re-run resumes from
- Definition of done: 1.1–1.3 pass, 1.4 recorded.
Effort/value: value per affected Windows user is high (Windows is a documented first-class target with released x64/ARM64 binaries, and a multi-tens-of-GB download is every user's first path), and the change itself is a minimal, Unix-neutral relocation. But that value is realizable only on Windows hardware we do not have; on cn5/cn7 it is exactly zero. Refer the PR back for the description rewrite and a Windows compile, not to a test engineer.