scopeBackstop
scopeBackstop(
baseSha,files,decision,parsed,logLabel):object
Defined in: src/critic-core.ts:402
Deterministic scope backstop (Fix B2): drop any path-attributed finding whose file is
provably outside this PR’s diff (files), without trusting the LLM, then reconcile the
decision. Skips filtering (keeps ALL findings) when the base is unknown (baseSha null →
local-base fallback) or the file set is empty (no diff / git failure) — filtering against an
unknown/stale base could nuke real findings. Logs every drop + every skip (no silent cap).
Returns the (possibly flipped) decision and the post-filter findings; the caller still does
the request-changes summary fallback for the non-emptied case.
PURE: takes the resolved base/file set + a logLabel (the session id where the session
critic interpolated it) so both the session critic and the standalone PR critic reuse it.
Parameters
Section titled “Parameters”baseSha
Section titled “baseSha”string | null
string[]
decision
Section titled “decision”parsed
Section titled “parsed”string[]
logLabel
Section titled “logLabel”string
Returns
Section titled “Returns”object
decision
Section titled “decision”decision:
ReviewDecision
scoped
Section titled “scoped”scoped:
string[]