Documentation
¶
Overview ¶
Package changesurface reports extension blast radius from Git paths. Classification is path-only and deterministic so it is safe on Windows and in CI without depending on checkout-specific absolute paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatHuman ¶
func NormalizeUnifiedDiffPath ¶
NormalizeUnifiedDiffPath removes the marker prefix from a unified-diff header. It is intentionally separate from repository path normalization: porcelain and name-only paths may legitimately begin with a/ or b/.
func ParsePorcelainZ ¶
ParsePorcelainZ accepts `git status --porcelain=v1 -z` records. Rename records contain the new/target path in record[2:] followed by the old/source path in the next NUL-delimited field. Both are retained so a rename cannot hide a boundary edit.
func ValidateProfileOnlyPaths ¶
ValidateProfileOnlyPaths is useful to architecture fixtures that have a synthetic diff but do not need to construct an entire Report first.
Types ¶
type Category ¶
type Category string
const ( ExtensionOwnedProduction Category = "extension-owned-production" ProviderProfileData Category = "provider-profile-data" CanonicalContract Category = "canonical-contract" CoreRoutingRuntime Category = "core-routing-runtime" BackendPluginABI Category = "backendplugin-abi" Generated Category = "generated" TestsReference Category = "tests-reference" DocsSpec Category = "docs-spec" Other Category = "other" )
func ClassifyPath ¶
type Report ¶
type Report struct {
Paths map[Category][]string `json:"paths"`
Counts map[Category]int `json:"counts"`
}
Report is the stable machine-readable change-surface result.
func GitBaseReport ¶
GitBaseReport classifies the complete implementation delta from base to the current worktree. Untracked files are included so evidence can be generated before the final orchestration commit.
func GitStatusReport ¶
GitStatusReport classifies tracked, staged, and untracked paths at HEAD. It intentionally uses porcelain output rather than shell formatting, making path separators and rename handling stable across operating systems.
func (Report) CIOutputs ¶
CIOutputs returns the stable key/value contract consumed by GitHub Actions. Keeping this derivation next to path classification prevents shell workflows from growing a second architecture policy.
func (Report) HasCodeChanges ¶
HasCodeChanges reports whether the diff needs the repository code QA job. Documentation, dedicated evidence, and generated artifacts are intentionally excluded; every other category is a code-surface change, including profile data, because profile validation remains part of the code QA contract.
func (Report) IsProfileDataOnly ¶
IsProfileDataOnly reports whether the diff contains profile data and no protected production or unknown paths. It is the single policy used by CI and local profile-only checks.