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
use ExtractedPair;
/// Cap recursion depth on adversarial structured input. A large document of
/// deeply nested arrays/maps can exceed the default thread stack; 256 is beyond
/// any real Terraform state, docker-compose schema, or Kubernetes List wrapper.
/// Single owner for the JSON (tfstate/jupyter) and YAML (k8s/compose) depth
/// guards so the two caps cannot silently drift apart.
pub const MAX_STRUCTURED_TRAVERSAL_DEPTH: usize = 256;
pub use parse_env;
pub use parse_hcl;
pub use ;
pub use resolve_line_number_options;
pub use ;
/// Pure query: is a structured-format parse/shape gap a REAL lost decode surface?
///
/// At decode depth 0 (`decode_derived == false`) the parsed text IS the original
/// file, so a gap genuinely drops the decode-through surface (the encoded values
/// never become scannable lines): it is real and the caller SHOULD record it and
/// emit its loud `warn!`.
///
/// At depth > 0 (`decode_derived == true`) the text is a buffer the
/// decode-through pipeline synthesised by splicing an already-decoded payload
/// back into the parent scaffold (`ChunkMetadata::decoded_span.is_some()`). Such
/// a buffer is not guaranteed to be valid YAML/JSON, and a value inside it has
/// already been decoded once - so re-failing to parse or re-decode it loses
/// nothing. The gap is NOT real and the caller should stay quiet (a `debug!` at
/// most); announcing a lost surface here would be a false Law-10 alarm.
///
/// This is a PURE predicate with no side effect: recording the telemetry counter
/// is the caller's separate decision via [`record_structured_gap`], so a per-
/// fragment `if gap_is_real(..)` check cannot double-count a file (the counter
/// counts FILES, not fragments).
pub
/// Effect: record ONE structured decode-through coverage gap against the
/// file-level telemetry counter (Law 10). Call at most once per file, only when
/// [`gap_is_real`] holds, the counter counts FILES that lost decode-through, so
/// a file with N malformed fragments/documents/values must still record once.
pub