Skip to content

[TS Calls] Build class coverage experiment infrastructure - #476

Merged
CaelmBleidd merged 3 commits into
mainfrom
caelmbleidd/ts-calls-class-coverage-experiment
Oct 13, 2026
Merged

CaelmBleidd merged 3 commits into
mainfrom
caelmbleidd/ts-calls-class-coverage-experiment

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Calls needs class-wide coverage and bounded scheduling to compare its four policies under shared 30- and 120-second class budgets. This draft adds only infrastructure missing from the existing coverage PRs; their collectors, replay, metrics and identity machinery will be reused after they merge.

Implemented increments:

  • CoverageZone.CLASS tracks executable methods declared in the entry-point classes, including constructors and private helpers, and excludes foreign classes and bodyless declarations.
  • TsOptions.classCoverageTargets selects fixed target classes independently of wrapper entry points. Unknown/ambiguous targets, an explicit empty set and incompatible coverage modes are rejected. Scheduling and statistics tolerate entry points outside the tracked class scope.
  • maxEntryPointTimeQuantum bounds CONSTANT_TIME turns while retaining pending queues across visits. A step/solver operation can overrun the requested quantum; subsequent turns recompute their bounded share of the remaining budget.
  • removeCoveredEntryPoints = false disables coverage-based queue pruning for budget/exhaustion experiments. Both new options preserve existing behavior by default.

Validation after integrating main at 966273114337cfc37ab17e4d3bb2d4bd26d0242c: 19 core path-selector tests and 26 TypeScript class/completion/shared-analysis/sparse-array/overload tests passed (45 tests, zero failures or skips). TypeScript Detekt main/test and git diff --check passed. Core Detekt main/test reported no findings in changed files; their broader reports retain findings in untouched files.

Ignoring explicit targets makes the wrapper regression fail on a result assertion: one candidate per wrapper instead of two per target class. The bounded-turn and pending-state regressions also fail on result assertions when their production changes are disabled. The previously observed CI lint issue in the combined analysis method is removed by extracting class scope selection and validating immutable options at machine construction. The two previously failing sparse-array checks pass with the already merged main fixes. A fresh full CI result is still pending.

Existing infrastructure to reuse:

Remaining class-specific increments:

  • Scope the fixed coverage universe and checked hit mapping to executable source statements of the chosen class.
  • Connect completed-state/source-replay candidate capture to target-class novelty instead of entry-wrapper coverage.
  • Build constructor plus bounded method-sequence scenarios on one receiver within each scenario.
  • Connect the scheduling options, shared class budget and explicit stop reasons to those scenarios.
  • Extend existing metrics with scenario/method attribution and class-level replay acceptance.
  • Extend existing manifests/validation to class × profile × seed × budget and run a two-class pilot.

No new collector or duplicate coverage runner is included. Open PRs remain separate dependencies. Updates from main include only changes the user has already merged; their infrastructure is reused. The class experiment has not been run. Design notes and experiment plans stay outside the repository diff, and each increment is published as a separate commit.

@CaelmBleidd
CaelmBleidd force-pushed the caelmbleidd/ts-calls-class-coverage-experiment branch from d3c9c95 to 97f9877 Compare October 13, 2026 21:57
@CaelmBleidd
CaelmBleidd marked this pull request as ready for review October 13, 2026 22:01
@CaelmBleidd
CaelmBleidd force-pushed the caelmbleidd/ts-calls-class-coverage-experiment branch from 97f9877 to 106e4a9 Compare October 13, 2026 22:01
@CaelmBleidd
CaelmBleidd merged commit 14c2c27 into main Oct 13, 2026
6 checks passed
@CaelmBleidd
CaelmBleidd deleted the caelmbleidd/ts-calls-class-coverage-experiment branch October 13, 2026 22:02
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