Issue files (.scratch/issues/20-29): retrospective specs for all work done in the current sprint — hardening, route-timeout, start-layer protocol, heartbeat stats, availability map, rolling RPM, smart assignment, throughput routing, routing tests, relay outbound client. ADRs (docs/adr/0011-0014): 0011 — Auto-shard from memory budget and tracker network assignment 0012 — X-Meshnet-Start-Layer overlapping shard execution protocol 0013 — Rolling RPM statistics, smart assignment scoring, throughput routing 0014 — Relay outbound client for NAT/internet pipeline hops prd.json: US-020 through US-029 added, all marked done. ralph_progress.py now shows 29/29 complete (100%). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.3 KiB
1.3 KiB
US-022 — X-Meshnet-Start-Layer: overlapping shard execution protocol
Status: done Priority: High Stage: Implemented
Context
Two nodes may register overlapping shard ranges (node A: 0–15, node B: 12–23) to increase redundancy or to enable partial-model nodes to form a complete route. Without coordination, node B would re-run layers 12–15 on top of activations that already include them, producing wrong output.
The X-Meshnet-Start-Layer header tells each downstream node which model layer the incoming
activation tensor represents, so the node skips layers it has already been told to skip.
Decision
Option A: tracker injects start_layer into X-Meshnet-Route hops at proxy time. The head
node passes it per-hop as X-Meshnet-Start-Layer. No peer-to-peer negotiation needed.
Acceptance criteria
- Tracker
_handle_proxy_chatbuilds route hops withstart_layer=covered_up_to + 1 _handle_binary_forwardreadsX-Meshnet-Start-Layerand passes it tobackend.forward_bytes_get_remaining_routeparsesstart_layerfrom injected header and from/v1/routeslow-pathTorchModelShard.forward_bytesaccepts optionalstart_layerand skips layers below it- Test: overlapping two-node route produces correct output without double-computing layers
python -m pytestpasses