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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// SPDX-License-Identifier: MIT OR Apache-2.0
//! Shared fuzzy match cascade for edit, replace, batch, and edit-loop (v0.1.30+).
//!
//! Workload: CPU-bound (string normalize + similarity scoring on one buffer).
//! Parallelism: multi-file at callers; intra-file window scoring uses rayon
//! (`windows::match_context_aware`) with bound fan-out and cancel polls.
//!
//! Cascade strategies (Auto/Aggressive): exact, line_trimmed, whitespace_normalized,
//! punctuation_normalized, indent_flexible, escape_normalized, trimmed_boundary,
//! block_anchor, unicode_normalized, context_aware_jw / context_aware.
//!
//! Product policy (v0.1.35): `Off` = exact-only (G-010). Guards: escape-drift,
//! match uniqueness, indent delta,
//! unicode preserve, always-on best_candidate + multi-candidates, diff_preview.
//!
//! v0.1.33 one-shot hardening:
//! - [`crate::fuzzy::apply_fuzzy_one_pass`] never re-scans inserted replacement text (sed-style).
//! - Default max applies = 1; `replacement.contains(pattern)` forces 1.
//! - Pattern / levenshtein / window caps + cooperative cancel poll via
//! [`crate::signal::is_global_shutdown`].
//!
//! v0.1.37: every scan loop polls the shutdown flag through `util::CancelPoll`,
//! cancellation propagates as [`crate::error::AtomwriteError::Cancelled`] (never as
//! a miss), and content above `[fuzzy].max_content_bytes` skips the cascade with
//! `InvalidInput`.
use ;
use ;
use ;
use ;
use crateFuzzyMode;
use crateAtomwriteError;
use crateBestCandidate;
include!;
include!;
include!;
include!;
include!;
include!;
include!;
include!;
include!;