echo_yip on X: Settings → Privacy's model never started, "pf-serve
(Metal): signal: illegal instruction" and the same on the CPU. x86's
pf-serve needs AVX2, FMA, F16C and BMI2, which a Celeron, a Pentium or
a Mac before Haswell lacks, and so does Rosetta before macOS 15, where
the Intel DMG on Apple silicon ran the Intel pf-serve.
- arch.go: target() is darwin-arm64 for magpie's Intel build under
Rosetta (sysctl.proc_translated, rosetta_darwin.go), so Apple
silicon's pf-serve, with Metal, is fetched and run. The Intel one
already on disk is kept until the arm64 one is (tagDirs; start
fetches it first, for at most 5 minutes, and falls back), then
removed with the old tags.
- fullX86 asks golang.org/x/sys/cpu for AVX, AVX2, FMA and BMI2. Where
one is missing, candidates() runs only pf-serve-base, the SSE4.2
build the previous commit adds, when it is on disk.
- pf-v3 (privacy-filter run 41256502056 at 697335d8e) is pinned;
pf-v2 and pf-v1 are old tags, so pf-v2 runs until pf-v3 is
downloaded. On a CPU without AVX2 that first start still fails, and
the retry after the download runs pf-serve-base.
Run at this commit: go test ./internal/pii/... on mote, ok; go build
./... ok; go vet ./internal/pii/... for linux, windows and darwin/amd64
ok; gofmt -l clean. Broken by hand: with candidates()'s fullX86 branch
and start()'s fetch turned off, TestBaseWhereTheCPULacksAVX2 ("starts =
[start pf-serve-vulkan MTL0]") and TestRosettaRunsAppleSiliconsServe
("started from [path pf-v9-darwin-amd64]") go red.
pf-v3's five zips, downloaded from the release and hashed here, match
its SHA256SUMS and the pins. A throwaway probe (not committed) set a
temp dir as pii's folder with the pinned model, fetched pf-v3 through
ensureServe from GitHub and masked an English and a Chinese text:
Linux (magpie-desktop), x86 with AVX2: pf-v3-linux-amd64, Vulkan
first, name/email/phone found
mote, Apple M5 Pro: pf-v3-darwin-arm64, Metal, the same spans
this Mac under Rosetta (arch -x86_64, the darwin/amd64 test binary,
sysctl.proc_translated 1): target darwin-arm64, fetched
pf-v3-darwin-arm64 and masked with Metal, the same scores as mote
Windows (xiaomi-gpu): pf-v3-windows-amd64, Vulkan, name/email/phone
found
The previous commit's qemu -cpu Nehalem run is where pf-serve-base
starts and pf-serve dies with SIGILL.
Not tried: the full go test ./... (only internal/pii changed); a real
CPU without AVX2; a Mac before macOS 15, where Rosetta has no AVX;
the GUI's Settings → Privacy page on a pf-v2 to pf-v3 upgrade.