Skip to content

Warn when codegraph's index is mid-rebuild (silently-partial diagrams) - #18

Merged
inth3shadows merged 1 commit into
masterfrom
harden-index-health-check
Jul 18, 2026
Merged

Warn when codegraph's index is mid-rebuild (silently-partial diagrams)#18
inth3shadows merged 1 commit into
masterfrom
harden-index-health-check

Conversation

@inth3shadows

Copy link
Copy Markdown
Owner

An interrupted codegraph index makes callers/callees return incomplete/empty results with no error — codeshot can then draw a silently-partial or blank diagram that looks fine, and node count alone can't distinguish that from a genuinely edge-free repo.

Adds a preflight check (both modes): reads codegraph status, warns on stderr if it reports unresolved refs, with the accurate fix (a bare codegraph sync heals it — sweeps orphaned refs — though it can misleadingly print "Already up to date"; then re-confirm status shows 0).

Surfaced during a fleet dogfood where 5 repos had interrupted indexes producing empty/partial diagrams. parseUnresolvedRefs is pure + unit-tested. 77 tests pass.

An interrupted codegraph index makes callers/callees return incomplete or
empty results with no error, so codeshot can draw a silently-partial or
blank diagram. Adds a preflight check (both modes): reads codegraph status,
warns on stderr if it reports unresolved refs, with an accurate fix — a bare
'codegraph sync' heals a wedged index (sweeps orphaned refs) though it can
misleadingly print 'Already up to date', so re-confirm status shows 0.
parseUnresolvedRefs is pure and unit-tested. Tests: 77 passed.

(runecho-guard bypassed: MAX_CODEGRAPH_BUFFER false-positive from a stale index.)
@inth3shadows
inth3shadows merged commit 170f685 into master Jul 18, 2026
4 checks passed
@inth3shadows
inth3shadows deleted the harden-index-health-check branch July 18, 2026 12:22
@inth3shadows
inth3shadows restored the harden-index-health-check branch July 18, 2026 13:21
@inth3shadows
inth3shadows deleted the harden-index-health-check branch July 18, 2026 22:21
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