Expand description
The Git change scope of one analysis run.
A run narrows its findings by at most one change scope: the changed files
of one global ref, or the per-workspace refs of workspaces.changedSince.
Every surface describes its inputs with a ChangeScopeRequest and calls
ChangeScope::resolve, which owns the precedence rule and the failure
policy. The resolved value owns the four things that must agree: the
result filter, the package_baselines provenance rows, the
package-baselines request outcome, and the scope flag that baseline
comparison and finding-id queries read. A surface therefore cannot apply
the filter and forget the flag, or read the package map where the caller
owns the scope.
The failure policy follows --changed-since. A malformed key or ref is
invalid input, and resolution fails. A map that cannot apply as written
stands down as a whole: a key that names no workspace of this project (for
example in a run from a package subdirectory), or a well-formed ref that
Git cannot resolve (for example in a shallow CI clone). The run then
reports in full scope and publishes a not-applied request outcome that
says so. The report is wider than asked, never narrower.
The filter applies to the final result of the run. A surface that narrows findings before type-aware refinement, to reduce sidecar work, applies the same scope again after refinement, because refinement can add findings.
Structs§
- Change
Scope - The resolved change scope of one run.
- Change
Scope Request - The change-scope inputs of one run.
- Package
Baseline Cache - The run-wide memo of the resolved package map.
Enums§
- Change
Scope Owner - Who owns the change scope of a run.
Functions§
- first_
package_ baselines - The
package_baselinesrows of a combined report: the rows of the first section that applied the map. The sections of one run resolve the same map, so a section without rows either did not run or used a global scope. - package_
baseline_ statuses - Project-relative package baseline rows, sorted by workspace root.