extract: "content is absent from the graph" has 14 different log wordings and no machine-readable status — post-flight tooling is confidently wrong
Summary
graphify extract signals "some content did not make it into the graph" through at least fourteen differently-worded log lines spread across llm.py, extract.py, cli.py and export.py. There is no single machine-readable status for the run. Anything automating around graphify (a post-flight check, a CI gate, a wrapper script) has to scrape prose — and a scraper that matches the documented wording still misses real losses.
The counts it would need already exist in memory; they are simply never written down. This is a persistence gap, not a measurement gap.
Version: graphifyy 0.9.53 (paths below are from the installed package).
What actually happened
A real run in my repo lost a whole chunk and 10 of 41 files:
[graphify] chunk of 17 timed out at depth 0 (TimeoutExpired); splitting in half and retrying
[graphify] chunk 4/4 failed: claude -p exited 1: API Error: Unable to connect to API (ConnectionRefused)
[graphify] WARNING: 1/4 semantic chunk(s) failed — see errors above. Partial results returned.
[graphify] WARNING: dropped 31 out-of-scope node(s) attributed to file(s) not dispatched for extraction: ...
[graphify] WARNING: 10/41 dispatched file(s) produced no nodes and are absent from the graph: ... (+5 more).
[graphify extract] dropped 5 out-of-scope item(s) attributed to 5 file(s) not dispatched this run: ...
[graphify extract] semantic extraction is incomplete: 10 dispatched file(s) produced no nodes and 0 came back truncated or hollow.
My post-flight matched the three "dropping"-style signatures I could find documented:
refusing to parse and dropping chunk | cannot be split further | — dropping
It reported dropped chunks : 0. Zero of those three patterns appear anywhere in that log. The check was confidently wrong about a run that lost a chunk and ten files.
The full signature set (all verified in 0.9.53 source)
| # | Wording | Source | Stream |
|---|---|---|---|
| 1 | ...bytes); refusing to parse and dropping chunk. |
llm.py:1138-1139 |
stderr |
| 2 | single-file chunk <p> {timed out|exceeds model context} and cannot be split further: <exc> |
llm.py:2385-2386 |
stderr |
| 3 | chunk of N {still times out|still overflows context} at recursion depth D (max M) — dropping |
llm.py:2393-2394 |
stderr |
| 4 | chunk I/N failed: <exc> |
llm.py:2676, llm.py:2699-2701 |
stderr |
| 5 | WARNING: K/N semantic chunk(s) failed — see errors above. Partial results returned. |
llm.py:2717-2718 |
stderr |
| 6 | WARNING: dropped N out-of-scope node(s) attributed to file(s) not dispatched for extraction: ... |
llm.py:2788-2791 |
stderr |
| 7 | WARNING: K/N dispatched file(s) produced no nodes and are absent from the graph: ... |
llm.py:2809-2811 |
stderr |
| 8 | warning: N source file(s) produced zero nodes and are absent from the graph: ... |
extract.py:6035-6038 |
stderr |
| 9 | [graphify extract] dropped N out-of-scope item(s) attributed to M file(s) not dispatched this run: ... |
cli.py:3943-3945 |
stdout |
| 10 | [graphify extract] semantic extraction is incomplete: N dispatched file(s) produced no nodes and M came back truncated or hollow. |
cli.py:3970-3974 |
stderr |
| 11 | [graphify extract] semantic extraction is incomplete: unverified semantic shrink detected for ... |
cli.py:211-213 |
stderr |
| 12 | WARNING: new graph has N nodes but existing graph.json has M (net -K). Refusing to overwrite. |
export.py:312-318 |
stderr |
| 13 | WARNING: existing <path> could not be read to verify the new graph is not smaller (<exc>). Refusing to overwrite |
export.py:301-306 |
stderr |
| 14 | error: extraction was incomplete (an AST/semantic pass failed) ... Refusing to overwrite a complete graph with a partial one. |
cli.py:4254-4258, cli.py:4427-4433 |
stderr |
Specific traps a reasonable scraper falls into:
- #3 uses an em dash (U+2014), not a hyphen. Confirmed:
[hex(ord(c)) for c in llm.py:2394 if ord(c)>127]→['0x2014']. A pattern written with--never fires. - #2 and #4 contain no form of the word "drop" — the two most common real-world give-ups.
- #7 and #8 describe the same condition in different words (
produced no nodesvsproduced zero nodes), and #8 has no[graphify]prefix at all — it is two spaces and a lowercasewarning:. Anchoring on^\[graphifysilently drops the whole AST path. - #9 goes to stdout while every neighbouring give-up line goes to stderr (
cli.py:3942-3946— theprint()has nofile=kwarg). A wrapper that captures only stderr misses it. - #7 truncates the file list to 5 basenames. In the run above, 10 files were lost and only 5 basenames were printed, plus
(+5 more)(llm.py:2806-2807; same atextract.py:6032-6033). Even a scraper that matches the line perfectly cannot recover which files are missing — the full list exists inmerged["uncovered_files"](llm.py:2804) and is thrown away.
And two lines that look alarming but are benign, which a scraper widened to catch the real cases will false-positive on:
partial result kept (not cached as complete)—llm.py:2456,llm.py:2472. That content is in the graph; the marker only prevents caching it as authoritative.note: node 'X' was extracted twice from '<f>' under different labels — keeping 'A', dropping 'B'—dedup.py:443. A label choice, not content loss. In my log this accounts for 9 of the 9 lines containing the word "dropping" — so widening the pattern to baredroppinginverts the error: 9 false positives, 0 true positives.
Exit code is not a fallback
llm.py:2712-2714:
# Loud failure summary — surface chunk failures at end so they're never
# buried mid-log. Exit 0 preserved for caller compatibility; the
# summary block makes the problem visible.
A run that loses chunks exits 0. The only thing that turns loss into a non-zero exit is the shrink guard (cli.py:4435 sys.exit(1)), and that guard is node-count-only and only applies when there is an existing graph.json to compare against (export.py:280-320). A first build, or a partial run that still nets more nodes than the previous graph, writes and exits 0 with content missing.
What graphify already gets right
This is not a "graphify hides failures" report — the opposite. Two things worked correctly and prevented real damage in the run above, and I want the ask read as finish the job, not start it:
- The shrink guard refused the write and saved the graph.
export.py:311-320printsnew graph has 5625 nodes but existing graph.json has 5651 (net -26). Refusing to overwrite.andreturn False;cli.py:4420-4435then exits 1 rather than stamping the manifest. Verified: the guard'sreturn Falseis reached on thenew_n < existing_nbranch. Without it the ConnectionRefused chunk would have silently clobbered a complete graph. This is exactly right. - The "produced no nodes" warning names the affected files.
llm.py:2800-2811computesuncoveredand prints the basenames. That is far better than a bare count, and it is what made the loss diagnosable at all. The only shortcoming is that it is prose, capped at 5 names, while the complete list sits unused inmerged["uncovered_files"].
Likewise the design already treats incompleteness as first-class internally — failed_chunks (llm.py:2594, incremented at 2677/2702), uncovered_files (llm.py:2804), _partial_semantic_files (cli.py:3958), the partial: True cache stamp. Every field the ask below needs is already computed. It just never reaches disk.
Ask, in priority order
(1) Emit a machine-readable per-run status artefact. Something like graphify-out/last_run.json, written unconditionally at the end of every extract (including the refused-write path, which is exactly when tooling most needs it):
{
"ok": false,
"schema_version": 1,
"graphify_version": "0.9.53",
"started": "2026-09-02T02:43:12Z",
"finished": "2026-09-02T03:46:05Z",
"wrote_graph": false,
"refused_reason": "shrink_guard",
"chunks_total": 4,
"chunks_failed": 1,
"chunk_errors": ["claude -p exited 1: API Error: Unable to connect to API (ConnectionRefused)"],
"files_dispatched": 41,
"files_with_no_nodes": ["docs/decisions/2026-08-27-openrouter-provider.md", "..."],
"files_partial": [],
"dropped": [],
"nodes_written": 5625,
"nodes_existing": 5651
}
Full paths, not truncated basenames — the truncation is the part that makes the existing warning undiagnosable. ok should be false whenever any content is missing, so the cheap check is one field. A graphify status --json subcommand reading the same struct would serve the same purpose; the artefact matters more than the surface.
(2) Failing that, document the complete set in one place and treat the wording as a compatibility surface. A docs/GIVE_UP_SIGNATURES.md listing all fourteen with their stream (stdout vs stderr), plus the two benign look-alikes explicitly marked as benign, plus a stability commitment. Right now the only way to enumerate them is to grep the package source, which is what I had to do, and any release can change one without notice.
A cheaper partial win either way: make the four "absent from the graph" wordings (#7, #8) identical, send #9 to stderr like its neighbours, and give every give-up line a stable machine-greppable token such as [graphify:incomplete].
Repro / verification
Read-only; starts no extraction. Point LOG at an extract log from a run that lost content:
import io, re, pathlib
log = io.open(pathlib.Path(LOG), encoding="utf-8").read()
DOCUMENTED = r"refusing to parse and dropping chunk|cannot be split further|— dropping|-- dropping"
print("documented-signature matches:", len(re.findall(DOCUMENTED, log)))
print("chunk N/M failed :", len(re.findall(r"chunk \d+/\d+ failed:", log)))
print("produced no nodes :", len(re.findall(r"produced no nodes and are absent from the graph", log)))
print("lines containing 'dropping':", sum(1 for l in log.splitlines() if "dropping" in l))
print(" ...benign dedup notes :", sum(1 for l in log.splitlines()
if "under different labels" in l and "dropping" in l))
Output on my losing run:
documented-signature matches: 0
chunk N/M failed : 1
produced no nodes : 1
lines containing 'dropping': 9
...benign dedup notes : 9
Zero true positives from the documented patterns; nine false positives from the widened one. And graphify-out/ after that run contains no run-status file of any kind — manifest.json is per-file hashes ({mtime, seen, ast_hash, semantic_hash}), not run state — while grep -c "last_run\|run_status\|run\.json" *.py across the package returns 0.