Repository navigation
Conversation
|
Thanks for the pull request, @smngvlkz. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
|
Thanks @smngvlkz! One small thing: our changelog and release notes are built from PR titles, so we use the conventional-commits format, for example: Prefixes we use: |
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Not checked: tests were not run; formal verification proved 0 of 1 changed function(s) (1 sampled, not proven).
Formal verification. PR-changed functions: 1/1 verified (0 proven, 1 may-equivalent, 0 distinguished) · 0 not verified.
Graphify review — findings
Makes detect honour git's user-wide excludes file, so files a user ignores machine-wide (local settings, secrets) stay out of the graph (#4335). _git_global_excludes reads core.excludesFile via git config --path and falls back to $XDG_CONFIG_HOME/git/ignore or ~/.config/git/ignore when the key is unset or git is unavailable; like git, it only applies inside a repo. Its patterns load first, anchored at the VCS root, so info/exclude and per-directory ! rules override them, and gitignore=False turns them off with the other git sources.
Worth a look
- Detect can now crash when the home directory is not resolvable —
graphify/detect.py:1364· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 3246 functions depend on the 626 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
detect()— 130 callers, 16 callees - worse:
_load_graphifyignore()— 23 callers, 6 callees
Verification — 3246 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1183 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
69 of 367 test file(s) selected (19%) via static blast radius.
tests/test_astro_extraction.py— impacttests/test_atomic_writes.py— impacttests/test_build.py— impacttests/test_cargo_introspect.py— impacttests/test_charmap_encoding.py— impacttests/test_chunking.py— impacttests/test_cjs_module_extension.py— impacttests/test_claude_cli_backend.py— impacttests/test_cpp_nested_and_cli.py— impacttests/test_detect.py— impact, changed-testtests/test_docx_to_markdown.py— impacttests/test_dotnet.py— impacttests/test_evidence_binding.py— impacttests/test_extract.py— impacttests/test_extract_cli.py— impacttests/test_extract_php_closures.py— impacttests/test_file_slice.py— impacttests/test_file_truncation_warning.py— impacttests/test_ignore_file_encoding.py— impacttests/test_image_vision.py— impacttests/test_import_extension_resolution.py— impacttests/test_incremental_mtime_collision.py— impacttests/test_indirect_call_block_scoped_shadow.py— impacttests/test_indirect_dispatch.py— impacttests/test_indirect_dispatch_assign_return.py— impacttests/test_indirect_dispatch_getattr.py— impacttests/test_js_exported_scalar_bindings.py— impacttests/test_languages.py— impacttests/test_llm_backends.py— impacttests/test_long_path_hashing.py— impacttests/test_manifest_ingest.py— impacttests/test_markdown_code_spans.py— impacttests/test_mcp_ingest.py— impacttests/test_multilang.py— impacttests/test_non_regular_files.py— impacttests/test_office_incremental.py— impacttests/test_office_limits.py— impacttests/test_ollama.py— impacttests/test_out_dir_evidence.py— impacttests/test_oversized_document_slicing.py— impacttests/test_package_json_subpath_imports.py— impacttests/test_pdf_extra_warning.py— impacttests/test_pdf_slicing.py— impacttests/test_pdf_token_estimate.py— impacttests/test_phantom_external_import.py— impacttests/test_php_unparsed_casts.py— impacttests/test_pipeline.py— impacttests/test_python_inherited_method_calls.py— impacttests/test_python_underscore_resolution.py— impacttests/test_rationale.py— impact- … and 19 more
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
No difference found (not proven): No behavior difference found in \_load\_graphifyignore (not a proof).
The verifier ran both versions of \_load\_graphifyignore on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
· 2 more finding(s) on lines outside this diff (see the check run).
) Landed from PR #4339 (squashed, authorship preserved).
|
Landed in 0.9.86 (now on PyPI) via an authorship-preserving cherry-pick, so your commit authorship is retained. Thank you, @smngvlkz! |
Fixes #4335.
What this fixes
You can tell git to ignore files in each project with a
.gitignore, or once for your whole computer with git's global ignore file. graphify was respecting the first one but not the second, so a file you hid using the computer-wide list could still end up in your graph.That global list is usually where people put local settings and other private files, so it's the one that matters most here.
What changed
graphify now reads git's global ignore file too, the same way git does:
git config core.excludesFile, it uses that~/.config/git/ignore.gitignorestill wins, so a!rule there can bring a file back in, same as git--no-gitignoreturns it off along with the other git ignore rulesHow I tested it
secret.pyshowed up in the graph, now it doesn't.core.excludesFile, the default~/.config/git/ignore,XDG_CONFIG_HOME, a project!rule beating the global one,--no-gitignore, and a folder that isn't a git repo. They fail on the currentv8and pass with this change.Heads up
This means what graphify picks up can now depend on your global git settings, not just files in the project. That's the point of the fix, and it's the same thing git does, but it's worth knowing if two people get slightly different file lists.