Files
graphify/tests
azizur100389andazizur1992 f87d0649c5 fix: silence "invalid file_type 'None'" warning on legacy graphs (#660)
Users running `graphify update .` against a graph that contains nodes
preserved from older graphify versions see the warning:

  [graphify] Extraction warning (31 issues): Node 1661 (id='telepathy_app')
  has invalid file_type 'None' - must be one of [...]

The cause: `_rebuild_code` in watch.py preserves nodes from the existing
graph.json that aren't in the new AST output. Some of those nodes
(stubs, semantic concepts created before file_type was always
populated) have file_type=null in the on-disk JSON, which becomes
Python None on load. The validator in validate.py:33 then flags every
such node.

Add a normalization step in `build_from_json` next to the existing
`source` -> `source_file` legacy canonicalization: if a node's
file_type is None or empty, default it to "concept" before validation.
This silences the false positive while keeping the validator strict for
genuinely invalid values like "weird_type".
2026-05-03 00:46:46 +01:00
..
2026-04-04 18:52:44 +01:00