You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: one test that pins graph.json invariance for every extractor (checkout folder, rebuild, line endings) #4217
The same source tree should always give the same graph.json. Seven recent bugs broke that in one of four ways, and each was found by diffing two builds by hand:
way it broke
issues
checkout path (and OS username) inside an id or a graph.json key
Each fix added a narrow test for its own extractor or write path. Nothing checks the invariant across all extractors, so the next extractor, or the next change to a write path, can bring the same bug back without any test failing.
Proposed solution
One test file that builds the whole tests/fixtures corpus (every language with an extractor) through the real CLI, in --no-cluster and clustered mode, and compares every node and edge with all attributes:
two copies in different folders give the same graph;
the checkout folder name appears nowhere in graph.json;
a cold build and a rebuild of the unchanged tree are the same (top-level keys too);
an LF copy and a CRLF copy give the same graph;
every raw edge endpoint is a declared node;
the corpus is not trivially empty (guards against a silent empty build).
Community ids are left out of the comparison (they come from clustering; #3761 covers that).
Alternatives considered
Keep adding one narrow test per bug: that is what happened seven times, and it only protects the one extractor each bug was found in.
A CI job that builds a real repo and diffs: slower, needs network, and harder to run locally than a pytest file on the fixtures already in the repo.
Area
Developer experience or CI
Are you willing to submit a PR?
Yes, I can work on this
Compatibility / behavior impact
Test only. No change to node/edge ids, cache, graph.json schema, skills, MCP output or incremental updates. Adds about 20 s to the suite.
Additional context
Written and checked against 0.9.80 (6478eb7): 12/12 pass. Against 0.9.79 the three checks covered by #4180/#4182/#4188 fail, which is the point. PR right after this issue. Windows 11, Python 3.12.12.
Activity
github-actions commentedon Oct 8, 2026
Thanks for opening this issue, @rohit-jsfreaky. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
safishamsi commentedon Oct 8, 2026
Fixed by #4218 (thanks @rohit-jsfreaky), shipped in v0.9.81. Closing as resolved.