Zero-node warning (#1666) fires on data .json that #1224 skips by design, so it always asks users to report intended behaviour
Summary
The zero-node warning added for #1666 fires on data-shaped .json files that extract_json skips on purpose per #1224. Because the skip is deliberate and deterministic, the warning's own escalation advice — "A re-run will retry them (empties are no longer cached); if it persists, please report the file(s)" — is guaranteed to trigger: it never stops persisting, so it reliably instructs users to report a settled design decision.
I hit this on a real repo and got as far as drafting the report before reading extractors/json_config.py and finding the behaviour is intended. That is the failure mode: the warning converts an intentional skip into an apparently-actionable bug.
Reproduction
Any repo containing data JSON with no manifest-recognition key. On graphify 0.9.20:
warning: 8 source file(s) produced zero nodes and are absent from the graph:
stateful_corpus.json, stateless_corpus.json, underwrite_payload.json,
alfa-overview.json, alfa-underwriting.postman_collection.json (+3 more).
A re-run will retry them (empties are no longer cached); if it persists,
please report the file(s) (#1666).
Re-running graphify update . reproduces the identical list — as it must, since nothing about these files will ever change the outcome.
Why these files are skipped (working as designed)
extract_json recognises a config/manifest by filename or a top-level key probe (dependencies / extends / $ref / $schema / compilerOptions), and deliberately skips everything else — per its docstring, AST-walking data JSON "produced hundreds of orphan key-nodes and duplicate communities that swamped real structure (#1224)".
Confirmed none of the 8 carries a probe key:
| file | top-level keys | outcome |
|---|---|---|
benchmarks/stateful_corpus.json |
_comment, now, scenarios, seed |
skip |
benchmarks/stateless_corpus.json |
_comment, scenarios |
skip |
benchmarks/underwrite_payload.json |
coverage, flight, live_context, sale |
skip |
deploy/grafana/dashboards/alfa-overview.json |
annotations, panels, refresh, schemaVersion, tags |
skip |
portal/src/locales/{en,ru}.json |
common, controls, coverage, cta, dashboard |
skip |
portal/public/postman/*.json (×2) |
info, item, variable / _postman_variable_scope, id, name, values |
skip |
Worth noting the Grafana dashboard is a near-miss: it has schemaVersion, not $schema.
Size is not the trigger either — these run 690 B to 21 KB, far under the 1 MiB cap, and all parse cleanly.
Suggested fix
Same shape as the resolution of #1689, which separated "no extractor exists" from "extractor ran and produced nothing":
Let extract_json distinguish intentionally skipped from unexpectedly empty — e.g. return a skipped: "data-shaped json (#1224)" marker alongside the empty node list — and have the zero-node warning exclude those files from the "please report" bucket. If they are still worth surfacing, a separate non-actionable line would do it without implying a defect:
note: 8 data .json file(s) were skipped by design (#1224) and are not in the graph.
That keeps the #1666 warning meaning what it was built to mean — this is anomalous, tell us — instead of firing on the one category where zero nodes is the correct answer.
Minor, related
The warning advises graphify extract --force, which is correct but is not listed in graphify --help (which documents update, cluster-only, path, explain, diagnose, watch, …). graphify extract --force . does work. Running it without a path returns error: must specify a path to scan or a --postgres DSN, which reads like "unknown subcommand" and briefly convinced me the command did not exist. Listing extract in --help would remove the ambiguity.
Environment
- graphify (
graphifyy) 0.9.20, uv tool install, macOS (Darwin 25.6.0), Python 3.12 - Repo: ~500 source files, Python + Java + TypeScript + Rust
Companion enhancement filed as #2108 — emitting a bare file node for these files would also make them non-anomalous, which would resolve this warning's false positive at the same time.
More files doing exactly what this issue predicts. The warning asked us to report them, so here they are:
.claude/settings.local.json
docs/baselines/pre-ihomemanager-entities.json
docs/evidence/dashboard-assessment-2026-07-20/assessment.json
docs/evidence/dashboard-assessment-2026-07-20/strengths.json
tests/render_parity/fixtures/predbat_plan_rows.json
All pure data, none source. First hit on 0.9.17; re-checked after upgrading to 0.9.29 and detect() still classifies them (now 9 such files in our repo, the newer ones being test fixtures) as code. The recurrence compounds it: empties are re-attempted on every invocation including update, so the warning and the wasted pass recur each run. +1 for #2108's bare-file-node approach so these stay discoverable without the warning.
Still reproduces on 0.9.27 (this was filed against 0.9.20), so it has survived seven releases.
Minimal two-file repro, in case a synthetic case is easier to test against than a real tree:
mkdir gfrepro && cd gfrepro && git init -q .
printf '{"views": {"2026-01-01": {"count": 8, "uniques": 2}}, "clones": {"2026-01-01": {"count": 3, "uniques": 1}}}\n' > timeseries.json
printf 'def hello():\n return "hi"\n' > code.py
graphify update .
warning: 1 source file(s) produced zero nodes and are absent from the graph:
timeseries.json. A re-run will retry them (empties are no longer cached); if
it persists, please report the file(s) (#1666).
[graphify watch] Rebuilt: 2 nodes, 1 edges, 1 communities
timeseries.json carries none of the probe keys, so _is_config_json declines it exactly as designed — the warning is the only thing treating that as anomalous.
On the repo that led me here, the warning names 66 files on every build (all pure data JSON — per-record time series). Two consecutive graphify update . runs emitted byte-identical output, same 66 files and the same 95 nodes, 118 edges, 16 communities, confirming the "a re-run will retry them" advice can never change the result.
One small thing I did not see mentioned: the warning directs users to #1666, which is closed (and is about Ruby files yielding zero nodes in full-repo runs on 0.9.6). Following the pointer lands on a resolved, unrelated issue, which adds a step to working out that the behaviour is intended. If the warning survives in any form, pointing it at this issue instead would help.
Still reproduces on 0.9.41, filed against 0.9.20. Two details I did not see in the thread yet, both of which make the fix smaller than the issue implies.
1. The skipped marker this issue asks for already exists.
The suggested fix was to have extract_json "return a skipped: ... marker alongside the empty node list" and then exclude those files from the warning. The producer half is already done, and predates this issue: extractors/json_config.py returns
return {"nodes": [], "edges": [], "skipped": "data json (not a config/manifest)"} # L210
return {"nodes": [], "edges": [], "skipped": "data json (non-object root)"} # L214
and that file has not changed since b3dc15b (2026-07-14), a week before this was filed. So nothing needs to be added to the extractor. The gap is purely consumer-side: the #1666 check in extract.py never reads the marker.
# extract.py L5381-5386
for i, _p in enumerate(paths):
_res = per_file[i] or {}
if _res.get("nodes") or _res.get("error"): # <- no `skipped` test
continue
if _get_extractor(_p) is not None:
_empty_sources.append(str(_p))
Adding or _res.get("skipped") to that condition is the whole fix for the warning. json_config is currently the only extractor that emits the key, so the blast radius is exactly the intended one.
2. The same untested condition also blanks the incremental manifest, every run.
This is the mechanism behind the "the wasted pass recurs each run" observation above, and I think it is worth calling out separately because it is a state bug rather than a noise bug. The #2543 failed_sources collection twenty lines further down repeats the same test:
# extract.py L5415
if (not _res.get("nodes")) and _get_extractor(_p) is not None:
...
_failed_sources.append(_key)
So a deliberately-skipped data JSON is classified as a failed AST source. cli.py then puts it in _cleared_ast, which blanks both hashes so detect_incremental re-queues it next run. Confirmed on a real corpus after several update runs:
"Media/services.json": {
"mtime": 1785120611.0005004,
"ast_hash": "",
"semantic_hash": ""
}
It can never stamp clean, because the condition that clears it is deterministic. #2543 was built to retry files whose extractor failed on a missing extra, which is exactly right for that case, but a by-design skip is not a failure and should stamp normally. Same one-line shape: skip the failed_sources append when _res.get("skipped") is set.
Minimal repro of both, no git init needed:
mkdir gfrepro && cd gfrepro
printf '{"region": "US", "services": [{"name": "Netflix", "enabled": true}]}\n' > data.json
graphify update .
# warning: 1 source file(s) produced zero nodes ... data.json ... (#1666)
# then check graphify-out/manifest.json: data.json has empty ast_hash/semantic_hash
One note on scope, since #2108 is the companion: fixing the two conditions above resolves the false positive and the manifest churn without deciding the discoverability question. Emitting a bare file node is a strictly larger change and can land on its own schedule.
Environment: graphify 0.9.41, Python 3.11.15, macOS 26.6.1 (arm64).
Both halves of this are fixed in the released v0.9.81 — flagging it since the thread has four "still reproduces" reports (0.9.17 → 0.9.41) and no note that it landed.
1. The warning filter (extract.py:7978 @ v0.9.81) — exactly the one-liner identified above:
if _res.get("nodes") or _res.get("error") or _res.get("skipped"):
continue
2. The failed_sources / manifest-churn half (extract.py:8003-8015 @ v0.9.81) — a skipped result now short-circuits before the append, citing #1224/#2879:
if _res.get("skipped"):
# The extractor declined this file by design (data JSON, #1224), so
# ... it on every subsequent run, forever (#2879).
continue
The cache side was done separately in c5c4ee6b (#3910, 2026-09-29), which added or result.get("skipped") to both the sequential and parallel cache-write guards, so declines stamp clean instead of re-extracting each run.
I came at this from an old install (0.9.12) and measured 172 data .json tripping the warning across 271 log lines, then found this issue — so the diagnosis here is confirmed independently, but there is nothing left to fix. Probably closeable.
One residual that I don't think is in the thread, and it's the inverse of #2255's key-probe false positive: _CONFIG_JSON_NAMES matches on the bare filename, so a file coincidentally named MANIFEST.json gets AST-walked even when it is plain data. In my tree that is a 2 KB migration record with no probe key, and it is the only .json of 173 that produces nodes — 42 of them, one per key, plus a concept node per string in its one array. Same orphan-key-node shape #1224 was closed to prevent, reached through the filename list rather than the key probe. Happy to file separately if that's useful rather than noise.