Skip to main content

Module importance

Module importance 

Source
Expand description

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.

Constants§

DEFAULT_IMPORTANCE
GENERATED_CAP
GENERATED_DIRS
Directory names whose files are treated as generated (mechanically derived from a schema or template; carries no human-intent signal).
PERIPHERAL_CAP
PERIPHERAL_DIRS
Directory names whose files are treated as peripheral (demonstration, non-production, third-party). Match is case-insensitive on path components.
PERIPHERAL_STEMS
File-stem prefixes signalling demonstration code (peripheral).
PERIPHERAL_SUFFIXES
File-stem suffixes signalling demonstration code (peripheral).