From 75e28ca110002c5cb54d8ce309685e0ae3869d73 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Tue, 24 Nov 2026 08:48:47 +0100 Subject: [PATCH] deploy: drop the HIDDEN flag of the supervisor, a process cell that was written by --hidden and never read (STRA-338) The console is hidden by winsys::hide_console right where the flag was stored; nothing in the workspace loads supervisor::HIDDEN, so the cell and its exception entry go. cargo check -p leleka-deploy --all-targets passes. --- architecture.json | 1 - crates/deploy/src/app/entry.rs | 1 - crates/deploy/src/supervisor.rs | 3 --- 3 files changed, 5 deletions(-) diff --git a/architecture.json b/architecture.json index 7719d63a..28fc67ce 100644 --- a/architecture.json +++ b/architecture.json @@ -243,7 +243,6 @@ {"crate": "leleka-cuda-model", "file": "src/bringup_trace.rs", "ratchet": "process-global", "reason": "kept: the LELEKA_BRINGUP_TRACE switch, an `EnvSwitch` declared where it is read (same reason as env_switch.rs: immutable environment, and the crate is below the engine Settings owner)"}, {"crate": "leleka-cuda-model", "file": "src/command_profile.rs", "ratchet": "process-global", "reason": "kept: the LELEKA_PREFILL_PROFILE_SYNC switch (an `EnvSwitch`, reason of env_switch.rs) and TOTALS, the table of per-command timings that the profile report prints; diagnostics only, recorded from command wrappers that hold no profile handle"}, {"crate": "leleka-cuda-model", "file": "src/host_profile.rs", "ratchet": "process-global", "reason": "kept: the LELEKA_SERVE_PROFILE switch (an `EnvSwitch`, reason of env_switch.rs) and the thread-local SUMS of the host profile; diagnostics only"}, - {"crate": "leleka-deploy", "file": "src/supervisor.rs", "ratchet": "process-global", "reason": "debt: HIDDEN is set once by `--hidden` (the Windows logon task) in the entry point and read when the supervisor spawns its children (no console window). It belongs in the supervisor's options; it stays a cell until the options reach the spawn call"}, {"crate": "leleka-engine-qwen35-cuda", "file": "src/backend/config.rs", "ratchet": "process-global", "reason": "kept: RECONFIGURING (a reconfigure is reopening the serve stack, new generations are refused and retryable meanwhile) and INSTANCE (the number of the backend instance, taken by each spawn). Both describe the one engine of the process and are touched from the control thread and the request threads; open item: move them next to the backend handle when the engine builds on Windows (STRA-390) and can be compiled"}, {"crate": "leleka-engine-qwen35-cuda", "file": "src/backend/original_serve.rs", "ratchet": "process-global", "reason": "kept: PREFIX_SUMMARY, the prefix cache's pool summary that the owner thread publishes after each request and any status thread reads; its doc comment: one backend per process, so one cell"}, {"crate": "leleka-engine-qwen35-cuda", "file": "src/backend/original_serve/runner.rs", "ratchet": "process-global", "reason": "debt: PREVIOUS_TIER, the expert tier counters after the previous request, to turn stack-lifetime figures into a request's share; it belongs to the runner that reports each request, and stays a cell until the runner owns it (needs the engine to compile, STRA-390)"}, diff --git a/crates/deploy/src/app/entry.rs b/crates/deploy/src/app/entry.rs index 85c844f6..c7a750f4 100644 --- a/crates/deploy/src/app/entry.rs +++ b/crates/deploy/src/app/entry.rs @@ -47,7 +47,6 @@ pub async fn main_native(mut args: Vec) -> i32 { // `--hidden` (the logon task): hide the console window (the console itself stays, children stop through it). if let Some(index) = args.iter().position(|a| a == "--hidden") { args.remove(index); - crate::supervisor::HIDDEN.store(true, std::sync::atomic::Ordering::Relaxed); #[cfg(windows)] crate::winsys::hide_console(); } diff --git a/crates/deploy/src/supervisor.rs b/crates/deploy/src/supervisor.rs index c3eeb5e2..55e7c777 100644 --- a/crates/deploy/src/supervisor.rs +++ b/crates/deploy/src/supervisor.rs @@ -34,9 +34,6 @@ use tokio::{ const LOG_ROTATE_BYTES: u64 = 64 << 20; -/// Set by `--hidden` (the Windows logon task): the children get no console window. -pub static HIDDEN: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); - #[derive(Clone, Debug)] pub struct Options { pub config: PathBuf,