mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-23 07:41:46 +00:00
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".