[verified] Persist update diagnostics and strip terminal controls #35
Loading…
Reference in a new issue
No description provided.
Delete branch "astaranix/persist-warnings-clean-output"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix
Verification
nh os build --no-nomfixture: an evaluation warning survived 750 ANSI/OSC-bearing builder lines, and live build telemetry survived output eviction. Journal envelopes in these replay tests are synthetic; producer output is captured from the real executable.Existing validation limitations
manual_clampindetails.rs:1097andquestion_markinnotification.rs:141reproduce identically on the isolated base tree. No new strict diagnostics.iced::advanced::clipboard::Nulltest fixtures in unchangeddetails.rs. The exact check fails on both base and final source exports; package build and desktop smoke passed independently.ETXTBSYspawn failure, then passed on targeted retry and in the final full matrix without changing that fixture.No system activation, privileged updater behavior, dependencies, or legacy C++ changes.
## Fix - Keep observed warning/error totals per valid service invocation independently of the bounded output tail, so compiler output and phase changes do not erase them. - Protect active diagnostic counters using real worker unit observations, keep bounded independent replay history, and project only the current update's totals. - Strip CSI formatting/cursor commands, OSC title/hyperlink payloads, other terminal control strings, and their C1 forms before display redaction. Preserve readable Unicode and hyperlink labels; discard control-only output rows. - Preserve bounded journal cursor identity so distinct same-timestamp records remain distinct; include decoded Nix severity in the no-cursor fallback. Reject known retired-run replay before evicting another run. - Preserve Unicode following stray ESC and keep raw/decoded terminal controls from manufacturing lifecycle phases. ## Verification - Cargo default all-target matrix: 212 passed; 3 opt-in producer/journal fixtures excluded from the default run and explicitly exercised separately. - Cargo no-default-features all-target matrix: 80 passed. - Both real-nh replay tests explicitly passed against a fresh unprivileged `nh os build --no-nom` fixture: an evaluation warning survived 750 ANSI/OSC-bearing builder lines, and live build telemetry survived output eviction. Journal envelopes in these replay tests are synthetic; producer output is captured from the real executable. - The real offline-journal cold-open fixture also passed: 700 captured builder lines, aggregate starts removed, actual journal import and journalctl replay, 100 raw-tail records and 9 counter records recovered while compilation remained in progress. - Formatting and staged whitespace checks passed. - Built the aarch64 Nix tray package, no-default-features package tests, and packaged desktop smoke check against nixpkgs ffb3c9b700e759be2ef13237c9d8f953b32a1e46. - Regression tests cover diagnostic replay, record/byte/run bounds, active-invocation isolation, build-to-activation lifetime, terminal string families, unterminated/cancelled sequences, Unicode/redaction, and empty output suppression. ## Existing validation limitations - Strict Clippy remains non-green: `manual_clamp` in `details.rs:1097` and `question_mark` in `notification.rs:141` reproduce identically on the isolated base tree. No new strict diagnostics. - The package-audit source check remains non-green: its broad clipboard regex rejects existing `iced::advanced:📋:Null` test fixtures in unchanged `details.rs`. The exact check fails on both base and final source exports; package build and desktop smoke passed independently. - A pre-existing process lifecycle test hit one `ETXTBSY` spawn failure, then passed on targeted retry and in the final full matrix without changing that fixture. - Totals persist for diagnostics observed by this tray process; this does not reconstruct messages lost before observation or persist totals across tray restarts. Historical runs and retired-run tombstones are bounded; active invocations are protected from unrelated historical churn. No system activation, privileged updater behavior, dependencies, or legacy C++ changes.