3.1 KiB
3.1 KiB
DGR-035 evidence — dense architecture boundary input/output
Implemented: 2026-08-01
Authority: .scratch/distributed-gguf-runtime/prd.json
What changed
DenseRangeBoundaryExecutoris a strict execution-facing adapter for the certifieddense-llamaarchitecture. A head range accepts non-empty token IDs and owns the embedding callback. Middle/tail ranges reject token IDs and require the nameddense.residual.v1BoundaryBundle.- Non-tail execution returns exactly the raw
hidden_statesresidual from its local layer callback. Its constructor rejects a final-norm/output callback, preventing final normalization, logits projection, sampling, and tail-only row pruning before the tail. - Tail execution is the only path allowed to own final output and returns an explicit
TailOutput: either validated logits or a sampled token. The existing wireTypedTailResultnow serializes and validates both choices. - Unknown architectures, wrong boundary points, and tensor bundles other than one named
hidden_statestensor fail closed.
Changed files
packages/node/meshnet_node/architecture_boundary.pytests/test_dense_range_boundary.pytests/test_architecture_boundary.py.ralph-tui/progress.md.scratch/distributed-gguf-runtime/evidence/DGR-035/README.md
Commands and results
TESTPY=/home/popov/.hermes/hermes-agent/venv/bin/python
PYTHONPATH=packages/node:packages/tracker "$TESTPY" -m pytest -q tests/test_dense_range_boundary.py tests/test_architecture_boundary.py tests/test_shard_engine.py tests/test_fake_shard_engine.py
37 passed in 0.22s
"$TESTPY" -m ruff check packages/node/meshnet_node/architecture_boundary.py tests/test_dense_range_boundary.py tests/test_architecture_boundary.py
PYTHONPATH=packages/node "$TESTPY" -m compileall -q packages tests
git diff --check
python3 scripts/ralph_prd_schema.py validate .scratch/distributed-gguf-runtime/prd.json
All checks passed!
OK: 55 stories validated.
Limitations
- This story adds and proves the project-owned boundary contract with deterministic, model-download-free tests. It does not claim real-model range parity; DGR-036 owns that numerical certification.
- The llama.cpp graph remains fail-closed for partial owned ranges until DGR-037 binds its worker to this execution contract. No native source or patch-stack file was changed here, so native CMake/CTest and patch-cycle gates are not applicable to this Python contract change.
.venv/bin/python3has nopytestmodule in this worktree. The available project validation interpreter above ran the exact targeted tests.
Dependency handoff
- DGR-036 should use
DenseRangeBoundaryExecutorwith its real-engine bridge to compare whole-model and split residual/logits outputs, including prefill and decode. - DGR-037 must adapt the pinned llama.cpp dense graph to
embed_tokens,run_layers, and tail-onlytail_output; it must preservedense.residual.v1unnormalized and avoid row pruning until the tail. - DGR-069 can propose only a generic residual-in/residual-out llama.cpp hook; architecture names and Meshnet wire/session semantics remain outside upstream.