Skip to content

explore-cross-call-dedup test fails on main since #2655 (struct field refs): call 2 re-sends cycle.go lines 31-35 #2756

Closed

Description

@inth3shadows

__tests__/explore-cross-call-dedup.test.ts fails on current main (a5fe6e1), in the case "a second call against a real index > never re-sends a line it already sent, and points at every line it withholds":

→ call 2 re-sent internal/usecase/payroll/cycle.go lines 31,32,33,34,35
Tests  1 failed | 25 passed (26)

Repro: CODEGRAPH_KERNEL=0 npx vitest run --project engine __tests__/explore-cross-call-dedup.test.ts on a clean checkout (Linux / WSL2, Node 22.23.2).

Bisect (verified). git bisect run with that test, first-parent, between b8d46d1 (#1788, where the test last changed; passes) and 6e24711 (fails). The first failing commit is a944ec3, "fix(go): a struct links the types its fields are declared with" (#2655). Its parent, c7b5038, passes.

Likely cause (inferred, not traced). Lines 31–35 of the fixture's cycle.go are the RunResult struct:

type RunResult struct {
	CycleID         string
	Payslips        []payroll.Payslip
	TotalGrossCents int64
	TotalNetCents   int64

Since #2655 the struct has a references edge to Payslip through its field. My guess is that this pulls RunResult into the second explore call by a new path, so its lines are sent again instead of being withheld as already sent. I haven't checked whether the dedup bookkeeping or the test's expectation is the part that should change.

Searched existing issues and PRs for this test name and for dedup: none open.

Related: #2655 (the commit the bisect lands on).

Activity

  1. added a commit that references this issue on Oct 21, 2026
    b43ccdb
  2. colbymchenry commented on Oct 22, 2026

    @colbymchenry
    Owner

    Thanks for the bisect. We reproduced it, and it also explains why the test passed on Windows: it fails whenever the fixture is checked out with LF line endings and passes with Windows' CRLF checkout. The cause is that explore's per-file character budget counts each line's \r.

    As you suspected, the output is fine. The re-sent lines are RunResult's 7-line struct, which the dedup re-sends whole on purpose when a held run is shorter than 8 lines.

    #2772 is merged to main. It fixes the test's expectation and gives the fixture the same line endings on every checkout.

  3. added a commit that references this issue on Oct 22, 2026
    1ef8866
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions