pd_export #363 follow-up: LAN broker allowed, step pins by identity, 4 GiB queued cap, export tests on master #365

Merged
orchestra merged 2 commits from opus/pd-export-followup into master 2026-11-08 01:58:15 +01:00
Member

Follow-up to #363 (coordinator list, 11-07). Do not merge without review.

Changes

  1. LAN broker allowed. bench/arms/s12phv-pd-export.toml sets QWEN36_PD_EXPORT_TARGET_ALLOW = "10.10.0.2:18731,192.168.88.125:18731", and nix/serve-arms/s12phv-pd-export-mtp.json is regenerated.

  2. Step pins dropped by identity. The new Exporter._drop_step_pin replaces list.remove, which compared with ==. On tensor lists that comparison raises; on equal lists it hands back ownership of the wrong pin.

  3. QWEN36_PD_EXPORT_MAX_QUEUED_MB defaults to 4096 (DEFAULT_MAX_QUEUED_MB, was 8192). A 32k export is about 304 MB on the wire.

  4. tools/pd-split/test_pd_export.py on master. It comes with what it imports, copied verbatim from opus/pd-adaptive 5fe25a91: pdsplit.py, export/pd_recv.py, transport/{wire,receiver,ring}.py and fixtures/pd-export-4k (200 KB). A new hardening section runs over real loopback sockets:

    • the arm's allowlist is exactly 40G + LAN;
    • a stuck receiver fails within SEND_S and every tier pin is released;
    • the 4096 MiB default;
    • pin drop by identity.

    tests/test_pd_export_hardening.py gets the same three follow-up checks without torch.

    • Result: 66 passed (test_pd_export.py, test_pd_export_hardening.py, test_kv_host_tier.py).
    • Mutants killed: equality removal, an 8192 default, the LAN entry dropped, no send timeout.

Card gates (stamped, owned boots, 2026-11-08, tree c40dd433)

arm equiv gsm8k retrieval 16k/32k agent-sessions stamp
s12phv-pd-export-mtp pass 59/60 1.0 / 1.0 – pd363-gate-s12phv-pd-export-mtp-20261107T233053Z
s12-prefix-host-vsplit-sf (prod) pass 59/60 1.0 / 1.0 pass (code_recall 1.0) pd363-gate-s12-prefix-host-vsplit-sf-20261107T235747Z

pd_export.py is a served source of every s12 arm, so the production arm's #363 gate also went STALE and is re-gated here. ttx lint is OK for s12-prefix-host-vsplit-sf and s12phv-pd-export{,-tc,-mtp}; nix-spec --check is OK.

Adversarial checks on the export arm (bench/runs/pd363fu-adversarial-20261108.txt)

  • Refused, engine stayed up: 7 bad or unlisted requests, among them 192.168.88.164:18731 (not allowed) and 203.0.113.9:9.
  • LAN broker: 192.168.88.125:18731 is accepted by the allowlist, but the connect then times out after 10 s with pins_now=0. cfx-llm1's firewall does not open 18731 on eno1, so the LAN fallback needs that port opened in the nixos-llm config before it can carry exports. That is a gateway/nixos change for the coordinator.
  • Good 40G export: 304 MB sent, pins_now=0.
  • No broker SIGSTOP this time. The router stayed in pd mode during the windows, so the broker was live. The stuck-receiver path is unchanged and is covered by the CPU suite and by #363's card run.

Known, not changed here

  • A connect timeout is logged as "send timed out after 30 s: the receiver stopped reading", although it is the 10 s CONNECT_S timeout.
  • An export to a dead target holds the FIFO for younger exports until its connect times out. adv-good waited 3.5 s behind adv-lan.

🤖 Generated with Claude Code

Follow-up to #363 (coordinator list, 11-07). Do not merge without review. ## Changes 1. **LAN broker allowed.** `bench/arms/s12phv-pd-export.toml` sets `QWEN36_PD_EXPORT_TARGET_ALLOW = "10.10.0.2:18731,192.168.88.125:18731"`, and `nix/serve-arms/s12phv-pd-export-mtp.json` is regenerated. 2. **Step pins dropped by identity.** The new `Exporter._drop_step_pin` replaces `list.remove`, which compared with `==`. On tensor lists that comparison raises; on equal lists it hands back ownership of the wrong pin. 3. **`QWEN36_PD_EXPORT_MAX_QUEUED_MB` defaults to 4096** (`DEFAULT_MAX_QUEUED_MB`, was 8192). A 32k export is about 304 MB on the wire. 4. **`tools/pd-split/test_pd_export.py` on master.** It comes with what it imports, copied verbatim from opus/pd-adaptive 5fe25a91: `pdsplit.py`, `export/pd_recv.py`, `transport/{wire,receiver,ring}.py` and `fixtures/pd-export-4k` (200 KB). A new hardening section runs over real loopback sockets: - the arm's allowlist is exactly 40G + LAN; - a stuck receiver fails within SEND_S and every tier pin is released; - the 4096 MiB default; - pin drop by identity. `tests/test_pd_export_hardening.py` gets the same three follow-up checks without torch. - Result: 66 passed (test_pd_export.py, test_pd_export_hardening.py, test_kv_host_tier.py). - Mutants killed: equality removal, an 8192 default, the LAN entry dropped, no send timeout. ## Card gates (stamped, owned boots, 2026-11-08, tree c40dd433) | arm | equiv | gsm8k | retrieval 16k/32k | agent-sessions | stamp | |---|---|---|---|---|---| | s12phv-pd-export-mtp | pass | 59/60 | 1.0 / 1.0 | – | pd363-gate-s12phv-pd-export-mtp-20261107T233053Z | | s12-prefix-host-vsplit-sf (prod) | pass | 59/60 | 1.0 / 1.0 | pass (code_recall 1.0) | pd363-gate-s12-prefix-host-vsplit-sf-20261107T235747Z | `pd_export.py` is a served source of every s12 arm, so the production arm's #363 gate also went STALE and is re-gated here. ttx lint is OK for s12-prefix-host-vsplit-sf and s12phv-pd-export{,-tc,-mtp}; `nix-spec --check` is OK. ## Adversarial checks on the export arm (`bench/runs/pd363fu-adversarial-20261108.txt`) - **Refused, engine stayed up:** 7 bad or unlisted requests, among them `192.168.88.164:18731` (not allowed) and `203.0.113.9:9`. - **LAN broker:** `192.168.88.125:18731` is accepted by the allowlist, but the connect then times out after 10 s with pins_now=0. **cfx-llm1's firewall does not open 18731 on eno1**, so the LAN fallback needs that port opened in the nixos-llm config before it can carry exports. That is a gateway/nixos change for the coordinator. - **Good 40G export:** 304 MB sent, pins_now=0. - **No broker SIGSTOP this time.** The router stayed in pd mode during the windows, so the broker was live. The stuck-receiver path is unchanged and is covered by the CPU suite and by #363's card run. ## Known, not changed here - A connect timeout is logged as "send timed out after 30 s: the receiver stopped reading", although it is the 10 s CONNECT_S timeout. - An export to a dead target holds the FIFO for younger exports until its connect times out. adv-good waited 3.5 s behind adv-lan. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- bench/arms/s12phv-pd-export.toml: QWEN36_PD_EXPORT_TARGET_ALLOW adds the cfx-llm1 broker on the LAN
  (192.168.88.125:18731, the pd40g.sh LAN fallback link) next to the 40G one; nix/serve-arms regenerated.
- pd_export.py: _drop_step_pin removes the handed-over pin by identity (list.remove compared with ==: on tensor
  lists that raises, on equal lists it hands the wrong pin's ownership back); QWEN36_PD_EXPORT_MAX_QUEUED_MB
  default 8192 -> 4096 MiB (DEFAULT_MAX_QUEUED_MB; a 32k export is ~304 MB on the wire).
- tools/pd-split/test_pd_export.py lands on master with what it imports (pdsplit.py, export/pd_recv.py,
  transport/{wire,receiver,ring}.py, fixtures/pd-export-4k, verbatim from opus/pd-adaptive 5fe25a91), plus a
  hardening section over real loopback sockets: the arm's allowlist (40G + LAN only), a stuck receiver failing
  within SEND_S with every tier pin released, the 4096 MiB default, pin drop by identity.
  Mutants killed: equality removal, 8192 default, LAN entry dropped, no send timeout.
- tests/test_pd_export_hardening.py: the same three follow-up checks without torch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
#363 follow-up gates: export and prod arms re-gated on c40dd433, stamped records replace the #363 ones
Some checks failed
cards-fresh cards: not measured (serving active or MemAvailable low); add cards:go to retry
tt-stack-ci / Report upstream drift (pull_request) Successful in 7m36s
tt-stack-ci / Build simulators and check the host module (pull_request) Successful in 14m24s
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 11m27s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
befa33cc75
pd_export.py is a served source of every s12 arm, so the follow-up code change made both #363 gate records STALE.
Owned-boot card gates (ttx run <arm> --suite ..., tt-window.sh gate mode, 2026-11-08), stamped by
bench/probes/pd_export/gate_stamp.py (served pd_export.py / model_runner.py / kv_host_tier.py / mtp_batch.py equal
this tree):
- s12phv-pd-export-mtp: equiv pass, gsm8k 59/60, retrieval 16k/32k 1.0 (ttx-...-20261107T231050Z)
  -> pd363-gate-s12phv-pd-export-mtp-20261107T233053Z
- s12-prefix-host-vsplit-sf (production arm): equiv pass, gsm8k 59/60, retrieval 1.0/1.0, agent-sessions pass
  code_recall 1.0 (ttx-...-20261107T234050Z) -> pd363-gate-s12-prefix-host-vsplit-sf-20261107T235747Z
  (an earlier boot, 232351Z, was stopped mid agent-sessions on the coordinator's abort; not used)
Adversarial export checks on the export arm (pd363fu-adversarial-20261108.txt): 7 bad/unlisted requests refused
with the engine up (incl. 192.168.88.164:18731 not allowed), the LAN broker 192.168.88.125:18731 accepted by the
allowlist (the connect then times out: cfx-llm1's firewall does not open 18731 on eno1), good 40G export sent
(304 MB, pins_now=0). No broker SIGSTOP this time: the router stayed in pd mode, the broker was live.
ttx lint OK for s12-prefix-host-vsplit-sf, s12phv-pd-export{,-tc,-mtp}; nix-spec --check OK.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner

"verdict: approve\ntier: T1 (served-source hardening of pd_export.py, a served source of every s12 arm; no secret/infra/gate changes)\n\nrationale: Clean #363 follow-up. The three semantic changes are all correct and well-documented, the allowlist expansion is scoped to the export arm only (the production arm diff is a gate-stamp rename with no allow change), and no secrets or code-execution patterns exist anywhere in the vendored test deps or fixtures. Both arms carry fresh card gates on tree c40dd433 (equiv/gsm8k/retrieval/agent-sessions pass) and the adversarial run confirms unlisted targets are refused while the LAN broker is accepted.\n\nconcerns:\n- [nit] bench/runs/pd363fu-adversarial-20261108.txt — the PR notes cfx-llm1's firewall does not yet open 18731 on eno1, so the LAN fallback is allowlisted but cannot actually carry exports until a nixos-llm gateway change lands. Non-blocking for this PR: the entry is refused-elsewhere-safe (still subject to allowlist) and the follow-up is a separate infra change.\n- [nit] Known cosmetic: a connect timeout is logged as "send timed out after 30 s" though it is the 10 s CONNECT_S path. Cosmetic only, documented in the PR.\n"

"**verdict:** approve\n**tier:** T1 (served-source hardening of `pd_export.py`, a served source of every s12 arm; no secret/infra/gate changes)\n\n**rationale:** Clean #363 follow-up. The three semantic changes are all correct and well-documented, the allowlist expansion is scoped to the export arm only (the production arm diff is a gate-stamp rename with no allow change), and no secrets or code-execution patterns exist anywhere in the vendored test deps or fixtures. Both arms carry fresh card gates on tree c40dd433 (equiv/gsm8k/retrieval/agent-sessions pass) and the adversarial run confirms unlisted targets are refused while the LAN broker is accepted.\n\n**concerns:**\n- [nit] `bench/runs/pd363fu-adversarial-20261108.txt` — the PR notes cfx-llm1's firewall does not yet open 18731 on eno1, so the LAN fallback is allowlisted but cannot actually carry exports until a nixos-llm gateway change lands. Non-blocking for this PR: the entry is refused-elsewhere-safe (still subject to allowlist) and the follow-up is a separate infra change.\n- [nit] Known cosmetic: a connect timeout is logged as \"send timed out after 30 s\" though it is the 10 s CONNECT_S path. Cosmetic only, documented in the PR.\n"
Member

Cards skipped

Cards unavailable on cfx-llm0 for PR #365 befa33cc756f8a65ee239b3007a604a454d96421.

  • systemctl is-active tenstorrent-serving.service = active (need inactive)
  • MemAvailable = 85337248 kB (need >= 4000000)

No slot taken, no boot. This skip is green.

## Cards skipped Cards unavailable on `cfx-llm0` for PR #365 `befa33cc756f8a65ee239b3007a604a454d96421`. - `systemctl is-active tenstorrent-serving.service` = `active` (need `inactive`) - MemAvailable = `85337248` kB (need >= 4000000) No slot taken, no boot. This skip is green.
Author
Member

Landing: Opus review LAND-WITH-NITS (no blockers). Gate stamps verified against this tree (equiv pass, gsm8k 59/60, retrieval 1.0/1.0, agent-sessions pass). cards-fresh can't measure while prod is serving, the same as #363. Nits recorded: the PR text overstates the old remove() hazard; no call-site mutant test; the LAN target is allowed but cfx-llm1's firewall doesn't open 18731 on eno1 yet.

Landing: Opus review LAND-WITH-NITS (no blockers). Gate stamps verified against this tree (equiv pass, gsm8k 59/60, retrieval 1.0/1.0, agent-sessions pass). cards-fresh can't measure while prod is serving, the same as #363. Nits recorded: the PR text overstates the old remove() hazard; no call-site mutant test; the LAN target is allowed but cfx-llm1's firewall doesn't open 18731 on eno1 yet.
orchestra merged commit 172d17994d into master 2026-11-08 01:58:15 +01:00
Owner

agent-gateway closeout (merged): cleared agent:* labels.
Hermes kanban card (if any) is left for Hermes to archive/complete.

agent-gateway closeout (merged): cleared `agent:*` labels. Hermes kanban card (if any) is left for Hermes to archive/complete.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitpartner/tt-stack!365
No description provided.