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§
- Feature
Namespace - Result of feature namespace extraction.
Enums§
- File
Role - 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-verifcrate. - 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.