Skip to content

fix(manifest): do not stamp failed-extra AST files as up to date - #2546

Closed
michaelxer wants to merge 1 commit into
Graphify-Labs:v8from
michaelxer:michaelxer/fix-manifest-failed-extra-2543-20260808
Closed

michaelxer wants to merge 1 commit into
Graphify-Labs:v8from
michaelxer:michaelxer/fix-manifest-failed-extra-2543-20260808

Conversation

@michaelxer

Copy link
Copy Markdown
Contributor

Problem

When an AST extractor hard-fails because its optional extra is not installed (for example tree-sitter-sql for .sql), the affected files were still stamped into the incremental manifest as processed. After installing the extra, re-running extract reported them as unchanged and skipped them forever. The only recovery was deleting graphify-out/.

This matches #2543. The semantic side already had the same principle via #933 / #1948; the AST side did not.

Solution

  • extract() now returns failed_sources for results that carry an error (including missing extras) and for extractor-present zero-node anomalies.
  • _stamped_manifest_files() drops those sources so they are not written as up to date.
  • save_manifest(..., clear_ast=...) blanks both ast_hash and semantic_hash on any prior seed row for those sources, so the next incremental run re-queues them.

Verification

pytest tests/test_extract.py::test_extract_warns_when_sql_extra_missing \
  tests/test_extract.py::test_extract_failed_sources_empty_when_sql_installed \
  tests/test_partial_cache.py::test_stamped_manifest_excludes_failed_ast_sources \
  tests/test_partial_cache.py::test_stamped_manifest_excludes_partial_files \
  tests/test_detect.py::test_save_manifest_clear_ast_blanks_both_hashes_for_failed_extra \
  tests/test_detect.py::test_save_manifest_clear_semantic_erases_stale_hash_for_omitted_file -q

Result: 5 passed, 1 skipped (tree_sitter_sql not installed in this environment for the success-path skip).

Local repro without the sql extra:

  • first extract surfaces failed_sources for .sql
  • stamped manifest keeps only successful code
  • second detect_incremental still re-queues the .sql file

Notes / limitations

  • I did not run a full end-to-end install of graphifyy[sql] in this environment (optional extra not present here). The missing-extra failure path and manifest re-queue behavior are covered by unit/integration tests and a local repro script.
  • Draft until CI is green.

Fixes #2543

When an optional language extra is missing, the extractor returns an
error but the incremental manifest still marked those files processed.
Installing the extra later left them forever unchanged.

Surface failed_sources from extract(), drop them from the stamped
manifest set, and clear both hashes so the next run retries them.
safishamsi added a commit that referenced this pull request Aug 8, 2026
…e errors; bump to 0.9.37 (#2543, #2554)

#2543 (adopts PR #2546, thanks @michaelxer): a failed extraction is no
longer stamped in the incremental manifest as up-to-date, so graphify
update retries it instead of skipping it forever; a manifest already
poisoned by the old behavior is healed on the next run; genuinely
unchanged files are not re-processed. Extended to the watch save_manifest
paths too.

#2554 (adopts PR #2555, thanks @annieyii): the claude-cli backend now
inspects the stdout envelope for an is_error result (e.g. a rate limit
returned with exit code 0) and raises it on both the zero and non-zero
exit paths, instead of parsing it as an empty success and bisecting
against a live rate limit.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@safishamsi

Copy link
Copy Markdown
Member

Shipped in v0.9.37. Your fix (do not stamp failed-extra AST files as up-to-date) is what landed for #2543, plus a one-time heal for manifests poisoned by the old behavior and the same treatment on the watch save_manifest paths. Credited in the release notes. Thanks @michaelxer!

@safishamsi safishamsi closed this Aug 8, 2026
PerryLin-0420 pushed a commit to PerryLin-0420/graphify-decouple that referenced this pull request Aug 13, 2026
…e errors; bump to 0.9.37 (Graphify-Labs#2543, Graphify-Labs#2554)

Graphify-Labs#2543 (adopts PR Graphify-Labs#2546, thanks @michaelxer): a failed extraction is no
longer stamped in the incremental manifest as up-to-date, so graphify
update retries it instead of skipping it forever; a manifest already
poisoned by the old behavior is healed on the next run; genuinely
unchanged files are not re-processed. Extended to the watch save_manifest
paths too.

Graphify-Labs#2554 (adopts PR Graphify-Labs#2555, thanks @annieyii): the claude-cli backend now
inspects the stdout envelope for an is_error result (e.g. a rate limit
returned with exit code 0) and raises it on both the zero and non-zero
exit paths, instead of parsing it as an empty success and bisecting
against a live rate limit.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.

Incremental manifest never retries files whose extractor failed on a missing extra

2 participants