Files
magpie/site
yetone c2aad3db02 redact: a wallet address goes as written, and an IP as a documentation address the agent can use
0x0_air on X (10-28): with masking on, the agent stopped and asked again.
Their EVM address (0x89dfBD9b…, public) went as a secret placeholder and
the vendor's model told them to rotate it in case it was a private key;
the server IP they typed went as {{IP_…}} and the model refused to ssh
to it and asked for the real host.

- model.go: the local model's SECRET/ACCOUNT span on 0x and 40 hex
  digits (evmRe) is left as written; no rule matched it, the model's
  label did (the 0x prefix and mixed case got past hexRe). A 64-hex
  private key is masked still, and so is a 40-hex value called a key
  (secretCued).
- shape.go: an IP the IP rule masks goes as an address from the
  documentation ranges (192.0.2/198.51.100/203.0.113 .101-.254, IPv6
  2001:db8::/32), stable for the value, never shared by two values
  (falls back to {{IP_…}} past 462 IPv4 ones), and put back only as a
  whole address in replies and streamed tool calls (restoreAddr).
  Preview shows the same stand-in.
- docs: gateway-routing.md, and masking.html in en/zh/ja.

Run:
- Real models through the local gateway, the screenshot's ssh prompt
  with the placeholder vs a documentation address: with
  {{IP_k3v9x2mq}}, deepseek-v4-pro, glm-5.3, kimi-k3 and
  claude-sonnet-5-5 mostly searched ~/.ssh or asked for the real IP;
  with 203.0.113.147 or 192.0.2.183 all 20 runs over 5 models ran ssh
  at once.
- New tests (internal/redact/standin_ip_test.go): the screenshot's
  message, the tool call restored whole and streamed cut at every byte,
  boundary cases, IPv6, 472 addresses never sharing, the screenshot's
  address under labels secret and account_number with every category
  on, and a 64-hex key still masked. gateway TestRedactedKinds now
  wants a documentation address upstream.
- Broken by hand: without the evmRe check TestEVMAddressGoesAsWritten
  is red for every text and label; without restoreAddr the boundary
  cases are red; without the IP stand-in all three IP tests and
  gateway TestRedactedKinds are red.
- On mote at this head (rebased on 27bf14790): gofmt -l, go vet
  ./... for darwin, linux (-tags nogui) and windows, go test -count=1 -timeout 45m
  -tags nogui ./... (and go build for
  darwin, linux -tags nogui and windows): every package ok, exit 0.
  The run before at 56602426d had TestMoreKinds red, which wanted
  {{IP_…}}; it now wants the documentation address.
- Rebased again on 56d26f0bb (two gateway commits, #4004): go vet
  and go test -tags nogui of internal/redact, internal/gateway and
  internal/maskrec on mote at this head: ok.

Not tried:
- the real AstrLink model on an EVM address (the fake model gives it
  the labels it can give);
- a host name (user@host) still goes as {{HOSTNAME_…}};
- a documentation address the user writes themselves can match a
  stand-in in a reply and be put back as the real one;
- stand-ins are not kept across a restart or once their slot is
  evicted, like every placeholder.
2026-10-28 20:23:38 +08:00
..