Skip to content

fix(watch): check-update walks the corpus, not just the pending flag#1935

Open
kimdzhekhon wants to merge 1 commit into
Graphify-Labs:v8from
kimdzhekhon:fix/check-update-detects-new-files-1765
Open

fix(watch): check-update walks the corpus, not just the pending flag#1935
kimdzhekhon wants to merge 1 commit into
Graphify-Labs:v8from
kimdzhekhon:fix/check-update-detects-new-files-1765

Conversation

@kimdzhekhon

Copy link
Copy Markdown

Summary

  • check_update() only ever inspected graphify-out/needs_update, a flag written exclusively by the graphify watch daemon. Anyone not running that daemon got a silent exit 0 from graphify check-update regardless of how far the corpus had drifted — including brand-new files that never had a manifest row to begin with.
  • Wires detect_incremental(kind="ast") into check_update, using the same persisted --exclude patterns a real rebuild uses (_read_build_excludes), so it now reports actual new/changed and deleted file counts diffed against the manifest.
  • Success is no longer silent: prints an explicit Up to date line, so "checked and clean" is now distinguishable from "couldn't check" (e.g. no manifest yet).

Fixes #1765.

Test plan

  • Added test_check_update_reports_new_file_absent_from_manifest — reproduces the reported bug (a file created after the last extract, with no manifest row, is now detected)
  • Added test_check_update_reports_up_to_date_when_manifest_matches_corpus — confirms the new explicit up-to-date message
  • Updated stale docstring on test_check_update_no_flag_returns_true to match new behavior
  • uv run pytest tests/test_watch.py -q -k check_update — 5 passed
  • uv run pytest tests/ -q — full suite: 3266 passed (5 pre-existing failures unrelated to this change, missing optional openai dependency in this environment)

check_update() only ever inspected the needs_update flag file, which is
written exclusively by the `graphify watch` daemon. Anyone who doesn't
run that daemon got silent `exit 0` from `graphify check-update` no
matter how far the corpus had drifted since the last extract — new
files (never in the manifest at all) and deleted files were both
invisible.

Wire detect_incremental(kind="ast") into check_update using the same
persisted --exclude patterns as a real rebuild (_read_build_excludes),
so it now reports new/changed and deleted file counts against the
manifest. Also make success non-silent: an unambiguous "Up to date"
line now distinguishes a real clean check from a check that couldn't
run (e.g. no manifest yet).

Fixes Graphify-Labs#1765.
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.

check-update is blind to files created after the last extract (manifest-only comparison), and silent about it

1 participant