bash-mptcp-redundant-scheduler-dsn-dup-ack-accounting
Done. I diagnosed the failure class, built a verified reference implementation, and documented it.
~/SOLUTION.md — self-contained write-up: title, root-cause analysis, full fix, verification.~/mptcp_redun_sim.sh — the working, deterministic simulator + randomized verifier.in_rq) and stale entries dropped.recv_flag[DSN]; the cumulative Data ACK advances only over the longest contiguous run of received DSNs.app_written guard — duplicate ACKs can never duplicate app bytes.60 > max RTT 40) reinjects any sent-but-unacked DSN; drift doesn't affect bookkeeping.| Run | Result |
|---|---|
NSUB=3, 50 traces |
50/50 PASS, 1216 duplicate ACKs deduplicated |
NSUB=2, 100 traces |
100/100 PASS |
NSUB=4, 100 traces, 100 segs |
100/100 PASS, 7414 dup ACKs |
NSUB=3, CWND=2, 100 traces |
100/100 PASS |
Each trace asserts: no hole, zero duplicated app bytes, exact byte count, and byte-for-byte payload match. Output is deterministic across runs. The pre-fix draft (death-only reinjection) passed just 4/50, directly reproducing root cause #4.
# Evidence - Problem class: bash-mptcp-redundant-scheduler-dsn-dup-ack-accounting - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-21T22:36:23.615Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Simulate an MPTCP v1 redundant scheduler in bash: one primary plus N backup subflows, per-subflow congestion windows and RTTs, and data-sequence-number (DSN) mapping so that data duplicated onto a backup subflow is acknowledged once at the MPTCP level even though both subflows return ACKs for it. Implement DSN mapping, duplicate-ACK return-path handling, subflow failure and rejoin, and MPTCP-level retransmission of data stranded on a dead subflow. Acceptance: over 50 randomized loss and subflow-failure traces the receive-side reassembly delivers the sender's byte stream exactly once with zero duplicated application bytes and no permanent hole, and DSN bookkeeping stays consistent under backup-subflow clock drift.", "environment": "bash", "language": "shell", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "bash-mptcp-redundant-scheduler-dsn-dup-ack-accounting", "provider": "openrouter", "solved_at": "2026-09-21T22:36:23.616Z", "version": "5.2"}Done. I diagnosed the failure class, built a verified reference implementation, and documented it.
~/SOLUTION.md — self-contained write-up: title, root-cause analysis, full fix, verification.~/mptcp_redun_sim.sh — the working, deterministic simulator + randomized verifier.in_rq) and stale entries dropped.recv_flag[DSN]; the cumulative Data ACK advances only over the longest contiguous run of received DSNs.app_written guard — duplicate ACKs can never duplicate app bytes.60 > max RTT 40) reinjects any sent-but-unacked DSN; drift doesn't affect bookkeeping.| Run | Result |
|---|---|
NSUB=3, 50 traces |
50/50 PASS, 1216 duplicate ACKs deduplicated |
NSUB=2, 100 traces |
100/100 PASS |
NSUB=4, 100 traces, 100 segs |
100/100 PASS, 7414 dup ACKs |
NSUB=3, CWND=2, 100 traces |
100/100 PASS |
Each trace asserts: no hole, zero duplicated app bytes, exact byte count, and byte-for-byte payload match. Output is deterministic across runs. The pre-fix draft (death-only reinjection) passed just 4/50, directly reproducing root cause #4.
# Evidence - Problem class: bash-mptcp-redundant-scheduler-dsn-dup-ack-accounting - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-21T22:36:23.615Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Simulate an MPTCP v1 redundant scheduler in bash: one primary plus N backup subflows, per-subflow congestion windows and RTTs, and data-sequence-number (DSN) mapping so that data duplicated onto a backup subflow is acknowledged once at the MPTCP level even though both subflows return ACKs for it. Implement DSN mapping, duplicate-ACK return-path handling, subflow failure and rejoin, and MPTCP-level retransmission of data stranded on a dead subflow. Acceptance: over 50 randomized loss and subflow-failure traces the receive-side reassembly delivers the sender's byte stream exactly once with zero duplicated application bytes and no permanent hole, and DSN bookkeeping stays consistent under backup-subflow clock drift.", "environment": "bash", "language": "shell", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "bash-mptcp-redundant-scheduler-dsn-dup-ack-accounting", "provider": "openrouter", "solved_at": "2026-09-21T22:36:23.616Z", "version": "5.2"}