Skip to content

fix(review): scan patch-less PR files for leaked secrets - #2821

Closed
RealDiligent wants to merge 13 commits into
JSONbored:mainfrom
RealDiligent:fix/secret-scan-patchless-files
Closed

fix(review): scan patch-less PR files for leaked secrets#2821
RealDiligent wants to merge 13 commits into
JSONbored:mainfrom
RealDiligent:fix/secret-scan-patchless-files

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Problem

The unconditional secret_leak hard blocker scans only + lines from buildSecretScanDiff. GitHub omits inline patch for binary/large changed files (>~1 MB), so those files produced header-only entries with no scannable body. A PR could commit a concrete credential (ghp_…, AKIA…, private key block, etc.) in a patch-less file and pass the gate.

Modified patch-less files were especially invisible: secretLeakFinding excludes (modified) headers from its scan corpus, so even filename-based detection did not run.

Root cause

buildSecretScanDiff only includes GitHub's inline patch when present. maybeAddSecretLeakFinding never recovered file body content for patch-less files, even though the grounding path already has a GitHub Contents FileFetcher (makeGithubFileFetcher).

Fix

When headSha is available at gate time:

  1. For each changed file with no inline patch (excluding removed):
    • added/renamed: fetch head content and synthesize + lines for the full file.
    • modified: fetch base + head and synthesize + lines for multiset-added lines only (same "additions only" semantics as the existing diff scan).
  2. Pass enriched files through the existing buildSecretScanDiffsecretLeakFinding path.

Fetch failures degrade to prior behavior (fail-safe; never destabilizes the gate).

Why this solution

  • Closes a deterministic bypass of an unconditional security hard blocker.
  • Reuses the existing Contents API fetcher (no new dependencies).
  • Preserves "scan only additions" semantics for modified files via multiset line diff.
  • Minimal, focused diff (+186 lines, mostly tests).

Testing

  • addedLinesForSecretScan unit test (multiset line diff).
  • enrichSecretScanFilesWithPatchFallback tests: patch-less added file with secret → secret_leak; patch-less modified with baseSha → secret_leak; modified without baseSha → no false scan of full head.
  • All existing parseSlopOpinion / buildSecretScanDiff / secretLeakFinding tests unchanged.
  • IDE TypeScript diagnostics clean. CI will run the full suite.

