fix(graph): do not print uninspected status as measured zeros - #213
Open
dyk1454683243-sudo wants to merge 2 commits into
Open
dyk1454683243-sudo wants to merge 2 commits into
dyk1454683243-sudo wants to merge 2 commits into
Conversation
When immutable inspection is skipped (sidecar/WAL, containment, or schema/invariant failures), GraphStatus now carries inspected: false. printStatus labels parse health, last index, and sources as not inspected so a stranded graph.db-wal no longer reads as an empty graph. Fixes mex-memory#204 Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
Add a fixture-only graph.db-wal case so sidecar-active status asserts inspected: false and human formatters do not print 0 ok, without depending on a full index build. Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When immutable graph inspection is skipped (a stranded
graph.db-walis the filed case),mex graph statusno longer prints placeholder zeros that look like real measurements.GraphStatusnow carries an additiveinspectedflag. Early-return paths that skip opening or reading the store setinspected: false.printStatusthen labels parse health, last successful index, and sources as not inspected instead of0 ok/never/0 changed.--jsonkeeps the existing zeroparseHealthandchangesobjects; consumers distinguish “not inspected” from an empty graph with the new flag.Why
Fixes #204
A healthy store with a non-empty WAL sidecar was reading as
Parse health: 0 okandLast successful index: nevereven though the database was unchanged. Those zeros are placeholders fromemptyParseHealth(), not measurements.Type of change
How to test
npx vitest run src/graph/__tests__/cli-graph.test.ts src/graph/__tests__/status.test.tsinspected === falseand human output does not claim0 ok.inspected === true.npm run typechecknpm testChecklist
npx vitest run src/graph/__tests__/cli-graph.test.ts src/graph/__tests__/status.test.ts— 58 passed, 1 skipped)npm run typecheck)npm test) — 4168 passed, 4 skipped; 7 failures were timeouts / setup-signing flakes unrelated to this status-reporting change and reproduced or vanished on isolated rerunsparseHealthandchangesstay required non-null objects.inspectedis optional and defaults to true on fully inspected paths, so existing consumers remain valid.Code-graph changes
mainLanguageExtractororFrameworkResolverinterfacecore / discuss-firstissue is linked aboveThis is a status-reporting fix only. It does not change indexing, publication, or #205 orphan-candidate work.