fix test_watch: update import after _run_update renamed to _notify_only

This commit is contained in:
Safi
2026-04-05 20:58:23 +01:00
parent 014758f61d
commit 2a8b6c16ad
2 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ Works with any mix of file types:
**Token benchmark** - printed automatically after every run. On a mixed corpus (Karpathy repos + papers + images): **71.5x** fewer tokens per query vs reading raw files.
**Auto-sync** (`--watch`) - run in a background terminal and the graph updates itself as your codebase changes. Code file saves trigger an instant rebuild (AST only, no LLM). Doc/image changes notify you to run `--update` for the LLM re-pass. Useful for agentic workflows where multiple agents are writing code in parallel the graph stays current between waves automatically.
**Auto-sync** (`--watch`) - run in a background terminal and the graph updates itself as your codebase changes. Code file saves trigger an instant rebuild (AST only, no LLM). Doc/image changes notify you to run `--update` for the LLM re-pass. Useful for agentic workflows where multiple agents are writing code in parallel - the graph stays current between waves automatically.
**Wiki** (`--wiki`) - Wikipedia-style markdown articles per community and god node, with an `index.md` entry point. Point any agent at `index.md` and it can navigate the knowledge base by reading files instead of parsing JSON.
@@ -110,7 +110,7 @@ Every edge is tagged `EXTRACTED`, `INFERRED`, or `AMBIGUOUS` - you always know w
| graphify source + Transformer paper | 4 | **5.4x** | [`worked/mixed-corpus/`](worked/mixed-corpus/) |
| httpx (synthetic Python library) | 6 | ~1x | [`worked/httpx/`](worked/httpx/) |
Token reduction scales with corpus size. 6 files fits in a context window anyway graph value there is structural clarity, not compression. At 52 files (code + papers + images) you get 71x+. Each `worked/` folder has the raw input files and the actual output (`GRAPH_REPORT.md`, `graph.json`) so you can run it yourself and verify the numbers.
Token reduction scales with corpus size. 6 files fits in a context window anyway, so graph value there is structural clarity, not compression. At 52 files (code + papers + images) you get 71x+. Each `worked/` folder has the raw input files and the actual output (`GRAPH_REPORT.md`, `graph.json`) so you can run it yourself and verify the numbers.
## Tech stack
+9 -9
View File
@@ -3,26 +3,26 @@ import time
from pathlib import Path
import pytest
from graphify.watch import _run_update, _WATCHED_EXTENSIONS
from graphify.watch import _notify_only, _WATCHED_EXTENSIONS
# --- _run_update ---
# --- _notify_only ---
def test_run_update_creates_flag(tmp_path):
_run_update(tmp_path)
def test_notify_only_creates_flag(tmp_path):
_notify_only(tmp_path)
flag = tmp_path / "graphify-out" / "needs_update"
assert flag.exists()
assert flag.read_text() == "1"
def test_run_update_creates_flag_dir(tmp_path):
def test_notify_only_creates_flag_dir(tmp_path):
# graphify-out dir does not exist yet
assert not (tmp_path / "graphify-out").exists()
_run_update(tmp_path)
_notify_only(tmp_path)
assert (tmp_path / "graphify-out").is_dir()
def test_run_update_idempotent(tmp_path):
_run_update(tmp_path)
_run_update(tmp_path)
def test_notify_only_idempotent(tmp_path):
_notify_only(tmp_path)
_notify_only(tmp_path)
flag = tmp_path / "graphify-out" / "needs_update"
assert flag.read_text() == "1"