Skip to content

fix(graph): do not print uninspected status as measured zeros - #213

Open
dyk1454683243-sudo wants to merge 2 commits into
mex-memory:mainfrom
dyk1454683243-sudo:cursor/fix-graph-status-not-inspected-312a
Open

dyk1454683243-sudo wants to merge 2 commits into
mex-memory:mainfrom
dyk1454683243-sudo:cursor/fix-graph-status-not-inspected-312a

Conversation

@dyk1454683243-sudo

@dyk1454683243-sudo dyk1454683243-sudo commented Sep 19, 2026

Copy link
Copy Markdown

What

When immutable graph inspection is skipped (a stranded graph.db-wal is the filed case), mex graph status no longer prints placeholder zeros that look like real measurements.

GraphStatus now carries an additive inspected flag. Early-return paths that skip opening or reading the store set inspected: false. printStatus then labels parse health, last successful index, and sources as not inspected instead of 0 ok / never / 0 changed. --json keeps the existing zero parseHealth and changes objects; 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 ok and Last successful index: never even though the database was unchanged. Those zeros are placeholders from emptyParseHealth(), not measurements.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Docs
  • CI/Tooling

How to test

  1. npx vitest run src/graph/__tests__/cli-graph.test.ts src/graph/__tests__/status.test.ts
  2. Confirm sidecar-active status has inspected === false and human output does not claim 0 ok.
  3. Confirm a healthy inspected graph still prints real parse-health counts and inspected === true.
  4. npm run typecheck
  5. npm test

Checklist

  • Focused graph tests pass (npx vitest run src/graph/__tests__/cli-graph.test.ts src/graph/__tests__/status.test.ts — 58 passed, 1 skipped)
  • Typecheck passes (npm run typecheck)
  • Tests pass (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 reruns
  • No breaking changes (or documented below)
  • Tested locally with a real project

parseHealth and changes stay required non-null objects. inspected is optional and defaults to true on fully inspected paths, so existing consumers remain valid.

Code-graph changes

  • This PR targets main
  • A linked issue agrees on the bounded extractor/resolver scope
  • The change follows the frozen LanguageExtractor or FrameworkResolver interface
  • A focused fixture and assertions for the expected node/edge shape are included
  • Any new grammar WASM, extension mapping, extractor, or resolver is registered
  • No graph identity, reconciliation, schema, or drift-semantics changes are included, or a core / discuss-first issue is linked above

This is a status-reporting fix only. It does not change indexing, publication, or #205 orphan-candidate work.

cursoragent and others added 2 commits September 19, 2026 15:10
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>
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.

graph status prints uninspected fields as measured zeros — a stranded graph.db-wal reads as an empty graph

2 participants