Skip to main content

Module scope

Module scope 

Source
Expand description

Scope classification and semantic connectivity logic for change request analysis.

Determines whether a change request’s changes are well-scoped (single logical unit) or spread across disconnected domains.

Structs§

FeatureNamespace
Result of feature namespace extraction.

Enums§

FileRole
Coarse role of a changed file for weak semantic connectivity.

Constants§

NON_CODE_EXTENSIONS
Known non-code file extensions that should be excluded from scope analysis.
NON_CODE_FILENAMES
Known non-code filenames (no extension) that are infrastructure/metadata. These are common across many OSS ecosystems and should not trigger test-coverage requirements.
NON_CODE_PREFIXES
Known non-code path prefixes that should be excluded from scope analysis.

Functions§

classify_file_role
Classify file role from path shape and filename conventions.
classify_scope
Classify the scope of a change request based on the number of connected components among its changed code files. Verified by Creusot in gh-verify-verif crate.
extract_feature_namespace
Extract a dominant feature namespace from a set of changed file paths.
is_non_code_file
Determine whether a file path refers to a non-code file.
resolve_import
Resolve an import path against a set of changed file paths. Returns the index of the matched file, if any.
semantic_path_tokens
Extract semantic tokens from path for weak matching.
should_bridge_aux_to_source
Bridge test/fixture file to a source file with semantic token overlap. Guards: source/aux balance, role check, parent_dir difference, and token overlap (≥5 chars, non-generic).
should_bridge_colocated_sources
Source-source weak bridge used for colocated feature files. Guarded by strict long-stem overlap to avoid short-name over-merging.
should_bridge_fork_variants
Bridge build-fork variants that share one canonical feature surface.
should_bridge_patch_semantic_tokens
Bridge files by semantic overlap of changed-patch identifiers.
should_bridge_test_fixture_pair
Bridge between test and fixture files that target the same behavior.