mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-25 06:33:13 +08:00
cbm_writer_open used a raw ANSI-CP fopen for the hand-rolled SQLite writer - the one file-creating call on the dump chain without a UTF-8-to-wide conversion. On a non-ASCII Windows profile (C:\Users\Kovacs Janos) extract and resolve succeeded but the dump failed with pipeline.err phase=dump: fopen could not create graph.db under the profile-derived cache dir while cbm_mkdir_p (already wide) had happily created the directory around it. Routed through cbm_fopen, matching #700 (pass readers) and #973 (canonicalization); POSIX is byte-transparent. New Windows guard test_non_ascii_cache_dump.py indexes an ASCII repo into a non-ASCII CBM_CACHE_DIR and requires a query_graph readback with Function count > 0 - proving the DB was written to and reopened from the non-ASCII cache, not merely that no error surfaced. The existing non-ASCII guard only varied the repo path against an ASCII cache, which is why this class went unseen. The USERPROFILE-sourced env encoding question (Layer 2 - _environ is ANSI-CP, not UTF-8) is deliberately not bundled; it needs verification on a real Windows box and will be filed separately if the guard alone does not settle it. Closes #996 Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>