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
//! Workspace discovery — the first cross-trust-boundary phase.
//!
//! Given a workspace root, walk the filesystem with the [`ignore`] crate (the
//! same engine `ripgrep` uses), classify each directory as a component,
//! module, or environment, and emit an ordered, deterministic
//! [`Discovered`] structure for the loader and Terragrunt resolver to
//! consume.
//!
//! No HCL parsing happens here — only a regex-grade shallow probe of file
//! bytes (per [11-discovery.md § 3.3]) that the loader will redo definitively.
//!
//! This module is the **first slice of code** that touches user-controlled
//! filesystem state. Every byte off disk is treated as hostile per
//! [70-security.md § 1]: paths are NUL-rejected, canonicalised, and verified
//! to remain underneath the workspace root before any open.
//!
//! [11-discovery.md § 3.3]: ../../../specs/11-discovery.md
//! [70-security.md § 1]: ../../../specs/70-security.md
use Path;
pub use ClassificationReason;
pub use FsDiscoverer;
pub use ;
pub use ;
use crateResult;
/// Trait every discoverer implements. The default impl is [`FsDiscoverer`];
/// downstream tests / embedders may supply an in-memory variant by
/// implementing this trait directly.