1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//! #4067: the per-load CSG diagnostics summary `tracing::warn!` in
//! `processor/mod.rs` used to describe EVERY recorded `CsgFailure` as
//! "cut dropped, host kept uncut." That is false for a `KernelError` record —
//! `rust/geometry/src/csg/topology_diagnostic.rs` is the sole production
//! emitter, and its doc comment is explicit that it "record[s] accepted
//! nonempty open-topology results without changing the returned mesh" — the
//! mesh the caller returns is the SAME one that was about to be returned
//! anyway, not a dropped cut replaced by an un-cut host.
//!
//! Pulled the message choice out into its own pure function so the text can
//! be asserted directly, without standing up a tracing-subscriber capture
//! harness just to check a string literal.
//!
//! Its tests live in the sibling `csg_summary_tests.rs`, declared from
//! `processor/mod.rs` (same pattern as `determinism_tests.rs` /
//! `simplify_session_tests.rs` off `lib.rs`), rather than as an inline
//! `#[cfg(test)] mod tests` here: an inline `mod tests` lives inside the
//! same file `scripts/check-test-revert-oracle.mjs` reverts to prove a
//! changed test observes the production change it covers, so it would be
//! deleted along with the code on that revert.
/// Choose the summary phrase for the CSG diagnostics warning, given how many
/// of this load's records are genuine drops (host kept uncut) versus
/// `KernelError` accepts (mesh unchanged, informational open-topology
/// finding — see module doc above). `dropped` and `open_topology_accepted`
/// are disjoint partitions of the same failure list, so exactly one of the
/// three arms applies.
pub