Skip to content

B-08 · Replace the benchmark harness injector with the actual src/core/inject.ts #36

Description

@MongLong0214

Background

assembleContext in bench/context.ts is a harness reimplementation. Because bench/tsconfig.json has rootDir: ".", bench/ cannot import src/, so the benchmark does not measure the shipped injector (src/core/inject.ts, T-402).

The file header states this explicitly:

v0.1 placeholder for the real injector (T-402) … T-703 replaces the body of this function with a call into the shipped injector.

Why this was not done in v0.1

When T-703 started, the CTO decided to keep it:

  1. The purpose of the rerun was the primary hypothesis test. Changing the intervention definition then would misalign the power analysis from the pilot and the comparison baseline
  2. buildInjection rejects --path . (ADR-0006 excludes repository-wide dumps). The no-scope ablation needs exactly that, so replacing it would create an ablation-only exception path and mix that exception into the treatment-arm definition
  3. The difference between the harness reimplementation and the actual injector was not itself the measurement target

Remaining risk

The benchmark numbers measure whether injection by the harness reimplementation reduces re-proposals, not whether CommitLore's injection does. If the two implementations diverge, the benchmark no longer represents the shipped product.

What this ticket must do

  • Make it possible for bench/ to reference src/ (or dist/) — adjust rootDir, use a separate tsconfig, or reference build artifacts
  • Decide how to produce the repository-wide projection required by the no-scope ablation (the injector already has an ablation flag, so using that path is natural)
  • Measure and record how much the injection text differs on the same tasks and the same seed before and after replacement. That difference is the error bound on the v0.1 benchmark numbers
  • Rerun the primary-hypothesis matrix after replacement

Evidence

  • grep -rn "from '../src|/dist/" bench/ → 0 results
  • bench/tsconfig.json: rootDir: "."
  • Every task has kind: synthetic — repository files are not copied into the workspace

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions