Add test coverage for paths.nfc() - #2924
Conversation
nfc() normalizes path strings to NFC to prevent macOS NFD filenames from mismatching NFC entries in manifests/graphs (Graphify-Labs#2210, Graphify-Labs#2221/Graphify-Labs#2224), but had no direct test asserting its behavior.
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Graphify review — findings
Adds a test for nfc in tests/test_paths.py, verifying it normalizes NFD (decomposed) unicode to NFC and leaves already-NFC input unchanged. Imports nfc from graphify.paths.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 13 functions depend on the 13 functions this change touches.
Health — grade A; no new coupling hotspots.
Verification — 13 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: 13 function(s) in the blast radius were not formally verified this run
Summary
graphify.paths.nfc()normalizes path strings to NFC to keep macOS's NFD filenames matching NFC entries in manifests/graphs (see Incremental extract() false-positives unchanged files as "deleted", silently pruning valid nodes #2210, macOS: --update re-extracts everything when corpus path has non-ASCII chars (NFC/NFD manifest mismatch) #2221/fix(detect): NFC-normalize manifest keys for macOS --update #2224), but had no direct unit test.Test plan
pytest tests/test_paths.py -v— 50 passed locally