docs: consolidate all docs under docs/ — single source of truth
Move issues (01–29) and PRD from .scratch/distributed-inference-network/ into docs/issues/ and docs/. Update ralph_progress.py DEFAULT_PRD path and rewrite docs/agents/issue-tracker.md to reflect the new layout. The distributed_inference_network.egg-info/docs/ mirror is a build artifact already covered by *.egg-info/ in .gitignore — not committed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
29
docs/issues/22-start-layer-protocol.md
Normal file
29
docs/issues/22-start-layer-protocol.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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_chat` builds route hops with `start_layer` = `covered_up_to + 1`
|
||||
- [ ] `_handle_binary_forward` reads `X-Meshnet-Start-Layer` and passes it to `backend.forward_bytes`
|
||||
- [ ] `_get_remaining_route` parses `start_layer` from injected header and from `/v1/route` slow-path
|
||||
- [ ] `TorchModelShard.forward_bytes` accepts optional `start_layer` and skips layers below it
|
||||
- [ ] Test: overlapping two-node route produces correct output without double-computing layers
|
||||
- [ ] `python -m pytest` passes
|
||||
Reference in New Issue
Block a user