Skip to content

Drop file correlation, fetch one commit, report runner timings - #93

Merged
benjaminwood merged 1 commit into
mainfrom
manifest-timings
Nov 24, 2026
Merged

benjaminwood merged 1 commit into
mainfrom
manifest-timings

Conversation

@benjaminwood

Copy link
Copy Markdown
Contributor

What

  • Remove file correlation. FileCorrelator and file_correlation_collector.sh are gone, and the manifest no longer carries correlated_files.
  • Fetch one commit for the diff. The diff of modified test files fetches the target branch's tip instead of 1,000 commits. --depth is passed only when the clone is already shallow.
  • Add runner timings (Timings), sent with the manifest and in report_at_finish.

Why

Correlation. Before sending the manifest, the runner fetched the target branch 1,000 commits deep and ran git diff-tree once per commit. The server stopped using the result when co-change selection was removed. On a large Rails repository (28k files, starting from a depth-1 checkout) the fetch takes 9.0s and the correlation 7.0s. That's about 16 seconds on every PR build, after the run has started and while every runner waits.

Depth. The modified-test-files diff is a two-dot diff against the target's tip. It compares trees, so it needs no history: the depth-1 fetch takes 0.6s on the same repository. Fetching with --depth into a full clone makes the clone shallow, which the old 1,000-commit depth also did to a developer's checkout. Now a full clone is fetched without a depth.

Timings. When a run is slow, we can't see where a runner's time goes without the customer's CI logs. These are clock reads at points the controller already passes, with nothing on the hot path beyond that:

  • With the manifest (timings):
    • process_started_at (from /proc on Linux)
    • core_loaded_at
    • runner_ready_at (app boot plus spec load)
    • connected_at
    • manifest_requested_at
    • manifest_list_ms, manifest_tree_ms, manifest_diff_ms
    • manifest_sent_at
  • In report_at_finish (timings):
    • batches, examples
    • run_ms, example_ms, outside_examples_ms (framework and hook time around the examples)
    • wait_before_first_batch_ms, idle_between_batches_ms
    • result_write_ms
    • first_batch_at, last_batch_at

Times ending in _at are Unix epoch milliseconds, so the server can line them up with its own timestamps. Servers that don't read them ignore them; the manifest is validated on test_cases only.

Tests

  • timings_spec covers marks, measuring, the wait split and the examples-versus-batch accounting.
  • The controller specs check the startup timeline in the manifest, the batch totals at finish, and the fetch depth in shallow and full clones.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LGDurRkztG2taAhANKMgSA

The manifest step fetched the target branch 1,000 commits deep and ran
`git diff-tree` per commit to correlate the diff with spec files. The
server stopped using the correlation when co-change selection was
removed; on a large repository it cost about 16 seconds (9s fetch, 7s
correlation) on every PR build, after the run had started.

The modified-test-files diff is a two-dot diff against the target's tip,
which needs one commit. `--depth` is only passed in a clone that's
already shallow, since fetching with a depth into a full clone makes it
shallow.

Timings adds clock reads at points the controller already passes. The
manifest carries the startup timeline; report_at_finish carries batch
totals: time inside examples against the rest of each batch, and time
waiting before the first batch and between batches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGDurRkztG2taAhANKMgSA
@benjaminwood
benjaminwood merged commit db5aee9 into main Nov 24, 2026
20 checks passed
@benjaminwood
benjaminwood deleted the manifest-timings branch November 24, 2026 21:00
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