Skip to content

Narrow full-run fallbacks using dogfood telemetry - #39

Merged
adityankale190895 merged 3 commits into
mainfrom
claude/telemetry-driven-selection
Oct 22, 2026
Merged

adityankale190895 merged 3 commits into
mainfrom
claude/telemetry-driven-selection

Conversation

@adityankale190895

@adityankale190895 adityankale190895 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Narrows DiffCI's full-run fallbacks using telemetry from two dogfood repositories (256 verification receipts, 53 paired runs). Most full runs came from over-broad fallback rules rather than from changes that could affect tests. Every case that still cannot be traced stays on full validation.

Engine

  • ops/ and other infrastructure trees: only conventionally loaded definitions (wrangler, Dockerfile, terraform) force a full run. Code goes through the dependency graph, Markdown is documentation, and other files are resolved by reference.
  • .github/: only workflows and composite actions count as configuration. A workflow change forces a full run only when the workflow can run tests.
  • package.json: version, files and non-test scripts are treated as data, not behaviour.
  • Non-code files (site HTML, scripts, manifests, unimported assets) select the tests that read them, found by path, file-name or directory references. A file with no traceable reader still forces a full run.
  • Fallback reasons now name the files that triggered them. The original sentence stays as a prefix, so existing consumers keep categorising them.
  • The full suite is modelled from the test script, so a selection stays a subset of what npm test runs. Affected tests outside it are reported and run separately.
  • Tests that compile a named tsconfig project now depend on every file in that project.
  • Graph building no longer loads type libraries and memoises module-resolution probes (about 17% faster on a 2,000-file repository, identical graph).

CLI

  • verify --baseline-on-failure reruns a failed verification at the base commit, to separate new failures from existing ones.
  • Receipts record the DiffCI version, analysis time and graph confidence.
  • Selections longer than the shell's command-line limit run as batches (Windows cmd.exe stops at 8,191 characters).
  • Commands no longer inherit NODE_TEST_CONTEXT from a parent test runner.

Evidence

  • Replayed the full-run history of both dogfood repositories: 21 of 84 and 9 of 80 commit ranges became selective.
  • On the 21 selective ranges of one repository, ran the full suite and the selected subset back to back at each commit: about 34% less test time, and no failing test was missed (two ranges had failures and both were selected).

Before merging

  • Merge with a merge commit or rebase, not a squash. packages/diffci-cli now pins @diffci.com/core to 5fbbebb, the engine commit on this branch, because the CLI uses the new core modules. A squash merge would leave the pin pointing at a commit that is not on main, and it would need bumping again.
  • The release manifest lists the 11 new files, and the boundary audit passes.
  • All check, CLI package and release-consistency steps pass locally (Windows); Linux CI results are on this PR.

🤖 Generated with Claude Code

adityankale190895 and others added 3 commits October 22, 2026 13:22
Telemetry from two dogfood repositories (256 verification receipts, 53 paired
runs) showed most full runs were caused by over-broad fallback rules, not by
changes that could affect tests. This narrows them while keeping every
unresolvable case on full validation.

Engine:
- ops/ and other infrastructure trees: only conventionally loaded definitions
  (wrangler, Dockerfile, terraform) are global; code goes through the graph,
  Markdown is documentation, other files are resolved by reference.
- .github/: only workflows and composite actions are configuration. A workflow
  change forces a full run only when the workflow can run tests.
- package.json: version, files and non-test scripts are data, not behaviour.
- Non-code files (site HTML, scripts, manifests, unimported assets) select the
  tests that read them, found by path, basename or directory references;
  files with no traceable reader stay unknown.
- Global fallback reasons now name the files that triggered them.
- The full suite is modelled from the test script, so selections stay a subset
  of what `npm test` runs; affected tests outside it are reported separately.
- Tests that compile a named tsconfig project depend on every file in it.
- Graph building no longer loads type libraries and memoises resolution probes.

CLI:
- `verify --baseline-on-failure` reruns a failed verification at the base
  commit to separate new failures from existing ones.
- Receipts record DiffCI version, analysis time and graph confidence.
- Selections longer than the shell's command-line limit run as batches.
- Commands no longer inherit NODE_TEST_CONTEXT from a parent test runner.

The CLI package still pins an earlier core commit; bump the pin after this
lands.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The release boundary audit only admits reviewed files; the eleven modules and
tests added for telemetry-driven selection were missing from release-files.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The CLI's observe, verify and agent-selection paths use the new core modules
(file references, script universe, compiled projects), which the previous pin
4c76be1 does not contain. Pin to 5fbbebb, the engine commit on this branch.

Merge with a merge commit or rebase so that commit stays reachable from main;
a squash merge requires bumping the pin again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@adityankale190895
adityankale190895 merged commit 03bc0f5 into main Oct 22, 2026
14 checks passed
@adityankale190895
adityankale190895 deleted the claude/telemetry-driven-selection branch October 22, 2026 08:10
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