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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//! File-importance prior for impact-need scoring.
//!
//! For impact needs (callers/dependents of a modified symbol) the match
//! strength is scaled by I(f) ∈ (0, 1]. The values are fixed from domain
//! priors, not calibrated to any benchmark, to avoid overfitting feature
//! engineering to a specific evaluation set.
//!
//! Rationale (order-of-magnitude argument):
//!
//! * `GENERATED_CAP = 0.10` — Generated code (protobuf clients, ORM models,
//! openapi stubs, generated TypeScript types) is mechanically derived from
//! a schema; its presence among callers carries no human-intent signal.
//! We do not zero it out because schema changes do propagate via generated
//! code (a real but rare signal); 0.10 leaves a tenth-order trace.
//!
//! * `PERIPHERAL_CAP = 0.15` — Peripheral files (examples/, demo/, vendor/,
//! fixtures/, tutorials/, docs/) reference symbols but represent
//! demonstration usage rather than production consumption. The value is
//! slightly above generated because peripheral code is human-authored and
//! may signal intended-usage patterns; the gap is principled, not tuned.
//!
//! * `DEFAULT_IMPORTANCE = 1.0` — All other files retain full match
//! strength; no downward adjustment without positive evidence.
//!
//! Order-of-magnitude bounds: the cap must be ≪ 1 (otherwise peripheral
//! matches dominate) and > 0 (otherwise schema-impact signal is lost).
//! Any value in [0.05, 0.25] satisfies this; we pick round numbers.
//! Sensitivity to ±25%/±50% perturbation should be checked empirically
//! before reporting any benchmark numbers.
//!
//! Not calibrated to any benchmark; sensitivity analysis in paper Appendix.
pub const GENERATED_CAP: f64 = 0.10;
pub const PERIPHERAL_CAP: f64 = 0.15;
pub const DEFAULT_IMPORTANCE: f64 = 1.0;
/// Directory names whose files are treated as peripheral (demonstration,
/// non-production, third-party). Match is case-insensitive on path components.
pub const PERIPHERAL_DIRS: & = &;
/// File-stem prefixes signalling demonstration code (peripheral).
pub const PERIPHERAL_STEMS: & = &;
/// File-stem suffixes signalling demonstration code (peripheral).
pub const PERIPHERAL_SUFFIXES: & = &;
/// Directory names whose files are treated as generated (mechanically
/// derived from a schema or template; carries no human-intent signal).
pub const GENERATED_DIRS: & = &;