66 lines
3.6 KiB
Markdown
66 lines
3.6 KiB
Markdown
# 08 — Build the standalone C++ gRPC Shard worker
|
|
|
|
Status: ready-for-agent
|
|
|
|
## Mandatory fresh-session context
|
|
|
|
- Read [RALPH-CONTEXT.md](../RALPH-CONTEXT.md) completely before changing code.
|
|
- This issue is `DGR-008` in [prd.json](../prd.json).
|
|
- Read the evidence README for every dependency listed below.
|
|
- Inspect current code and `git status`; historical text and previous agent claims are not evidence.
|
|
|
|
## Description
|
|
|
|
As a node runtime, I need one supervised native process so that llama.cpp internals remain behind a stable project-owned protocol.
|
|
|
|
## Expected durable outputs
|
|
|
|
- Standalone C++ gRPC worker
|
|
- Fake-model Python/C++ integration tests
|
|
- Lifecycle and bounded-failure evidence
|
|
- evidence/DGR-008/README.md
|
|
|
|
## Acceptance criteria
|
|
|
|
- [ ] Worker exposes capability, health, session stream, release, cancellation, and metrics services from DGR-002.
|
|
- [ ] Worker loads one exact Artifact/recipe/Shard identity and refuses mismatched requests.
|
|
- [ ] Streaming path enforces bounded messages, flow control, deadlines, idempotency, and independent session cancellation.
|
|
- [ ] Worker does not expose raw llama.cpp RPC or arbitrary GGML graph execution.
|
|
- [ ] Graceful shutdown releases sessions; crash behavior is bounded and observable.
|
|
- [ ] Python integration tests run against a fake model mode without model downloads.
|
|
- [ ] Targeted pytest tests pass
|
|
- [ ] python -m compileall packages tests passes for Python changes
|
|
- [ ] git diff --check passes
|
|
- [ ] Default tests remain deterministic, model-download-free, API-credit-free, and GPU-free
|
|
- [ ] Full deterministic pytest -q passes, or the exact pre-existing unrelated failure is recorded with a clean-tree reproduction
|
|
- [ ] Pinned native C++ target builds and focused CTest/protocol tests pass where native code is touched
|
|
- [ ] llama.cpp patch stack applies cleanly to the exact pinned commit where patch code is touched
|
|
- [ ] Read .scratch/distributed-gguf-runtime/RALPH-CONTEXT.md and this story issue completely before changing code
|
|
- [ ] Read and verify every dependency evidence README before relying on dependency behavior
|
|
- [ ] Preserve all pre-existing working-tree changes and stage only files belonging to this story
|
|
- [ ] Write .scratch/distributed-gguf-runtime/evidence/DGR-008/README.md with files changed, exact commands and real results, limitations, compatibility notes, and dependent-story handoff
|
|
- [ ] Update only this story issue to Status: done after every acceptance criterion and quality gate passes
|
|
|
|
## Dependency handoff
|
|
|
|
- `DGR-002` must have `passes: true`; read `../evidence/DGR-002/README.md` and verify its referenced files/commands.
|
|
- `DGR-003` must have `passes: true`; read `../evidence/DGR-003/README.md` and verify its referenced files/commands.
|
|
- `DGR-004` must have `passes: true`; read `../evidence/DGR-004/README.md` and verify its referenced files/commands.
|
|
- `DGR-006` must have `passes: true`; read `../evidence/DGR-006/README.md` and verify its referenced files/commands.
|
|
- `DGR-007` must have `passes: true`; read `../evidence/DGR-007/README.md` and verify its referenced files/commands.
|
|
|
|
## Finish contract
|
|
|
|
- Create the task evidence directory and durable handoff required above.
|
|
- Preserve real failures and blockers; never fabricate benchmark, model, test or hardware output.
|
|
- Change this issue to `Status: done` only after all criteria pass.
|
|
- Emit `<promise>COMPLETE</promise>` only after the evidence handoff exists.
|
|
|
|
## References
|
|
|
|
- [Ralph execution context](../RALPH-CONTEXT.md)
|
|
- [PRD](../PRD.md)
|
|
- [Implementation strategy](../implementation-strategy.md)
|
|
- [Current architecture](../architecture.md)
|
|
- [Architecture decision](../../docs/adr/0024-distributed-gguf-runtime.md)
|