DGR-028: Implement numbered patch-stack apply and verification #12

Closed
opened 2026-07-16 20:36:02 +00:00 by popov · 6 comments
Owner

DGR-028: Implement numbered patch-stack apply and verification

  • Status / triage: completed; passes: true
  • Execution mode: AFK
  • Milestone: M1
  • Dependencies: DGR-027
  • Blocks (derived): DGR-029, DGR-034, DGR-069
  • Labels: area:upstream, area:patches, type:tooling, priority:p0, ready-for-agent
  • Evidence class: model-free
  • Hardware: none
  • Model: generic
  • Upstream: yes

Objective / description

Fresh Ralph session: read .scratch/distributed-gguf-runtime/RALPH-CONTEXT.md, source issue .scratch/distributed-gguf-runtime/issues/028-implement-numbered-patch-stack-apply-and-verification.md, and evidence READMEs for dependencies (DGR-027) before changing code. Inspect live source/tests rather than trusting legacy pass states. Objective: Maintain a minimal auditable llama.cpp delta with one numbered patch per concern.

Acceptance criteria

  • Add deterministic apply/check/reverse verification against the exact manifest pin.
  • Separate range loading, boundary I/O, filtered state, and worker hooks into scoped patches.
  • Record upstream file/API assumptions and fail with the first incompatible patch when the pin changes.
  • Verify license/attribution and prove no Meshnet routing, billing, relay, or authentication code enters the patch stack.
  • 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

  • Targeted deterministic tests pass; Python changes also pass python -m compileall packages tests.
  • 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.

Evidence handoff

Verified evidence: .scratch/distributed-gguf-runtime/evidence/DGR-028/README.md. Legacy evidence remains provenance only and grants no implementation completion credit.

<!-- GENERATED FROM prd.json — DO NOT EDIT AS AN INDEPENDENT SOURCE. prd.json IS AUTHORITATIVE. --> # DGR-028: Implement numbered patch-stack apply and verification - **Status / triage:** completed; `passes: true` - **Execution mode:** `AFK` - **Milestone:** `M1` - **Dependencies:** `DGR-027` - **Blocks (derived):** `DGR-029`, `DGR-034`, `DGR-069` - **Labels:** `area:upstream`, `area:patches`, `type:tooling`, `priority:p0`, `ready-for-agent` - **Evidence class:** `model-free` - **Hardware:** `none` - **Model:** `generic` - **Upstream:** `yes` ## Objective / description Fresh Ralph session: read `.scratch/distributed-gguf-runtime/RALPH-CONTEXT.md`, source issue `.scratch/distributed-gguf-runtime/issues/028-implement-numbered-patch-stack-apply-and-verification.md`, and evidence READMEs for dependencies (DGR-027) before changing code. Inspect live source/tests rather than trusting legacy pass states. Objective: Maintain a minimal auditable llama.cpp delta with one numbered patch per concern. ## Acceptance criteria - [x] Add deterministic apply/check/reverse verification against the exact manifest pin. - [x] Separate range loading, boundary I/O, filtered state, and worker hooks into scoped patches. - [x] Record upstream file/API assumptions and fail with the first incompatible patch when the pin changes. - [x] Verify license/attribution and prove no Meshnet routing, billing, relay, or authentication code enters the patch stack. - [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 - Targeted deterministic tests pass; Python changes also pass `python -m compileall packages tests`. - `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. ## Evidence handoff Verified evidence: `.scratch/distributed-gguf-runtime/evidence/DGR-028/README.md`. Legacy evidence remains provenance only and grants no implementation completion credit. <!-- ralph-story-id: DGR-028 -->
popov added this to the M1 milestone 2026-07-16 20:36:02 +00:00
Collaborator

Dependency DGR-027 / #11 is now completed at f83cf33. Controller verification against the exact pinned llama.cpp checkout found the pre-existing packages/node/native/llama/patches/0002-dense-llama-owned-range-loader.patch malformed: git apply --check reports corrupt patch ... line 26. DGR-028 should repair/re-materialize the numbered patch against commit e920c523e3b8a0163fe498af5bf90df35ff51d25, then prove clean apply, patched-tree identity, reverse-check, and applicable native gates. This is the story’s concrete first task, not an external blocker.

Dependency DGR-027 / #11 is now completed at `f83cf33`. Controller verification against the exact pinned llama.cpp checkout found the pre-existing `packages/node/native/llama/patches/0002-dense-llama-owned-range-loader.patch` malformed: `git apply --check` reports `corrupt patch ... line 26`. DGR-028 should repair/re-materialize the numbered patch against commit `e920c523e3b8a0163fe498af5bf90df35ff51d25`, then prove clean apply, patched-tree identity, reverse-check, and applicable native gates. This is the story’s concrete first task, not an external blocker.
deploy added status:ready and removed status:blocked labels 2026-07-17 13:26:02 +00:00
popov added status:in-progress and removed status:ready labels 2026-07-18 12:11:42 +00:00
Author
Owner

Restart reconciliation: issue remains claimed as status:in-progress for the fixed Kimi K3 lane at integration HEAD 902ecde. Kimi Ralph preflight is healthy. Scope is DGR-028 only; dependencies and file-scope disjointness were rechecked before launch.

Restart reconciliation: issue remains claimed as `status:in-progress` for the fixed Kimi K3 lane at integration HEAD `902ecde`. Kimi Ralph preflight is healthy. Scope is DGR-028 only; dependencies and file-scope disjointness were rechecked before launch.
Author
Owner

Provider interruption after restart reconciliation: Kimi K3 returned an authoritative HTTP 403 billing-cycle usage limit before the continuation session initialized. The fixed Kimi worktree preserves the uncommitted DGR-028 partial patch-stack repair; nothing was reset or discarded. Claim released to status:ready because no worker is active. No reset timestamp was provided by Kimi, so none is inferred.

Provider interruption after restart reconciliation: Kimi K3 returned an authoritative HTTP 403 billing-cycle usage limit before the continuation session initialized. The fixed Kimi worktree preserves the uncommitted DGR-028 partial patch-stack repair; nothing was reset or discarded. Claim released to `status:ready` because no worker is active. No reset timestamp was provided by Kimi, so none is inferred.
popov added status:ready and removed status:in-progress labels 2026-07-18 12:55:40 +00:00
popov added status:in-progress and removed status:ready labels 2026-07-18 13:19:28 +00:00
Author
Owner

Policy audit: Kimi hit an authoritative billing-cycle usage-limit 403 before continuation, and the dirty upstream patch-stack repair remains independently unreviewed. Released to status:ready while preserving the detached worktree; no completion or integration credit is granted.

Policy audit: Kimi hit an authoritative billing-cycle usage-limit 403 before continuation, and the dirty upstream patch-stack repair remains independently unreviewed. Released to status:ready while preserving the detached worktree; no completion or integration credit is granted.
popov added status:ready and removed status:in-progress labels 2026-07-18 21:23:21 +00:00
Author
Owner

Policy audit: Kimi hit an authoritative billing-cycle usage-limit 403 before continuation, and the dirty upstream patch-stack repair remains independently unreviewed. Status remains ready; the detached worktree is preserved and no completion or integration credit is granted.

Policy audit: Kimi hit an authoritative billing-cycle usage-limit 403 before continuation, and the dirty upstream patch-stack repair remains independently unreviewed. Status remains ready; the detached worktree is preserved and no completion or integration credit is granted.
Author
Owner

REAL-IMPLEMENTATION CONTINUATION (2026-07-19): the durable workers are now executing repair/verify passes under the hard no-fake/stub/synthetic policy. Fake/in-memory artifacts are being removed and replaced with real generated-gRPC / upstream-patch / runtime-identity behavior. No completion credit is granted until independent review and integrated-branch gates pass.

REAL-IMPLEMENTATION CONTINUATION (2026-07-19): the durable workers are now executing repair/verify passes under the hard no-fake/stub/synthetic policy. Fake/in-memory artifacts are being removed and replaced with real generated-gRPC / upstream-patch / runtime-identity behavior. No completion credit is granted until independent review and integrated-branch gates pass.
popov closed this issue 2026-07-22 06:44:24 +00:00
popov added status:completed and removed status:ready labels 2026-07-22 06:44:24 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: popov/neuron-tai#12