Skip to content

feat(gfql): instrument the seeded typed hop, completing fast-path engagement - #1869

Merged
lmeyerov merged 4 commits into
masterfrom
feat/gfql-trace-seeded-hop
Aug 11, 2026
Merged

feat(gfql): instrument the seeded typed hop, completing fast-path engagement#1869
lmeyerov merged 4 commits into
masterfrom
feat/gfql-trace-seeded-hop

Conversation

@lmeyerov

Copy link
Copy Markdown
Contributor

Closes the coverage gap the engagement audit itself exposed. #1868 traced two of the three fast paths, so a clean audit only meant "the two instrumented ones fire"seeded_typed_hop is the third and last at this seam.

The audit result, now complete

Ten shape × engine combinations across pandas and polars: no silently-dead fast paths. Every shape engages the path it should, and the untyped shape correctly declines all three.

Its pin doubles as evidence about the others

seeded_typed_hop is consulted last, so seeing all three in one decision map proves the earlier two declined rather than short-circuited — which is the distinction that separates "working correctly" from "never reached".

The negative control did its job

Adding the third path broke test_a_shape_neither_path_serves_declines_both on pandas and polars. That was correct behaviour, not breakage: it asserts an exact dict, so instrumenting a new path forces it to be revisited. A negative control that silently ignores a new path stops being a control.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi

lmeyerov and others added 4 commits August 10, 2026 23:37
…agement

Closes the coverage gap the audit itself exposed: #1868 traced two of the three
fast paths, so a clean audit only meant 'the two instrumented ones fire'.
seeded_typed_hop is the third and last at this seam.

Its pin doubles as evidence about the other two: because it is consulted LAST,
seeing all three in one map proves the earlier paths DECLINED rather than
short-circuited.

The negative control caught this change, which is the point: it asserts an EXACT
dict, so adding a path forces it to be revisited. A control that silently ignores
a new path stops being a control -- the two failures on pandas and polars were
correct behaviour, not breakage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
CI caught a real regression, not a stale test: test_..._1767_cliff asserts every
SERVED step carries engine=='polars', and my fast_path records omitted engine
entirely. The right fix is the record, not the test -- engagement is a PER-ENGINE
property (a path can serve on one engine and decline on another; that is the
whole reason the pins are parametrized), so the engine belongs in it exactly as
it already does for adjacency decisions.

Both enum spellings reach the recorder, and str(Engine.POLARS) is 'Engine.POLARS'
not 'polars', so it normalizes to the wire value every other step records.

CHANGELOG entry added under Added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
…to str

CI (mypy 3.12-3.14): the executor holds 'EngineAbstract | str' at this seam --
post-parse but NOT yet narrowed to a Literal -- so EngineAbstractType was too
narrow for the call sites.

Named it TraceEngine in index/types.py rather than the two alternatives I would
otherwise have reached for: widening the parameter back to a bare str (which is
what the reviewer flagged in the first place) or casting at three call sites
(which hides the widening and trips the hygiene ratchet). One definition, with a
comment on WHY the type is wide there; the recorder still normalizes to the wire
value every other trace step uses.

mypy clean on all three modules; hygiene clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
Review pass on this PR's own additions, same rule applied to everything else:
- The enum-normalization prose appeared TWICE (both recorders) for a one-line
  expression that test_..._1767_cliff already pins by asserting engine=='polars'.
  Removed both.
- The per-engine rationale kept, at one line instead of three: WHY the field is
  recorded is a design reason, not something a passing test conveys.
- TraceEngine's note trimmed to why the type is wide, which is the only part the
  type system cannot state itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
@lmeyerov
lmeyerov merged commit d31822d into master Aug 11, 2026
69 checks passed
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