Skip to content

test(hcl): resolution-benchmark fixture's expected module-reference edges never materialize #2524

Description

@carlos-alm

Summary

Split out from #2385's "Also worth noting" section — a distinct issue from the dead-code misclassification that PR fixes.

tests/benchmarks/resolution/fixtures/hcl/expected-edges.json declares 2 calls edges (module.user_servicemodule.repository, → module.validators), but building that fixture yields 31 nodes, 27 edges, all contains — 0 of 2 expected edges actually materialize. The benchmark currently passes only because HCL's threshold in tests/benchmarks/resolution/resolution-benchmark.test.ts is { precision: 0.0, recall: 0.0 }.

That's self-consistent with HCL being parse-only (no call resolution), but it means the fixture and its manifest currently encode an aspiration ("HCL module references should resolve") that no test actually enforces or is expected to enforce given the current threshold.

Suggested fix

Either:

  1. Implement module block source-reference resolution (a module "x" { source = "./y" } block referencing another module) as a real edge type — distinct from function call resolution, since HCL has no functions/calls. This would raise HCL's benchmark threshold above 0.0/0.0 for this specific edge kind.
  2. Or, if that's not planned soon, annotate expected-edges.json / the fixture as aspirational-only (e.g. a comment or a pending: true manifest flag) so it isn't mistaken for a passing, enforced capability by a future reader.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions