Skip to content

[phase2][test-gap] phase2 DSL specs: wrong outcome assertions and non-existent field for framework anchors #18

Description

@Anand-rahul

Problem

Three phase2 specs asserted "outcome":"bound" for selectors using framework-specific anchors (event_name, route_method, route_pattern). These anchors have confidence below the bound threshold (0.95), so the correct outcome is always reanchored.

Additionally, specs asserted contains: '"entity_kind":"Route"' — a field that does not exist in ResolutionMatch.

Confidence Values vs Thresholds

Anchor Confidence Outcome
qualified_name 1.0 bound (≥ 0.95)
body_hash 0.95 bound
event_name 0.92 reanchored (≥ 0.75)
topic_name 0.92 reanchored
function_signature 0.85 reanchored
route_pattern 0.80 reanchored
route_method 0.70 (below reanchored)
path_glob 0.55 (below reanchored)

Source: internal/semantic_overlay/resolve.goDefaultThresholdBound = 0.95, DefaultThresholdReanchored = 0.75.

Specs Fixed on impl/phase2

  • phase2/dsl/selectors-by-event-name.yaml"bound""reanchored"
  • phase2/dsl/selectors-by-route-method-and-path.yaml — same; also removed impossible "entity_kind":"Route" assertion
  • phase2/tracer-framework-demo.yaml — same fix

Non-existent Field

ResolutionMatch struct has fields: entity_id, qualified_name, confidence, via_anchor. It does not have entity_kind. Three specs were asserting on this missing field — the assertions were vacuously passing.

References

  • internal/semantic_overlay/anchors/event.goConfidenceEventName = 0.92
  • internal/semantic_overlay/anchors/route.goConfidenceRoutePattern = 0.80, ConfidenceRouteMethod = 0.70
  • internal/semantic_overlay/resolve.go — threshold constants
  • internal/semantic_overlay/overlay.goResolutionMatch struct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions