night window: traffic recorder, replay suite, 02:00-06:00 card experiment controller #336
Open
Grok
wants to merge 2 commits from
opus/night-window into master
pull from: opus/night-window
merge into: bitpartner:master
bitpartner:master
bitpartner:claude/public-release-v8
bitpartner:claude/pi-lora-device
bitpartner:claude/pi-lora-epyc-check
bitpartner:claude/pi-lora-plumbing
bitpartner:perf/export-cap-12288
bitpartner:claude/pd-kv-admission
bitpartner:claude/ship-cdr8g
bitpartner:claude/ship-col3-cdr8g
bitpartner:codex/public-release
bitpartner:codex/pp10k
bitpartner:codex/mando-kernels
bitpartner:opus/router-delta-margin
bitpartner:opus/rtx-b8-32k
bitpartner:claude/router-ttdown-fastpath
bitpartner:claude/license-apache2
bitpartner:codex/mtp-w1
bitpartner:docs/longctx-pp
bitpartner:codex/k8b4-speed
bitpartner:codex/kvarn2-study
bitpartner:codex/sglang-port-study
bitpartner:codex/inc393-offload-assert
bitpartner:codex/x16-bench
bitpartner:codex/mtp-cpu
bitpartner:codex/mtp-accept-train
bitpartner:opus/rtx-gpu0diag-rec
bitpartner:opus/rtx-sample-sparse
bitpartner:opus/rtx-prof32k-rec
bitpartner:opus/rtx-prof32k
bitpartner:opus/rtx-b8-prof
bitpartner:codex/k8b4-concurrent
bitpartner:opus/rtx-decode-lane
bitpartner:opus/rtx-w4a8-park
bitpartner:opus/rtx-ar-q8
bitpartner:codex/modelopt-scan
bitpartner:opus/pd-master-consolidation
bitpartner:codex/pd-recipe
bitpartner:opus/rtx-k8b4-connector
bitpartner:opus/pd-branch-archive
bitpartner:codex/pd-docs-fix
bitpartner:codex/pd-prod-snapshot
bitpartner:opus/rtx-kv4
bitpartner:opus/pd-connector-lows
bitpartner:history/hermes-review-uplift
bitpartner:eval-sglang-torchtpu
bitpartner:pp32k-w3c-upstream
bitpartner:pp32k-prefill
bitpartner:upstream-scan-20261109
bitpartner:plugin-283-slot-keep
bitpartner:docs/history-pd-delta
bitpartner:opus/pd-delta-export
bitpartner:opus/pd-stack-to-master
bitpartner:pp32k-ethdisp
bitpartner:opus/pd-router-template
bitpartner:docs/pd-path-breakdown
bitpartner:skill/pd-enterprise-bench
bitpartner:opus/pd-arena-freelist
bitpartner:opus/pd-adaptive
bitpartner:opus/rtx-decode-night
bitpartner:opus/rtx-dynk-fix
bitpartner:opus/rtx-night-ar
bitpartner:opus/rtx-night-attn
bitpartner:opus/pd-export-followup
bitpartner:opus/rtx-night-topk
bitpartner:docs/history
bitpartner:opus/pd-export-arm-master
bitpartner:opus/cmb-crash
bitpartner:opus/pd-draft-tune
bitpartner:opus/tt-interleave
bitpartner:opus/pd-adaptive-v2
bitpartner:opus/rtx-embed-host
bitpartner:opus/pd-adaptive-sim
bitpartner:opus/pd-adaptive-router
bitpartner:opus/pd-cutover
bitpartner:opus/pd-hyperqwen
bitpartner:opus/pd-reprefill
bitpartner:opus/pd
bitpartner:public/arm-flatten
bitpartner:public/upstream-inventory
bitpartner:opus/pd-handoff-opt
bitpartner:opus/lsa-eval
bitpartner:fix/tt-serving-hold-guard
bitpartner:opus/pd-sim-levers
bitpartner:opus/mtp-host-row-isolate
bitpartner:opus/mando2222-cp7
bitpartner:opus/upstream-scan-1104
bitpartner:opus/host-sample-why
bitpartner:opus/cold-prefix-s10
bitpartner:opus/cold-prefix-s10-pack
bitpartner:opus/pd-r3
bitpartner:scout/upstream-20261103
bitpartner:opus/rtx-drafter
bitpartner:opus/b8d-measure
bitpartner:docs/status-refresh-20261102
bitpartner:opus/b8d-verify-attn-splitkv
bitpartner:opus/b8d-sparse-verify-sampling
bitpartner:opus/b8d-ar-asym-x8
bitpartner:opus/b8d-draft-head-quant
bitpartner:opus/b8d-prob-draft-topk
bitpartner:opus/b8d-marlin-m32-mma
bitpartner:opus/rtx-opt
bitpartner:opus/traffic-bench
bitpartner:opus/pd-r2
bitpartner:opus/pd-e2e
bitpartner:opus/pd-export
bitpartner:opus/pd-router
bitpartner:opus/pd-connector
bitpartner:opus/pd-rtx-serve
bitpartner:opus/gdn-id-pool
bitpartner:opus/kv-1m
bitpartner:opus/prefix-rounds
bitpartner:opus/prod-spec-image-id
bitpartner:opus/blend-publish
bitpartner:opus/cold-pp
bitpartner:opus/dashboard-bench
bitpartner:opus/pd-rtx
bitpartner:opus/prod-edge
bitpartner:opus/probe-hugepages
bitpartner:opus/so-vsplit
bitpartner:opus/fused-decode
bitpartner:opus/fused-decode-vsplit
bitpartner:opus/bfp-autoround
bitpartner:opus/blend-b09d16
bitpartner:opus/blend-gptq-table
bitpartner:opus/kv-host-tier
bitpartner:opus/serve-arm
bitpartner:opus/ttx-ab-suite-refuse
bitpartner:opus/kv-host-tier-history
bitpartner:opus/bfp-quant-docs
bitpartner:opus/s12-prefix
bitpartner:opus/kv-host-tier-staging
bitpartner:opus/cfx-llm0
bitpartner:opus/s12-sdlofi
bitpartner:opus/optrace-addon
bitpartner:opus/tmc-premise
bitpartner:opus/s12-budget
bitpartner:ship/s12
bitpartner:opus/s11-next
bitpartner:ship/s11
bitpartner:opus/verify-rest-2
bitpartner:docs/s10-greedy
bitpartner:docs/optrace-fcb-pf32
bitpartner:opus/pf32
bitpartner:ship/s10
bitpartner:opus/verify-rest
bitpartner:opus/dcx
bitpartner:x280-foundation
bitpartner:docs/crashcourse
bitpartner:opus/sdpa32k
bitpartner:docs/stale-fix
bitpartner:opus/dcx-hcap
bitpartner:x280-program-doc
bitpartner:ship/s9
bitpartner:opus/draftcut
bitpartner:ship/s7-pp3
bitpartner:docs/port-skills
bitpartner:opus/ssparity
bitpartner:probe/drafter-t1
bitpartner:opus/verify64
bitpartner:fix/gate-boot-identity
bitpartner:plan/tg100
bitpartner:ship/s7
bitpartner:screen/batch4
bitpartner:sim/fabric-link-counters
bitpartner:opus/s7cand
bitpartner:opus/rs-bank-ship
bitpartner:readme/s6-ss-numbers
bitpartner:free/t-ethtxq
bitpartner:opus/specsample-s6
bitpartner:opus/dualtrace
bitpartner:sim/kernel-overlay-fix
bitpartner:opus/fusedsampler
bitpartner:opus/rs-bank
bitpartner:opus/devaccept
bitpartner:anatomy/rs-line
bitpartner:fix/abpad-cache-key
bitpartner:free/k-swiglu
bitpartner:opus/sscost
bitpartner:free/k-gdnpre
bitpartner:free/u-matmul
bitpartner:launch/opus-specsample
bitpartner:free/u-ccl
bitpartner:free/c-audit
bitpartner:free/s-cost
bitpartner:free/u-models
bitpartner:free/c-sparse
bitpartner:serve/sampling-defaults
bitpartner:free/w-rsnorm
bitpartner:free/f-tail
bitpartner:ship/s6
bitpartner:launch/s-sample4
bitpartner:free/k-glue
bitpartner:bench/acc-curve
bitpartner:opus/top2-branch
bitpartner:screen/acc-levers3
bitpartner:screen/ss-capture
bitpartner:free/s-rowfall
bitpartner:free/a-oracle2
bitpartner:free/d-top2
bitpartner:free/c-sparse-rev
bitpartner:free/s-penalty
bitpartner:opus/specsample
bitpartner:rv4/m-specsample3
bitpartner:free/m-specsample3
bitpartner:free/s-sample4
bitpartner:review/t-proxy2
bitpartner:free/t-proxy2
bitpartner:free/t-served
bitpartner:free/l-kvbytes
bitpartner:free/m-specsample2
bitpartner:free/t-ops
bitpartner:free/l-verifykv
bitpartner:free/m-specsample
bitpartner:free/a-kdyn
bitpartner:fix/pphost-probe-mml
bitpartner:free/w-swiglu4
bitpartner:free/s-prefix4
bitpartner:free/m-creative
bitpartner:free/w-b8dec
bitpartner:free/w-gdnscan
bitpartner:free/t-proxy
bitpartner:free/b-bucket
bitpartner:free/m-multidraft
bitpartner:free/a-tree
bitpartner:free/s-sample3
bitpartner:free/w-swiglu3
bitpartner:docs/goal-recommended-sampling
bitpartner:free/f-sdpa2
bitpartner:ship/cap
bitpartner:b-bucket-tools
bitpartner:review/b-bucket
bitpartner:free/s-prefix3
bitpartner:free/d-gdn
bitpartner:free/s-prefix2
bitpartner:free/s-sample2
bitpartner:free/p-host
bitpartner:free/d-enq
bitpartner:feat/s-prefix-agentic
bitpartner:ship/s5
bitpartner:free/s-specsample
bitpartner:free/a-sink
bitpartner:free/a-accctx2
bitpartner:screen/acc-levers2
bitpartner:free/f-swiglu
bitpartner:bench/agentic-s4
bitpartner:free/f-draft
bitpartner:screen/acc-levers
bitpartner:free/f-qkvz
bitpartner:free/f-dmlp
bitpartner:free/a-window
bitpartner:free/f-gdnprep
bitpartner:free/f-glue
bitpartner:free/a-oracle
bitpartner:free/a-survey
bitpartner:screen/a-accctx
bitpartner:free/a-accctx
bitpartner:free/f-sdpa
bitpartner:docs/utilization
bitpartner:pp/rsfold
bitpartner:pp/idle
bitpartner:tooling/stream-accept
bitpartner:ship/gum2-s4
bitpartner:pp/agmm-t9
bitpartner:pp/gdn-s3cmb
bitpartner:pp/agmm-fwo
bitpartner:ship/s4
bitpartner:pp/agmm
bitpartner:pp/s3prof
bitpartner:ship/rs4
bitpartner:ship-s3-narrow
bitpartner:tools/jit-check-kernel
bitpartner:pp/gdn-combo
bitpartner:ship/s3
bitpartner:pp/glue3
bitpartner:pp/gdn-scan
bitpartner:free/w2eff
bitpartner:pp/gdn
bitpartner:free/agmm2
bitpartner:free/dsdpa
bitpartner:pp/glue2
bitpartner:pp/glue
bitpartner:ttx-claim-unique
bitpartner:pp/warm
bitpartner:pp/gdn-sdpa
bitpartner:free/vrows
bitpartner:pp/host2
bitpartner:pp/host
bitpartner:ar-prefix-hit-log
bitpartner:feat/card-queue-service
bitpartner:dev/prefetch-reopen
bitpartner:k-sweep-s
bitpartner:lookup-swap-k3
bitpartner:docs/s2-ledger-9309
bitpartner:ci-slot-reclaim
bitpartner:ship-s2-narrow
bitpartner:research/verify-rows-gt32
bitpartner:handoff/claude-20261017
bitpartner:dev/ship-stack-2
bitpartner:lc0-agent-corpus-stats
bitpartner:ci/card-gate-armsel
bitpartner:dev/draft-path
bitpartner:dev/bkda-fix
bitpartner:dev/codex-kernels
bitpartner:dev/decode-next
bitpartner:ship-s-narrow
bitpartner:dev/prefill-hostgap
bitpartner:dev/ship-stack
bitpartner:dev/agmm-eff
bitpartner:dev/so-chain
bitpartner:ar-bf8-out8
bitpartner:lever-studies-20261013
bitpartner:ar-bf8-serve
bitpartner:control-dfr
bitpartner:grill/metal-60316-gdn-prefill-waves
bitpartner:grill/metal-60840-vllm-spec-serve
bitpartner:ship-dfr
bitpartner:screen-201-joint
bitpartner:dspark-serve
bitpartner:land-195-drisc-0042
bitpartner:agmm-swiglu-pack
bitpartner:worktree-agent-aceb187bf909a2834
bitpartner:decode-mr-span-direct
bitpartner:gdn-so-fuse-serve
bitpartner:probe-59622-onecard
bitpartner:ship-e-gpgob
bitpartner:gates-e-gpgob
bitpartner:ci-fingerprint
bitpartner:ttx-heal-within-run
bitpartner:levers-nogo-closeout-20261009
bitpartner:tooling-picker-armderive
bitpartner:tg-toks
bitpartner:agent-harness
bitpartner:ci-fp-base
bitpartner:lc0-bench-token-ids
bitpartner:confirm-cpbaol-gpool
bitpartner:screen-hec-joint
bitpartner:control-joint-b8k3c48
bitpartner:grill/metal-58817-llk-8bit-stream
bitpartner:grill/metal-59507-dram-bank-grid
bitpartner:grill/metal-59622-dram-read-split
bitpartner:grill/metal-59695-sdpa-gqa-flags
bitpartner:grill/metal-59957-spec-batch
bitpartner:grill/metal-59965-gdn-scan-fp32
bitpartner:lookup-swap-k3-base
bitpartner:combo-mx-screen
bitpartner:joint-w2t-b8k3c48
bitpartner:muse-mtp-chunked
bitpartner:muse-decode-profile
bitpartner:muse-harness3
bitpartner:muse-state-bfp8
bitpartner:muse-state-bfp8-study
bitpartner:muse-commit-defer
bitpartner:fix/picker-accept-defining
bitpartner:records-197-close
bitpartner:lever/prefill-unlocks-u2-u3-u6-u7
bitpartner:verify-depth-gt4
bitpartner:lever/u2-norm2d-v2
bitpartner:gdn-producer-pool
bitpartner:prefill-kernel-8k
bitpartner:cpb-lmhead-screen
bitpartner:reeval-decode-gdn-attn-mtp
bitpartner:drisc-prefetch-prio
bitpartner:fp8-fidelity-deepdive
bitpartner:reeval/prefill-20261006
bitpartner:drisc-prefetch-pf13
bitpartner:lever-reeval-decode-weights
bitpartner:odo-on-dx
bitpartner:decode-bundle
bitpartner:kx-compute-fuse
bitpartner:gdn-verify-fused
bitpartner:conv-fold
bitpartner:kx-compute-splitread
bitpartner:drisc-prefetch-lever
bitpartner:kx-matmul
bitpartner:kx-matmul-outdirect
bitpartner:drisc-prefetch
bitpartner:decode-research
bitpartner:ci-tg-toks
bitpartner:kv-update-fold
bitpartner:sdpa-dec-lift
bitpartner:baseline/retarget-cph32
bitpartner:lever/agmm-grid9-cph32
bitpartner:lever/attnqkv-11x6-bf4
bitpartner:lever/sdpa-dec-cph-dualnoc
bitpartner:lever/gdn-scan-mcast
bitpartner:lever/gdn-fused-maxbh
bitpartner:lever/sdpa-dec-kchunk-dualnoc
bitpartner:lever/lmlofi-loo
bitpartner:lever/kda2-loo
bitpartner:lever/kda2-lmlofi-loo
bitpartner:lever/agmm-grid9-chunk2304
bitpartner:ci-serve-fix
bitpartner:ci-sweep-faster
bitpartner:ci/agmm-2x2
bitpartner:ci-token-prefix
bitpartner:ci-pr-driven
bitpartner:gdn-prefill-lift
bitpartner:gateup-on-gdc-cpk
bitpartner:resident-epoch-fix
bitpartner:kv-devinit
bitpartner:serving-throughput
bitpartner:gdn-fused-decode
bitpartner:spec-cycle
bitpartner:opmark-c177
bitpartner:resident-host
bitpartner:boot-speed
bitpartner:gateup-mr
bitpartner:prefill-prof
bitpartner:ship-c175-gdc-cpk
bitpartner:lottolabs-repro
bitpartner:lotto-forensics
bitpartner:decode-mr
bitpartner:mtp-c157
bitpartner:dram-attach
bitpartner:upstream-154
bitpartner:mtp-csplit
bitpartner:queue-guard
bitpartner:mtp-so1-cplit
bitpartner:dram-persist
bitpartner:serve-b16
bitpartner:incr-gcroots
bitpartner:resident-dv
bitpartner:mtp-draft-vocab
bitpartner:mtp-so-t0
bitpartner:arm-switch
bitpartner:queue-stepid-fix
bitpartner:p1-levers
bitpartner:tracy-image
bitpartner:op-datasheets
bitpartner:upstream-watch
bitpartner:op-anatomy
bitpartner:skill-prefill-bringup
bitpartner:ttx-gates-correctness
bitpartner:skill-bh-arch
bitpartner:ttx-ops-tools
bitpartner:mtp-gdn-state-traffic
bitpartner:mtp-device-accept
bitpartner:mtp-conv-multi
bitpartner:gdn-vsplit
bitpartner:cm-g9
bitpartner:agmm-grid
bitpartner:verify-ablate
bitpartner:mtp-warm
bitpartner:prefill-cloud
bitpartner:mtp-stack
bitpartner:gdn-multitoken
bitpartner:dspark-device
bitpartner:mtp-async
bitpartner:mtpb-dn
bitpartner:mtp-state-slot
bitpartner:k8v4-mtp
bitpartner:sdpa-spec-fold
bitpartner:pfprof
bitpartner:fabric-ring
bitpartner:ttx-merged
bitpartner:ttx-gates
bitpartner:kv-k8v4-dn
bitpartner:ttx-safety
bitpartner:mmrs-probe
bitpartner:agmm-silu
bitpartner:prefetch-dn
bitpartner:tailtrace-dn
bitpartner:normbf8
bitpartner:prefill-agmm-abso
bitpartner:worktree-agent-a5e29df1933a6076c
bitpartner:sdpa-dec-v-noc0
bitpartner:worktree-agent-aff7f4014dd906d8b
bitpartner:worktree-agent-a015e99a3392d569c
bitpartner:c105-smallops
bitpartner:agmm-in0-lowp
bitpartner:prefill-combo
bitpartner:worktree-agent-a4c964697339cbea0
bitpartner:tp1-prod-port
bitpartner:resident-rearm
bitpartner:decode-sa1
bitpartner:ttx-gc-sudo
bitpartner:prefill-rs-cfg
bitpartner:wb-gaps
bitpartner:prefill-bundle-h
bitpartner:mtp-batch-fix
bitpartner:ttx-fast-fail
bitpartner:host-leak-investigation
bitpartner:kernel-workbench
bitpartner:ttx-quickwins
bitpartner:kernel-workbench-research
bitpartner:decode-split-probe
bitpartner:mtp-batch
bitpartner:sdpa-mcast-q128
bitpartner:decode-mr-lmhead
bitpartner:prefill-kernels
bitpartner:dram-sharded-mr
bitpartner:decode-levers-2
bitpartner:qb2-scout
bitpartner:decode-levers
bitpartner:prefill-deepdive
bitpartner:prefill-devsplit
bitpartner:sim/prevalidate
bitpartner:port/issue-50-bucket-trace
bitpartner:research/lowlevel-levers
bitpartner:integrate-all
bitpartner:perf-loop-c1
bitpartner:g2-arms-registry
bitpartner:ttx-slot-stale-reclaim
bitpartner:bfp4-overlay
bitpartner:deploy/g2-prefix-0019
bitpartner:mtp-thinkingcap
bitpartner:agy/issue-39
bitpartner:agy/issue-36
bitpartner:kv-k8v4
bitpartner:agy/issue-51
bitpartner:agy/issue-64
bitpartner:fix-dead-assumptions
bitpartner:decode-campaign-53-55
bitpartner:fix/71-gdn-gate-fp32-prod
bitpartner:thinkingcap-baseline
bitpartner:tt-quant
bitpartner:bfp-quant
bitpartner:ttx
bitpartner:agy/issue-49
bitpartner:agy/issue-47
bitpartner:dspark-thinkingcap
bitpartner:repo-skills
bitpartner:harness-overhaul
bitpartner:agy/issue-50
bitpartner:agy/issue-45
bitpartner:agy/issue-38
bitpartner:agy/issue-23
bitpartner:dspark-acceptance-rate
bitpartner:thatch/lane2-serve-gotchas
bitpartner:agent/claude-auth/goal-4-nvfp4-single-card
bitpartner:agent/claude-auth/ttsim-scout
No reviewers
Labels
Clear labels
cards:go
Force a card run on this PR (consumed by CI; re-add to force again)
hermes-approved
Approved by Hermes (bot). Not a human approval.
human-approved
Approved by @donach for T2-path changes. Required by .forgejo/workflows/ci.yml approve_gate.
human-approved
Approved by the human reviewer — merge gate
iter
0
X280 program stage
iter
1
X280 program stage
iter
2
X280 program stage
iter
3
X280 program stage
prio:high
Still a large B=4/B=8 wall or tokens/cycle lever
prio:low
Parked, already lost, or bookkeeping
prio:med
Real but smaller, or needs a gate
priority/high
Owner-flagged; queue agent picks these first
state
blocked
X280 program workflow state
state
doing
X280 program workflow state
state
done
X280 program workflow state
state
review
X280 program workflow state
state
todo
X280 program workflow state
x280
SiFive X280 (L2CPU) on-card control plane
No labels
cards:go
hermes-approved
human-approved
human-approved
iter
0
iter
1
iter
2
iter
3
prio:high
prio:low
prio:med
priority/high
state
blocked
state
doing
state
done
state
review
state
todo
x280
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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!336
Loading…
Reference in a new issue
No description provided.
Delete branch "opus/night-window"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Owner request 2026-10-30: use the idle 02:00-06:00 (Europe/Prague) on cfx-llm0 for card experiments, driven by observed production traffic. Everything is off-card here: no card time was used, and nothing is enabled on any host by this PR.
What it adds
ttxlib/traffic.py, unittt-traffic-recorder): scrapes production vLLM/metricsevery 2 s and records request shapes only (arrival, prompt/prefix-hit/output tokens, concurrency, TTFT, TG tok/s, spec acceptance). No prompt or response content is reachable from/metrics. A daily rollup at 00:10 writesprofiles/<day>.jsonandlatest.json(traffic-profile/v1).bench/traffic-replay.py,ttx ... --suite traffic-replay --profile P [--window busiest-hour]): rebuilds the profile's arrivals, lengths, concurrency and prefix sharing against an arm. It reports PP tok/s and TG tok/s/user per bucket (sampling T=1.0/top_p .95/top_k 20).ttx queue --deadline: a step starts only if its budget plus the graceful teardown ends by the deadline. Steps that don't fit aredeferred. At the deadline the running step gets ttx's graceful down (docker stop -t 300).ttxlib/nightwin.py,modules/tenstorrent-night-window.nix), timer at 01:50:systemctl stop, then runsbench/night/queue.tomlfrom master;restore --if-owner-dead, a 05:50 restore timer and an independent 06:00 check timer. The units userestartIfChanged=falseand pin TZ.ttxlib/nightreport.py): what ran, per-cell PP/TG versus CONTROL, gates, failures and restore status. It writesnight-<date>.{md,json}and sends a one-line ntfy summary. Optionally it pushes anight/<date>branch.docs/NIGHT-WINDOW.mdand the skillnight-window-experimentscover queuing, budgets, what is allowed, and how results feed LEDGER and auto-merge.Safety rules enforced by the validator
ttx run|abper entry.--keep/--attach/--dev/--host/--force/--detach, including abbreviations (the validator parses with ttx's own argparse), and any shell syntax.refmust already be on master.docker stop -t 300, neverrm -f.Tests
python3 -m unittest discover -s tools/ttx/tests(CI interpreter): 769 tests, OK (1 skipped). This includes 23 controller simulations with a fake clock, metrics, unit and queue, plus 5 deadline-queue, 9 traffic and 5 replay tests.nix build .#checks.x86_64-linux.night-window: OK.check-cited-records.py: OK.65028bb9.Host wiring
A separate nixos-llm draft PR wires this in. It needs this PR merged plus a tt-stack lock bump. Not deployed.
Open questions (owner)
enabled = falsenow) be enabled?night/*branches?daniel?🤖 Generated with Claude Code
verdict: approve (label HELD — head CI not green yet)
tier: T2 (host-facing: new nix module + systemd units that stop production, CI-workflow edit, flake.nix edits; all new behavior is opt-in / off-by-default)
rationale: Additive and safe. Every change to a live file is a no-op when its flag is unset, and nothing is enabled on any host by this PR (opt-in module + idle gate). No secrets inlined, no shell-metachar paths (the validator rejects them), and it ships extensive tests (controller sims, deadline/traffic/replay) plus a nix eval test.
concerns:
waitingon head65028bb. I am NOT applyinghuman-approvedand no watcher will auto-label; re-dispatch once it lands green, then apply the single-id label.systemctl stop|start tenstorrent-serving+dockerto drive the 02:00–06:00 window — it stops production when idle. Off by default (module opt-in, 10-min idle gate, SIGTERM + ExecStopPost + 05:50 + 06:00 restore nets), but arming the module is the operator decision.queue.pybreaker now ENDS (not pauses) under a deadline, and theokcount excludesdeferredsteps — correct under a deadline, and a no-op without one (nodeferredsteps exist then).enabled = false— deliberate, keep it off until the recorder has a day of data.Cards skipped
Cards unavailable on
cfx-llm0for PR #33665028bb9794a14209b7ab8bf0ec9c935b01db84e.systemctl is-active tenstorrent-serving.service=active(needinactive)82375128kB (need >= 4000000)No slot taken, no boot. This skip is green.
Independent review (R3): OpenAI Codex gpt-6.1-sol, run by the P/D consolidation lead (Claude Opus 5.5). Reviewed head is in the header below. Read-only review; no hardware run.
Routing: Left open for its author: BLOCK. When enabled, it is not fail-closed (port 8000, metrics, docker checks, replay success). It overlaps tooling already on master.
#336 origin/opus/night-window @
65028bb979VERDICT: BLOCK
Independent OpenAI review; implementer identified by this review request as xAI/Grok. Reviewed against fetched origin/master
f386d5cc22. Repository sources were read only; tests used a temporary archive of the reviewed head. No remote hosts, cards, services, credentials, Forgejo operations or server launches were used.Findings
Critical — experiments take the live production endpoint when enabled.
tools/ttx/ttxlib/nightwin.py:206-207,modules/tenstorrent-night-window.nix:86-94. Generated steps set only TTX_OWNER; neither the controller nor the module sets TTX_MESH_PORT=8001. At the reviewed head,tools/ttx/ttxlib/arm.py:50hardcodes mesh port 8000; current master supports TTX_MESH_PORT but defaults to 8000. Thus the clean merge still boots night experiments on :8000 after stopping production. Master's live P/D router targets :8000; real user traffic can reach experimental arms. Master.claude/skills/tt-cold-prefill-window/SKILL.md:29-30explicitly records this failure and requires test containers on :8001. The new controller also lacks the current router/RTX health and #334 ownership coordination. Minimal fix: force the experiment port to 8001, reject commands/ancestor refs that defeat that isolation, and integrate current window ownership and router-health/release checks before activation.High — missing or invalid metrics authorize a production stop.
tools/ttx/ttxlib/nightwin.py:248-250,483-512,584-586. A successful HTTP response with empty/unrelated metrics parses as{}; absent running/waiting gauges and demand counters are read as zero. A changed endpoint or exporter therefore satisfies the ten-minute idle gate and final pre-stop check while real requests may exist. Non-finite values are not rejected either. Evidence: fake-clock reproduction withFakeHost.metrics=lambda: {}returns(True, 'idle for 10 min at 02:00:00'). Minimal fix: require finite, valid running/waiting gauges and the demand counters for every accepted sample and final check; invalidate the quiet interval when observability is lost.High — card ownership checks fail open and restore can collide with another card owner.
tools/ttx/ttxlib/nightwin.py:270-283,614-617,679-697.card_containers()ignores exit status from both docker ps and inspect: permission/daemon/inspection errors become an empty card list. During restore, an exception is also replaced with an empty list; foreign containers are logged but production is started anyway, and failed night-container stops do not prevent that start. Concrete scenario: another driver has a card container after production stops, or a night container refuses to stop; restore starts production against occupied cards. The one-process-per-card rule makes this unsafe. Evidence: substituting a CompletedProcess with rc=1 and stderr='permission denied' into Host.sh makes card_containers() return[]; the existingtest_restore_survives_raising_host_callseven expects successful restore after container enumeration raises. Minimal fix: reject failed or incomplete Docker enumeration; before production start, prove no card holder remains, retry/alert if foreign or unkillable holders remain, and coordinate ownership with the existing window workflow.High — replay reports success without a successful completion.
bench/traffic-replay.py:172-190,287-288; propagated bytools/ttx/ttxlib/gates.py:812-822. The stream parser ignores JSON error events and accepts premature EOF, missing usage and absent generated text. Only Python exceptions set a row error; the aggregate then sets ok=true and the gate says every request answered. Evidence: a mocked HTTP-200 stream containingdata: {"error":{"message":"engine failed"}}followed by[DONE]returns a row without error, with completion_tokens/TTFT/TG all null. No server was started. Minimal fix: reject API error events and incomplete streams, require valid usage and output, and verify the requested decode length (ignore_eos is enabled); add negative parser/gate tests.Production defaults and fail-closed assessment
Merging alone does not activate a recorder, stop production, or schedule experiments. Both switches use mkEnableOption (false by default); all new services/timers are inside their respective mkIf. flake.nix exports the module but its default module imports only host and serving. No new cron entry or unconditional service restart was found. The sole standing queue entry is explicitly disabled. Existing run/ab behavior changes only to support the explicitly selected replay suite; queue deadlines are optional.
When explicitly enabled, the recorder is wanted by multi-user.target and scrapes production /metrics; its daily persistent rollup timer runs at 00:10. Night timers run at 01:50, 05:50 (persistent restore), and 06:00. The controller explicitly stops/starts tenstorrent-serving, can reset-failed, and delegates experiments/reset recovery to ttx. It uses graceful docker stop -t 300 plus wait, not docker rm -f. There are useful guards: active-production prerequisite, queue validation, master-ancestor restriction by default, pre-stop idle observation, deadline fitting, marker-based restore and real completion readiness. These do not answer the findings above, so enabled operation is not fail-closed.
Merge result
git merge-tree --write-tree origin/master origin/opus/night-windowexited 0, with no textual conflicts. Result tree:470b3554ea547eadaf8e999d02310860c406b705. This is a clean textual merge, not evidence of operational compatibility.Overlap with tooling now on master
Requested grep of tools/pd-split, tools/traffic-bench and .claude/skills found substantial overlap:
tools/traffic-bench/traffic.pyalready generates and replays seeded agentic session traces, scrapes server metrics and writes records. Its token-ID prompts preserve exact token prefixes; this PR reconstructs approximate prompts using 2.9 characters/token. The schemas differ (traffic-trace-v1versustraffic-profile/v1), so this is overlapping functionality, not a drop-in integration. The continuous production-metrics daily recorder is an additional capability; no equivalent continuous recorder was identified in those requested paths.tools/traffic-bench/tt-window.shandtools/pd-split/e2e/tt-window.shalready implement idle checks, production stop, experimental boot on 8001 and trap restore. The traffic-bench wrapper also checks other drivers/slots and avoids starting production while other TT containers remain..claude/skills/tt-cold-prefill-window/SKILL.mddocuments current window ownership, router/RTX health, 8001 isolation and routed RELEASE-CHECK; its workflow overlaps the new night-window-experiments skill. This PR does not integrate those safeguards.tools/pd-split/router/replay.pyis explicitly a cost-model estimate, distinct from this PR's live replay; it should not be conflated with measured traffic replay. P/D cutover scripts already consume traffic-bench live replay records.Consolidate ownership and safety behavior before introducing another unattended controller.
Validation and claims
python3 -m pytest -q ...: not run: missing dep pytest. No dependency installation.test_traffic_replay.EndToEndbecause its setup starts an HTTP server (forbidden by the review instructions): 40 tests passed. An initial archive omitted bench/night/queue.toml, producing one fixture error; after copying that tracked fixture into the temporary archive, all 40 passed.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.