Skip to content

Cap automatic scan ranges at 10k commits with a rev-list precheck - #123

Merged
RomainCscn merged 1 commit into
mainfrom
romain/lin-79789-scan-size-guard
Jul 27, 2026
Merged

Cap automatic scan ranges at 10k commits with a rev-list precheck#123
RomainCscn merged 1 commit into
mainfrom
romain/lin-79789-scan-size-guard

Conversation

@RomainCscn

@RomainCscn RomainCscn commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #122. An automatic scan range spanning more than 10k commits is never a real release delta — the anchor is stale or from another repository — and even a successful scan would link months of already-shipped issues to one release.

syncCommand now counts the range with git rev-list --count (~40 ms) before the heavy scan:

  • automatic ranges above SCAN_COMMIT_HARD_LIMIT (10k) warn and degrade to current-commit-only — same philosophy as Scan only the current commit when release anchors are unusable #119;
  • --base-ref ranges above it warn but proceed, since the range was explicitly requested;
  • if the count can't be determined, the scan proceeds unguarded (fails open).

The count is also printed under --verbose, so an oversized range is visible in CI logs before the scan starts.

Towards LIN-79789

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

LIN-79789

@RomainCscn
RomainCscn force-pushed the romain/lin-79789-scan-size-guard branch from fe8c5b0 to f83b8ac Compare July 27, 2026 09:29
@RomainCscn
RomainCscn force-pushed the romain/lin-79789-stream-git-log branch 2 times, most recently from 9b59ab1 to 8906dbf Compare July 27, 2026 09:35
@RomainCscn
RomainCscn force-pushed the romain/lin-79789-scan-size-guard branch from f83b8ac to 142a069 Compare July 27, 2026 09:35
@RomainCscn
RomainCscn requested a review from mwolting July 27, 2026 10:00
Base automatically changed from romain/lin-79789-stream-git-log to main July 27, 2026 10:05
@RomainCscn
RomainCscn force-pushed the romain/lin-79789-scan-size-guard branch from 142a069 to 5f590f7 Compare July 27, 2026 10:06
@RomainCscn
RomainCscn enabled auto-merge (squash) July 27, 2026 10:10
@RomainCscn
RomainCscn merged commit 4c8723e into main Jul 27, 2026
10 checks passed
@RomainCscn
RomainCscn deleted the romain/lin-79789-scan-size-guard branch July 27, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants