Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ GITTENSORY_REVIEW_ENRICHMENT=false
# pendingReviewRequests,testRatio,migrationSafety,looseRange,terminology,todoMarker,magicNumber
# conflictMarker,debugLeftover,sizeSmell,floatingPromise,deepNesting,errorSwallow,unsafeAny,a11y
# i18n,unusedExport,exhaustiveness,flakyTest,commitLint,apiBreak,deprecatedDep,revertRecurrence
# coverageDelta
# coverageDelta,callerImpact
#
# Profile defaults:
# fast: dependency,dependencyDiff,lockfileDrift,secret,license,installScript,heavyDependency
Expand All @@ -85,15 +85,15 @@ GITTENSORY_REVIEW_ENRICHMENT=false
# commitHygiene,pendingReviewRequests,testRatio,migrationSafety,looseRange,terminology
# todoMarker,magicNumber,conflictMarker,debugLeftover,sizeSmell,floatingPromise,deepNesting
# errorSwallow,unsafeAny,a11y,i18n,unusedExport,exhaustiveness,flakyTest,commitLint,apiBreak
# deprecatedDep,revertRecurrence,coverageDelta
# deprecatedDep,revertRecurrence,coverageDelta,callerImpact
# deep: dependency,dependencyDiff,lockfileDrift,secret,license,installScript,heavyDependency
# hardcodedUrl,actionPin,eol,redos,provenance,codeowners,secretLog,assetWeight,typosquat
# commitSignature,iacMisconfig,nativeBuild,history,docCommentDrift,duplication,churnHotspot
# blameLink,approvalIntegrity,ciCheckSignals,undocumentedExport,staleBranch,commitHygiene
# pendingReviewRequests,testRatio,migrationSafety,looseRange,terminology,todoMarker,magicNumber
# conflictMarker,debugLeftover,sizeSmell,floatingPromise,deepNesting,errorSwallow,unsafeAny,a11y
# i18n,unusedExport,exhaustiveness,flakyTest,commitLint,apiBreak,deprecatedDep,revertRecurrence
# coverageDelta
# coverageDelta,callerImpact
# END GENERATED REES ANALYZERS

# Submitter-reputation spend control (internal-only): downgrades new/burst/low-rep
Expand Down
28 changes: 28 additions & 0 deletions apps/gittensory-ui/src/lib/rees-analyzers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,34 @@ export const REES_ANALYZERS = [
"Conservative and fail-safe: only an added line the report explicitly marks zero-hit is flagged, so a missing token, absent artifact, unparseable report, or fetch error yields no finding rather than a false one. Bounded by run, file, and line caps.",
},
},
{
name: "callerImpact",
title: "Caller impact of removed exports",
category: "quality",
cost: "github-heavy",
defaultEnabled: true,
profiles: ["balanced", "deep"],
requires: ["files", "github-token", "head-sha"],
limits: {
maxSymbols: 6,
maxSearches: 6,
maxFileFetches: 12,
maxCallersPerFinding: 5,
maxFindings: 25,
},
docs: {
summary:
"Flags an exported symbol the PR removes or renames away from an internal source file that unchanged in-repo files still import — a hidden cross-file compile/runtime break the diff-only reviewer cannot see.",
looksAt:
"Exported declarations dropped on removed (-) diff lines of changed non-entrypoint TS/JS source files, cross-referenced against callers resolved by repo-scoped GitHub Code Search on the default branch and confirmed by fetching each candidate file at headSha.",
reports:
"The removed symbol, its old-file line, and the unchanged caller file paths that still import it — never file contents.",
network:
"One bounded GitHub Code Search query per removed symbol plus bounded contents fetches at headSha to confirm each candidate caller. Requires headSha and GitHub token forwarding for private repos.",
notes:
"Distinct from api-break (entrypoint→downstream, no network) and unused-export (added→dead): this is a removed export that still has callers. A symbol re-added anywhere in the PR is never flagged; only a candidate confirmed to import the symbol from an internal module path counts (a comment, property, or third-party same-named import does not). Fail-safe: any search/fetch error, rate-limit, incomplete or malformed response, or aborted signal yields no finding rather than a fabricated one.",
},
},
] as const satisfies readonly ReesAnalyzerDoc[];

export const REES_ANALYZER_NAMES = REES_ANALYZERS.map((analyzer) => analyzer.name);
30 changes: 30 additions & 0 deletions review-enrichment/analyzer-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,36 @@
"network": "Calls the GitHub Actions runs and artifacts APIs and downloads one coverage artifact zip, each bounded by fixed fanout and byte caps. Requires GitHub token forwarding.",
"notes": "Conservative and fail-safe: only an added line the report explicitly marks zero-hit is flagged, so a missing token, absent artifact, unparseable report, or fetch error yields no finding rather than a false one. Bounded by run, file, and line caps."
}
},
{
"name": "callerImpact",
"title": "Caller impact of removed exports",
"category": "quality",
"cost": "github-heavy",
"defaultEnabled": true,
"profiles": [
"balanced",
"deep"
],
"requires": [
"files",
"github-token",
"head-sha"
],
"limits": {
"maxSymbols": 6,
"maxSearches": 6,
"maxFileFetches": 12,
"maxCallersPerFinding": 5,
"maxFindings": 25
},
"docs": {
"summary": "Flags an exported symbol the PR removes or renames away from an internal source file that unchanged in-repo files still import — a hidden cross-file compile/runtime break the diff-only reviewer cannot see.",
"looksAt": "Exported declarations dropped on removed (-) diff lines of changed non-entrypoint TS/JS source files, cross-referenced against callers resolved by repo-scoped GitHub Code Search on the default branch and confirmed by fetching each candidate file at headSha.",
"reports": "The removed symbol, its old-file line, and the unchanged caller file paths that still import it — never file contents.",
"network": "One bounded GitHub Code Search query per removed symbol plus bounded contents fetches at headSha to confirm each candidate caller. Requires headSha and GitHub token forwarding for private repos.",
"notes": "Distinct from api-break (entrypoint→downstream, no network) and unused-export (added→dead): this is a removed export that still has callers. A symbol re-added anywhere in the PR is never flagged; only a candidate confirmed to import the symbol from an internal module path counts (a comment, property, or third-party same-named import does not). Fail-safe: any search/fetch error, rate-limit, incomplete or malformed response, or aborted signal yields no finding rather than a fabricated one."
}
}
]
}
Loading
Loading