Yayoi_no_yume (X) asked for 0.85-0.95, ~0.88, over a hardcoded 0.5.
The threshold is the user's per model since v0.1.1689 (Settings >
Privacy > Confidence threshold, 0.5-0.95). This measures whether a
different default would be better, and keeps the defaults.
Corpora: 2000 segments of the owner's real Codex and Claude Code
sessions (prompts, tool arguments and results; 550 with CJK), kept
local; and 101 labelled cases (the 72 eval cases incl. #3029,
#3143, #3144, plus 30 new), 64 values that must be masked, 188 that
must not. Both real models, in a scratch cache: Privacy Filter q8
GGUF via pf-v2, AstrLink Guard rev 7216b6a3b897 (sha256 checked).
Rules alone mask 16 of 64.
model thr labelled masked/64 labelled FP/188 real model masks
Guard 0.5 60 0 34
Guard 0.8* 57 0 20
Guard 0.88 56 0 12
Guard 0.95 54 0 6
PF 0.5* 59 2 31
PF 0.8 57 1 19
PF 0.88 56 1 13
PF 0.95 56 0 12
Guard 0.8 -> 0.88 drops 3 false alarms (a model id, a sandbox path
word, a token counter) and lets a real colleague's name and a
labelled signed name through. PF 0.5 -> 0.88 drops 11 (timestamps
in paths, log lines, a plugin id) and lets 6 names and a phone
through, 4 of the names in real traffic. A higher default sends
real names unmasked; the false alarms left are shapes (ISO
timestamps in paths, Claude Code's <total_tokens> counter, base64)
that a check can turn away. The docs now say what the threshold
trades, en/zh/ja masking pages and gateway-routing.md.
Run at this head (and 89ef90356 under it), rebased on e7f21dba5:
gofmt -l, go vet (darwin), GOOS=linux -tags nogui and GOOS=windows
vet of redact (+gateway on linux), go build: clean. go test -count=1
internal/redact, masking, pii/..., settings, otlp, sessions: ok.
Not run before push: internal/gateway and internal/gui (both import
redact) and the full ./... suite, the machine at load ~138 with other
sessions' suites; running after. No GUI asset changed. Eval
recordings (testdata/eval-*.json) not re-recorded; TestMaskEval ok.