chore: restore canonical DGR-033 metadata projection

This commit is contained in:
Dobromir Popov
2026-07-26 23:04:45 +03:00
parent 7473bb7e44
commit 4d530d702c
2 changed files with 21 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
<!-- GENERATED FROM prd.json — DO NOT EDIT AS AN INDEPENDENT SOURCE. prd.json IS AUTHORITATIVE. -->
# DGR-033: Build a standalone fake C++ gRPC Shard worker
- **Status / triage:** specification only; `ready-for-agent`; `passes: false`
- **Status / triage:** completed; `ready-for-agent`; `passes: true`
- **Execution mode:** `AFK`
- **Milestone:** `M1`
- **Dependencies:** `DGR-022`, `DGR-024`, `DGR-032`
@@ -18,11 +18,11 @@ Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`,
## Acceptance criteria
- [ ] A standalone C++ executable serves the complete lifecycle and stream RPC contract using the fake engine.
- [ ] Python integration tests cover startup, health, capability, fragmented prefill, decode, release, cancellation, and graceful shutdown.
- [ ] Bounded messages, deadlines, flow control, and independent session cancellation are enforced.
- [ ] The worker exposes neither llama.cpp RPC nor arbitrary graph execution.
- [ ] Applicable shared quality gates in `prd.json` pass, and the evidence handoff records exact commands/results, changed files, limitations, and dependency handoff.
- [x] A standalone C++ executable serves the complete lifecycle and stream RPC contract using the fake engine.
- [x] Python integration tests cover startup, health, capability, fragmented prefill, decode, release, cancellation, and graceful shutdown.
- [x] Bounded messages, deadlines, flow control, and independent session cancellation are enforced.
- [x] The worker exposes neither llama.cpp RPC nor arbitrary graph execution.
- [x] Applicable shared quality gates in `prd.json` pass, and the evidence handoff records exact commands/results, changed files, limitations, and dependency handoff.
## Shared quality gates
@@ -30,7 +30,10 @@ Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`,
- `git diff --check` passes.
- Default tests are model-download-free, API-credit-free, and GPU-free.
- Evidence README records exact changed files, commands/results, limitations, and dependency handoff; no fabricated evidence or inherited completion credit.
- Native changes pass focused out-of-tree CMake build and CTest; patch changes verify clean apply/check/reverse against the exact llama.cpp pin.
- Runs are opt-in and record exact artifact/split hashes, runtime/upstream pin, backend/driver, hardware, network, commands, and raw metrics. Model artifacts use configured mounted-drive storage and never `/home`.
- Preserve existing Transformers behavior and backend-agnostic Tracker routing/load balancing/billing/relay semantics unless an explicit versioned contract says otherwise. One scoped story commit is expected during execution, but this specification-materialization change is not committed.
## Evidence handoff
Write and verify `.scratch/distributed-gguf-runtime/evidence/DGR-033/README.md`. Until every criterion and applicable gate has real evidence, this story remains `passes: false`. Legacy evidence is provenance only, not completion credit.
Verified evidence: `.scratch/distributed-gguf-runtime/evidence/DGR-033/README.md`. All acceptance criteria and applicable shared gates passed after the Codex BLOCK repair and fresh native/Python verification. Legacy evidence remains provenance only.

View File