Risks

  • Extra GitHub Contents API reads for patch-less files at gate time (bounded at 512 KB/file, only when patch absent). Acceptable for a security hard blocker.
  • Modified files without baseSha still cannot be body-scanned (unchanged conservative behavior).

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 3, 2026 20:15
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.73418% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.01%. Comparing base (17fd0c7) to head (68808b6).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/queue/processors.ts 98.73% 0 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (98.73%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2821   +/-   ##
=======================================
  Coverage   96.00%   96.01%           
=======================================
  Files         258      258           
  Lines       28251    28329   +78     
  Branches    10275    10303   +28     
=======================================
+ Hits        27123    27200   +77     
  Misses        491      491           
- Partials      637      638    +1     
Files with missing lines Coverage Δ
src/queue/processors.ts 92.84% <98.73%> (+0.19%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
Exercise enrichSecretScanFilesWithPatchFallback edge cases and the
maybeAddSecretLeakFinding headSha wiring path so patch coverage meets
the 99% Codecov gate on JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 3, 2026
@loopover-orb

loopover-orb Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-04 01:35:28 UTC

3 files · 1 AI reviewer · no blockers · readiness 73/100 · CI failing · unstable

🛑 Suggested Action - Fix Blockers

  • Touches a guarded path — held for manual review

Review summary
The change correctly routes patch-less PR files through a bounded Contents API fallback before the existing additions-only secret scan, and it fails closed with a `secret_leak` finding when eligible content cannot be fully recovered. The multiset diff preserves the existing modified-file semantics and the tests cover added, modified, renamed, fetch failure, size cap, and wiring paths. The most notable maintainability concern is that the gate wiring creates the fetcher before checking whether enrichment has any eligible patch-less files, but that is not a correctness break.

Nits — 7 non-blocking
  • nit: `src/queue/processors.ts:6229` calls `makeGithubFileFetcher` whenever `args.headSha` is any non-empty string, even when every file already has an inline patch or is otherwise ineligible; filter for eligible patch-less files first so a token/fetcher setup failure cannot produce noisy logging on a path that needs no fallback.
  • nit: `src/queue/processors.ts:6229` checks the raw `args.headSha` while `enrichSecretScanFilesWithPatchFallback` trims it; use `args.headSha?.trim()` in the caller too so whitespace-only input skips the fetcher consistently.
  • nit: `src/queue/processors.ts:5557` puts every incomplete path into one finding detail, which can get very large on broad PRs; cap the displayed list and include a remaining count to keep advisory output bounded.
  • In `maybeAddSecretLeakFinding`, compute whether any file has no inline patch and is eligible under `shouldAttemptPatchLessSecretScan` before constructing the GitHub file fetcher.
  • Normalize `headSha` once in `maybeAddSecretLeakFinding` and pass the trimmed value down to `enrichSecretScanFilesWithPatchFallback`.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.

CI checks failing

  • codecov/patch — 98.73% of diff hit (target 99.00%)
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 109 registered-repo PR(s), 8 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 109 PR(s), 0 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 109 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Isolate patch-less enrichment failures so inline patches still scan, catch
per-file Contents API errors without blocking siblings, and add regression
tests for the fallback paths Codecov and the gate reviewer flagged.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Do not treat a failed base fetch as empty content, diff renamed files
against previousFilename at baseSha, and skip truncated oversize fetches
so pre-existing secrets are not mis-flagged as new leaks.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…SONbored#2821)

Update workflow-runner-labels expectations after main moved CI/audit to
ubuntu-latest (JSONbored#2825), and scan the leading 512KB of over-cap patch-less
files instead of skipping them entirely.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
Exercise enrichSecretScanFilesWithPatchFallback edge cases and the
maybeAddSecretLeakFinding headSha wiring path so patch coverage meets
the 99% Codecov gate on JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Isolate patch-less enrichment failures so inline patches still scan, catch
per-file Contents API errors without blocking siblings, and add regression
tests for the fallback paths Codecov and the gate reviewer flagged.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Do not treat a failed base fetch as empty content, diff renamed files
against previousFilename at baseSha, and skip truncated oversize fetches
so pre-existing secrets are not mis-flagged as new leaks.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…d#2821)

Mark patch-less files over the 512KB fetch cap as incomplete and emit a
secret_leak blocker instead of scanning a truncated prefix. Bound Contents
API concurrency during enrichment and drop the unrelated workflow test
hunk by rebasing onto main.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealDiligent
RealDiligent force-pushed the fix/secret-scan-patchless-files branch from a222414 to e352244 Compare July 3, 2026 21:29
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
Exercise enrichSecretScanFilesWithPatchFallback edge cases and the
maybeAddSecretLeakFinding headSha wiring path so patch coverage meets
the 99% Codecov gate on JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Isolate patch-less enrichment failures so inline patches still scan, catch
per-file Contents API errors without blocking siblings, and add regression
tests for the fallback paths Codecov and the gate reviewer flagged.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Do not treat a failed base fetch as empty content, diff renamed files
against previousFilename at baseSha, and skip truncated oversize fetches
so pre-existing secrets are not mis-flagged as new leaks.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…d#2821)

Mark patch-less files over the 512KB fetch cap as incomplete and emit a
secret_leak blocker instead of scanning a truncated prefix. Bound Contents
API concurrency during enrichment and drop the unrelated workflow test
hunk by rebasing onto main.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…bored#2821)

Mark patch-less files incomplete when Contents API fetch fails or returns
partial content, instead of silently skipping header-only entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealDiligent
RealDiligent force-pushed the fix/secret-scan-patchless-files branch from e352244 to 1873245 Compare July 3, 2026 21:31
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…ed#2821)

Exercise renamed/modified oversize paths, incomplete finding wiring,
default modified status, and bounded-concurrency fan-out for Codecov patch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealDiligent
RealDiligent force-pushed the fix/secret-scan-patchless-files branch from 4d2bd26 to 4b6c20b Compare July 3, 2026 22:09
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
Exercise enrichSecretScanFilesWithPatchFallback edge cases and the
maybeAddSecretLeakFinding headSha wiring path so patch coverage meets
the 99% Codecov gate on JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Isolate patch-less enrichment failures so inline patches still scan, catch
per-file Contents API errors without blocking siblings, and add regression
tests for the fallback paths Codecov and the gate reviewer flagged.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Do not treat a failed base fetch as empty content, diff renamed files
against previousFilename at baseSha, and skip truncated oversize fetches
so pre-existing secrets are not mis-flagged as new leaks.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…d#2821)

Mark patch-less files over the 512KB fetch cap as incomplete and emit a
secret_leak blocker instead of scanning a truncated prefix. Bound Contents
API concurrency during enrichment and drop the unrelated workflow test
hunk by rebasing onto main.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…bored#2821)

Mark patch-less files incomplete when Contents API fetch fails or returns
partial content, instead of silently skipping header-only entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…ed#2821)

Exercise renamed/modified oversize paths, incomplete finding wiring,
default modified status, and bounded-concurrency fan-out for Codecov patch.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…2821)

Use nullish checks for Contents API fetch results so legitimately empty
added/base files are scanned instead of hard-blocked as incomplete. Fix the
incomplete-finding test to assert on detail, not title.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
Exercise enrichSecretScanFilesWithPatchFallback edge cases and the
maybeAddSecretLeakFinding headSha wiring path so patch coverage meets
the 99% Codecov gate on JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Isolate patch-less enrichment failures so inline patches still scan, catch
per-file Contents API errors without blocking siblings, and add regression
tests for the fallback paths Codecov and the gate reviewer flagged.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Do not treat a failed base fetch as empty content, diff renamed files
against previousFilename at baseSha, and skip truncated oversize fetches
so pre-existing secrets are not mis-flagged as new leaks.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…d#2821)

Mark patch-less files over the 512KB fetch cap as incomplete and emit a
secret_leak blocker instead of scanning a truncated prefix. Bound Contents
API concurrency during enrichment and drop the unrelated workflow test
hunk by rebasing onto main.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…bored#2821)

Mark patch-less files incomplete when Contents API fetch fails or returns
partial content, instead of silently skipping header-only entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…ed#2821)

Exercise renamed/modified oversize paths, incomplete finding wiring,
default modified status, and bounded-concurrency fan-out for Codecov patch.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…2821)

Use nullish checks for Contents API fetch results so legitimately empty
added/base files are scanned instead of hard-blocked as incomplete. Fix the
incomplete-finding test to assert on detail, not title.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2821)

