Skip to content

[Measurement] Add barrel + factory fixtures to extension-benchmark corpus #113

@AndresL230

Description

@AndresL230

Summary

PR #110 (A3 barrel re-exports + A5 factory/DI/aliased clients) added detection coverage for several cross-file patterns, but the D1 benchmark corpus in recost-dev/extension-benchmark does not exercise any of them. The recall gain (+2.94pp on the global metric) is real but not measurable per-pattern, and B2 (#81) dual-location work needs these fixtures to be testable.

Fixtures to add (in recost-dev/extension-benchmark)

  1. barrel-direct-reexportimport { X } from "./barrel" where barrel.ts does export { X } from "./real".
  2. barrel-aliased-reexportexport { x as y } from "./real".
  3. barrel-wildcardexport * from "./real".
  4. barrel-defaultexport { default } from "./real".
  5. factory-in-fileexport function makeClient() { return new OpenAI(); } consumed in same file.
  6. factory-cross-file — same as 5 but consumer is a sibling file.
  7. di-typed-constructorclass C { constructor(private ai: OpenAI) {} useIt() { this.ai.method(); } }.

Each fixture: src/, expected.json listing the resolved provider, file:line of each call site.

What to do here (in recost-dev/extension)

  • Once fixtures land in extension-benchmark, refresh benchmark/baseline.json to capture the new per-fixture metrics.
  • No code changes expected — A3/A5 already handles these patterns.

Acceptance criteria

  • 7 new fixtures in extension-benchmark covering each barrel/factory/DI shape.
  • Per-fixture metrics in benchmark output for each.
  • baseline.json refreshed to include them.

Depends on

Blocks

Reference

Memory: a3_a5_pr_status.md ("Corpus gap").

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/measurementdocs/accuracy/measurement.md — benchmark corpus and CI gatesenhancementNew feature or requestwave/2-traceabilityB2 dual locations + corpus expansion for resolved-call fixtures

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions