Skip to content

[cli] Read the added-file history once for every finding - #285

Merged
mcraveiro merged 1 commit into
mainfrom
feature/batch-the-added-walk
Dec 5, 2026
Merged

mcraveiro merged 1 commit into
mainfrom
feature/batch-the-added-walk

Conversation

@mcraveiro

Copy link
Copy Markdown
Member

A project's gate that blames the findings already on main walks the whole
history for the commit that added each file, once per finding. --follow
forces rename detection, which costs 8-15 s per call on ORE Studio; 277
inherited findings exceeded the fleet's 900 s gate timeout, and the gate
was changed to --no-blame to get through.

The added-file answer now comes from one git log --diff-filter=A --name-only walk, with every blamed path as a pathspec. A path added twice
answers with its newest addition, and a path it cannot trace still says so.

Measured on ores_dev_bright_faraday at merge base 9a214cd1, with compass
built from this branch:

Run Time
check --ratchet --no-blame 110.3 s
check --ratchet (0.0.15, before) >300 s, killed
check --ratchet (this branch) 111.6 s, 0 new diagnostics

The remaining blame cost (about 82 s) is the per-commit ancestry and
pull-request lookups, which were the same in 0.0.13. The story and task are
in the Sprint 2 documents PR (#284).

🤖 Generated with Claude Code

blame asked git for the commit that added each file with a --follow walk
of the whole history, once per finding. On ORE Studio that is 8-15 s a
call, and 277 inherited findings ran past the gate's 900 s timeout.

Walk the history once with the findings' paths as pathspecs and answer
each from the map. The pass on ores_dev_bright_faraday drops from more
than 900 s (and still running after 300 s) to 111.6 s, the same as the
ratchet without blame.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@mcraveiro
mcraveiro merged commit b4debfc into main Dec 5, 2026
5 checks passed
@mcraveiro
mcraveiro deleted the feature/batch-the-added-walk branch December 5, 2026 12:15

This branch was previously deployed

1 inactive deployment
CI — 6fe7adec Deployed Dec 5, 2026 by mcraveiro via linux-clang-release-ninja #572
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.

1 participant