Skip to content

Single-repo daemon: scoped global passes silently no-op (repo-slug vs empty RepoPrefix mismatch) #375

Description

@pbednarcik

Summary

On a single-repo daemon, the warmup arms the batch scope with the repo's non-empty slug while the store writes every node/edge with RepoPrefix="". The repo-keyed edge readers (frameworkRepoEdgesReadRepoEdgesByKinds) then return nothing under that slug, so every edge-driven scoped global pass silently produces zero results — framework dispatch synthesis, capability edges, test edges.

Impact (measured)

Cold-indexing a 8,535-file C# solution (131k nodes / 1.1M edges): first index reported global pass: framework dispatch synthesis with edges=0 across all 47 synthesizers. Re-indexing the same tree with GORTEX_INDEX_SCOPED_GLOBAL_PASSES=0: 34,827 edges (csharp-iface-dispatch 33,438, fn-value-callback 1,053, value-ref 327, …). ~35k call-graph edges silently missing, with no warning anywhere.

Repro

  1. gortex track <single repo> + gortex daemon start (cold store)
  2. After warmup, check the global pass: framework dispatch synthesis log line — all zeros on a codebase where e.g. interface dispatch must fire
  3. Offline against the same store: frameworkRepoEdges(g, map[string]bool{"<repo-slug>": true}, graph.EdgeProvides) → 0 rows; the same call with {"": true} → 1,593 rows

Suspected cause

daemon_state.go warmup collects res.RepoPrefix (non-empty slug) into the changed set and arms ArmBatchScope, while the unprefixed single-repo graph attributes all rows to "" (cf. the #270 unprefixed-graph comments). The scoped readers key on the slug and find nothing. frameworkScopePrefixes handles "" fine — the mismatch is upstream of it.

Workaround

GORTEX_INDEX_SCOPED_GLOBAL_PASSES=0

Found while validating #374 on a production codebase; happy to provide logs or test the fix.

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