Route removed files through shouldAttemptPatchLessSecretScan and add tests
for blank headSha, renamed oversize head, and multi-path incomplete findings.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealDiligent
RealDiligent force-pushed the fix/secret-scan-patchless-files branch from 4b6c20b to d1f9e99 Compare July 3, 2026 22:21
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2454)

Port review-enrichment cross-line literal join into the unconditional
secret_leak gate so credentials split across consecutive + lines cannot
evade per-line regex matching. Preserves hunk/context boundaries and
patch-less synthetic diffs from JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent added a commit to RealDiligent/gittensory that referenced this pull request Jul 3, 2026
…red#2454)

Port review-enrichment cross-line literal join into the unconditional
secret_leak gate so credentials split across consecutive + lines cannot
evade per-line regex matching. Preserves hunk/context boundaries and
patch-less synthetic diffs from JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
RealDiligent and others added 10 commits July 4, 2026 08:41
GitHub omits inline `patch` for binary/large changed files, so
buildSecretScanDiff emitted header-only entries and secretLeakFinding
had no `+` lines to scan — the unconditional `secret_leak` hard blocker
could be bypassed by committing credentials in a patch-less file.

When headSha is available, fetch post-change file content via the
existing GitHub Contents fetcher and synthesize `+` lines: full head
content for added/renamed files, multiset-added lines vs base for
modified files when baseSha is known. Reuses makeGithubFileFetcher
(never throws) so fetch failures degrade to the prior behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise enrichSecretScanFilesWithPatchFallback edge cases and the
maybeAddSecretLeakFinding headSha wiring path so patch coverage meets
the 99% Codecov gate on JSONbored#2821.

Co-authored-by: Cursor <cursoragent@cursor.com>
…red#2821)

Isolate patch-less enrichment failures so inline patches still scan, catch
per-file Contents API errors without blocking siblings, and add regression
tests for the fallback paths Codecov and the gate reviewer flagged.

Co-authored-by: Cursor <cursoragent@cursor.com>
…red#2821)

Do not treat a failed base fetch as empty content, diff renamed files
against previousFilename at baseSha, and skip truncated oversize fetches
so pre-existing secrets are not mis-flagged as new leaks.

Co-authored-by: Cursor <cursoragent@cursor.com>
…d#2821)

Mark patch-less files over the 512KB fetch cap as incomplete and emit a
secret_leak blocker instead of scanning a truncated prefix. Bound Contents
API concurrency during enrichment and drop the unrelated workflow test
hunk by rebasing onto main.

Co-authored-by: Cursor <cursoragent@cursor.com>
…bored#2821)

Mark patch-less files incomplete when Contents API fetch fails or returns
partial content, instead of silently skipping header-only entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ed#2821)

Exercise renamed/modified oversize paths, incomplete finding wiring,
default modified status, and bounded-concurrency fan-out for Codecov patch.

Co-authored-by: Cursor <cursoragent@cursor.com>
…2821)

Use nullish checks for Contents API fetch results so legitimately empty
added/base files are scanned instead of hard-blocked as incomplete. Fix the
incomplete-finding test to assert on detail, not title.

Co-authored-by: Cursor <cursoragent@cursor.com>
…red#2821)

Route removed files through shouldAttemptPatchLessSecretScan and add tests
for blank headSha, renamed oversize head, and multi-path incomplete findings.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ed#2821)

When makeGithubFileFetcher or enrichment setup throws, mark eligible patch-less files incomplete instead of reverting to header-only scans. Inline patches still scan normally.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealDiligent
RealDiligent force-pushed the fix/secret-scan-patchless-files branch from d1f9e99 to c1a8b22 Compare July 4, 2026 00:41
RealDiligent and others added 3 commits July 4, 2026 08:51
…SONbored#2821)

Export secretScanPatchFallbackInternals for direct branch tests, exercise empty-file enrichment, ineligible patch-less paths when fetcher setup fails, and shouldAttemptPatchLessSecretScan status matrix to reach the 99% patch gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ov (JSONbored#2821)

Cover 512KB boundary, whitespace baseSha/previousFilename guards, helper exports, single-file concurrency, empty headSha gate skip, and webhook baseSha wiring so patch coverage clears the 99% gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
…2821)

The mock file content trailing newline produced an extra synthetic + line and failed validate-code in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb

loopover-orb Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs are re-reviewed automatically, so an inaccurate close may be reopened, but that does not guarantee it can merge (e.g. if conflicts or failing CI remain).

@loopover-orb loopover-orb Bot closed this Jul 4, 2026
loopover-orb Bot pushed a commit that referenced this pull request Jul 5, 2026
…#3493)

* fix(review): scan patch-less PR files for leaked secrets (#2821)

Extract patch-less secret-scan enrichment into patchless-secret-scan.ts with
full unit coverage. When GitHub omits inline diff for binary/large files,
fetch head/base content via Contents API and synthesize scannable + lines
before the unconditional secret_leak hard blocker runs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(review): cover default-status branch for patch-less secret scan (#3464)

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(review): use +1 fetch probe for patch-less secret scan cap (#3481)

The grounding FileFetcher returns maxChars+1 when content exceeds the cap;
pass SECRET_SCAN_FETCH_PROBE_CHARS so oversized files fail closed instead of
scanning a truncated prefix.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(review): precheck patch-less fetch and cap incomplete-path detail

Skip makeGithubFileFetcher when every file already has inline patch.
Cap fail-closed advisory path list (title keeps full count).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant