AIMetaPhD on X (Windows, Chinese user name): Settings → Privacy's
Privacy Filter said "the local masking model didn't start:
pf-serve-vulkan.exe: failed to read GGUF: C:\Users\<mojibake>\.cache\
magpie\privacy-filter\privacy-filter-q8-80efc1803eda.gguf", the same for
pf-serve.exe. pf-serve's main takes a narrow argv, which on Windows is
in the ANSI code page (936 on a Chinese system); ggml_fopen reads the
name as UTF-8 and the GPU's weights are reopened through a narrow
ifstream, so no device could open it, and its error came back in
GBK, which magpie read as UTF-8.
startOne now runs pf-serve in the model's folder and gives it the
model's file name (modelName, ASCII), never the path. That works with
the pf-v2 binaries users already have. A pf-serve error that names the
file is shown with the whole path, in UTF-8. The stand-in pf-serve in
the tests now refuses a model path with a byte outside ASCII and opens
the file from where it runs, as the real one does. TestModelInFolder-
NotASCIILoads and TestModelErrorNamesWholePath put the model under
"用户 Ünïcode". The native side (wide argv, and ggml_fopen in
weights-once.patch) is #4342. pf-serve is the only native helper magpie
starts. AstrLink Guard's CoreML paths are darwin cgo, which is UTF-8.
Run:
- Real use on xiaomi-gpu (Windows 11, zh-CN, ACP 936): the real pf-v2
pf-serve zip and the real 1.6 GB model (both sha256 match the pins)
under C:\Users\yeton\runs\pf-测试用户\.cache\magpie\privacy-filter.
A temporary test (not committed) pointed dir there and called Find
through win-run. Vulkan (AMD Radeon 8060S) loaded in 3.7s and found
the person and the email. Forced onto the CPU, it loaded in 7.0s with
the same finds. Broken by hand (the old full-path argv), it gave the
reporter's exact error, the folder in mojibake, on both programs.
- Broken by hand on mote: with the old argv, both new tests are red.
- win-run go test ./internal/pii/...: ok (the real test included).
wsl-run go test ./internal/pii/: ok.
- mote: gofmt ok; GOOS=darwin/linux/windows go vet -tags nogui ./...
ok; GOOS=windows go vet ./internal/pii/... ok.
- mote: go test -count=1 -timeout 45m ./... at base e863f520c: every
package ok except internal/gui's TestMainWindowCorners/macOS_26_SDK.
That is #3949 (macOS 27 on mote), and gui is untouched here.
- After rebasing onto 9e8c22dad (7632e1be1 changed internal/redact and
internal/masking): pii, redact and masking were run 4 times.
redact's TestMoreKinds was red once with its output lost, then
passed 3 runs, -count=8 alone and -count=3 of the package. Filed as
#4345. pii and masking were ok every time.
Not tried: the GUI on the reporter's real machine. No GUI file changed:
the GUI shows the error text the Go code sends, which is now UTF-8.