@@ -106,7 +106,7 @@
"Define controlled safetensors, whole-model GGUF, dense distributed GGUF, and V4 Flash distributed lanes with fixed prompts, context/output lengths, sampling, concurrency, hardware, and metrics.",
"Alpha requires correctness plus a human-approved useful-speed threshold; beta adds concurrency, long-context, failure, and sustained-throughput thresholds.",
"Separate quantization/model-fit gains from runtime, transport, batching, and kernel gains.",
"Treat quants and 2\u20134/10+ stage counts only as named certification scenarios; no product logic may hardcode them.",
"Treat quants and 24/10+ stage counts only as named certification scenarios; no product logic may hardcode them.",
"Lock thresholds and stop conditions in versioned machine-readable data before benchmark result ingestion.",
"Applicable shared quality gates in `prd.json` pass, and the evidence handoff records exact commands/results, changed files, limitations, and dependency handoff."
],
@@ -262,12 +262,12 @@
"acceptanceCriteria": [
"Pin protoc, gRPC, and plugin versions or declare a verified compatible range.",
"Generate Python and C++ bindings into out-of-tree build/package locations through documented commands.",
"Add Python\u2194C++ round-trip and descriptor compatibility tests.",
"Add PythonC++ round-trip and descriptor compatibility tests.",
"A clean checkout regenerates bindings deterministically or fails with an actionable toolchain error.",
"Applicable shared quality gates in `prd.json` pass, and the evidence handoff records exact commands/results, changed files, limitations, and dependency handoff."
],
"passes": true,
"notes": "Completed from Gitea #7 after controller provisioned and exercised the exact Python/C++ toolchains. Verified deterministic generation, native CMake/CTest, Python\u2194C++ byte parity, compileall, and diff checks; fixed relative bootstrap prefix resolution.",
"notes": "Completed from Gitea #7 after controller provisioned and exercised the exact Python/C++ toolchains. Verified deterministic generation, native CMake/CTest, PythonC++ byte parity, compileall, and diff checks; fixed relative bootstrap prefix resolution.",
"completionNotes": "Verified exact grpcio-tools 1.82.1, Protobuf 33.1, Abseil 20250814.1, and gRPC C++ 1.82.1 at commit acccf84c0df20487d64101f528e5d426541ca4e5. Mandatory Python/C++ message and service generation, native CTest, deterministic regeneration, and byte-for-byte Python/C++ parity passed; see evidence/DGR-023/README.md.",
"blocks": [
"DGR-024",
@@ -352,7 +352,7 @@
"DGR-041",
"DGR-044"
],
"completionNotes": "Completed 2026-07-17. Verified the live DGR-003-lineage identity core against every criterion: node packages/node/meshnet_node/runtime_recipe.py and the independent tracker packages/tracker/meshnet_tracker/recipe.py (pinned together by tests/data/recipe_fingerprint_vectors.json) fingerprint the source artifact SHA, tokenizer pin, architecture adapter and config digest, boundary/protocol schema versions, backend, weight quant, activation/compute dtypes, and KV dtype/layout under domain-separated digests; shards bind to exact half-open ranges with no topology or quant constants; route/handshake/session checks fail closed with structured mismatch reasons; recipes stay registered-but-dark in the tracker CertificationLedger until a real >=2-distinct-node whole-model distributed forward certifies them. Closed the one open criterion gap (runtime pin/patch stack): new packages/node/meshnet_node/runtime_pin.py derives the runtime_version axis from the DGR-027 lock manifest \u2014 exact upstream commit plus a digest over the ordered patch-stack bytes \u2014 failing closed on any UPSTREAM_LOCK.json/UPSTREAM_COMMIT/series/SHA256SUMS/patch-byte disagreement, and both identity implementations now reject a moving runtime_version reference. Tests: tests/test_runtime_pin_identity.py (17 passed) plus 196 passing impacted identity/admission/native-emission tests; python -m compileall and git diff --check clean. Also repaired backlog consistency left by prior sessions: added the missing DGR-022/DGR-027 completionNotes, regenerated the DGR-022/025/027 issue projections, and relocated three pre-DGR legacy GLM alpha issue files to issues/legacy/."
"completionNotes": "Completed 2026-07-17. Verified the live DGR-003-lineage identity core against every criterion: node packages/node/meshnet_node/runtime_recipe.py and the independent tracker packages/tracker/meshnet_tracker/recipe.py (pinned together by tests/data/recipe_fingerprint_vectors.json) fingerprint the source artifact SHA, tokenizer pin, architecture adapter and config digest, boundary/protocol schema versions, backend, weight quant, activation/compute dtypes, and KV dtype/layout under domain-separated digests; shards bind to exact half-open ranges with no topology or quant constants; route/handshake/session checks fail closed with structured mismatch reasons; recipes stay registered-but-dark in the tracker CertificationLedger until a real >=2-distinct-node whole-model distributed forward certifies them. Closed the one open criterion gap (runtime pin/patch stack): new packages/node/meshnet_node/runtime_pin.py derives the runtime_version axis from the DGR-027 lock manifest exact upstream commit plus a digest over the ordered patch-stack bytes failing closed on any UPSTREAM_LOCK.json/UPSTREAM_COMMIT/series/SHA256SUMS/patch-byte disagreement, and both identity implementations now reject a moving runtime_version reference. Tests: tests/test_runtime_pin_identity.py (17 passed) plus 196 passing impacted identity/admission/native-emission tests; python -m compileall and git diff --check clean. Also repaired backlog consistency left by prior sessions: added the missing DGR-022/DGR-027 completionNotes, regenerated the DGR-022/025/027 issue projections, and relocated three pre-DGR legacy GLM alpha issue files to issues/legacy/."
},
{
"id": "DGR-026",
@@ -419,7 +419,7 @@
"Manifest records upstream URL, exact commit, expected source archive/tree hash, license, and retrieval method.",
"Fetch tooling verifies identity before use and refuses an unpinned branch/tag.",
"Source is fetched into an ignored build workspace; no submodule, vendored source tree, or permanent fork is introduced.",
"Offline reuse is supported only after the cached tree\u2019s exact identity is verified.",
"Offline reuse is supported only after the cached trees exact identity is verified.",
"Applicable shared quality gates in `prd.json` pass, and the evidence handoff records exact commands/results, changed files, limitations, and dependency handoff."
],
"passes": true,
@@ -1159,7 +1159,7 @@
"triage": "ready-for-agent",
"description": "Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`, source issue `.scratch/distributed-gguf-runtime/issues/046-define-the-v4-typed-architecture-boundary-schema.md`, and evidence READMEs for dependencies (DGR-021, DGR-045) before changing code. Inspect live source/tests rather than trusting legacy pass states. Objective: Define the exact cross-stage V4 architecture boundary while keeping per-layer attention and auxiliary caches shard-local.",
"acceptanceCriteria": [
"Define a versioned named bundle for the mHC 4\u00d74096 residual boundary, positions, token-ID sideband where required, and schema/cache expectations.",
"Define a versioned named bundle for the mHC 4×4096 residual boundary, positions, token-ID sideband where required, and schema/cache expectations.",
"Explicitly exclude per-layer CSA, HCA, SWA, indexer, compressor, KV, and MTP caches/state from the WAN boundary; those remain local to the owning shard and session/epoch.",
"Reserve typed MTP boundary fields but mark MTP execution unsupported and unroutable for alpha.",
"Fingerprint independently of quant/topology and fail closed on missing, incompatible, incorrectly shaped, or stale boundary/cache expectations.",
@@ -1198,7 +1198,7 @@
"triage": "ready-for-agent",
"description": "Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`, source issue `.scratch/distributed-gguf-runtime/issues/047-adapt-the-upstream-v4-mhc-boundary-for-ranged-ownership.md`, and evidence READMEs for dependencies (DGR-045, DGR-046) before changing code. Inspect live source/tests rather than trusting legacy pass states. Objective: Add range-boundary adapters around upstream llama.cpp V4 mHC execution without reimplementing the V4 graph or kernels.",
"acceptanceCriteria": [
"Represent and validate the upstream V4 4\u00d74096 mHC boundary without flattening semantic axes.",
"Represent and validate the upstream V4 4×4096 mHC boundary without flattening semantic axes.",
"Add only head/intermediate/tail range ownership and boundary conversion hooks around the pinned upstream llama.cpp graph.",
"Compare deterministic fixture vectors and single-process ranged outputs with upstream whole-model execution.",
"Document that llama.cpp owns V4 mHC graph/kernels and that quantized storage does not alter the logical boundary schema.",
@@ -1408,7 +1408,7 @@
},
{
"id": "DGR-053",
"title": "Certify a real 2\u20134-stage V4 route",
"title": "Certify a real 24-stage V4 route",
"priority": 37,
"milestone": "M3",
"executionMode": "HITL",
@@ -1433,7 +1433,7 @@
"triage": "ready-for-human",
"description": "Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`, source issue `.scratch/distributed-gguf-runtime/issues/053-certify-a-real-2-4-stage-v4-route.md`, and evidence READMEs for dependencies (DGR-030, DGR-043, DGR-052) before changing code. Inspect live source/tests rather than trusting legacy pass states. Objective: Prove real Tracker-selected V4 execution across physical machines before alpha.",
"acceptanceCriteria": [
"Run one documented 2\u20134-stage certification scenario using exact compatible artifacts/recipes; the count and chosen quant are evidence inputs, not product constants.",
"Run one documented 24-stage certification scenario using exact compatible artifacts/recipes; the count and chosen quant are evidence inputs, not product constants.",
"Actual CPU/GPU work executes on every stage; fake workers do not satisfy acceptance.",
"Record parity, TTFT, prefill/decode speed, seam cost, memory, cache/state isolation, cancellation, and cleanup.",
"Tracker selection remains dynamic and rejects an injected incompatible backend/recipe.",
@@ -1712,7 +1712,7 @@
"DGR-058"
],
"triage": "ready-for-agent",
"description": "Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`, source issue `.scratch/distributed-gguf-runtime/issues/060-certify-v4-long-context-state-correctness.md`, and evidence READMEs for dependencies (DGR-051, DGR-056, DGR-058) before changing code. Inspect live source/tests rather than trusting legacy pass states. Objective: Prove V4\u2019s KV and auxiliary state remain correct and bounded at long contexts.",
"description": "Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`, source issue `.scratch/distributed-gguf-runtime/issues/060-certify-v4-long-context-state-correctness.md`, and evidence READMEs for dependencies (DGR-051, DGR-056, DGR-058) before changing code. Inspect live source/tests rather than trusting legacy pass states. Objective: Prove V4s KV and auxiliary state remain correct and bounded at long contexts.",
"acceptanceCriteria": [
"Exercise pre-locked context lengths covering multiple prefill chunks and sustained decode.",
"Validate KV plus CSA/HCA/SWA/indexer/compressor state positions across every stage.",
@@ -2165,6 +2165,6 @@
}
],
"metadata": {
"updatedAt": "2026-07-23T08:09:16.081Z"
"updatedAt": "2026-07-23T08:09:17.286Z"
}
}