mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2015] [CLOSED] Draft: immutable branching contexts with serialized execution and shared checkpoints #3807
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3807
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2015
Author: @CC-David-CC
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:feat/immutable-branching-upstream📝 Commits (10+)
ee96335Add immutable branching context foundation on upstream mained5c455Port optional-draft cold snapshots to current main6dd5f9dRecord bounded CUDA validation and issue scope for the upstream draft15fb044Add resumable Luna branching-context handoff harness6e651a1Preserve Luna checkpoint and host-buffer implementation work3f77d95Repair idle feeds and host view lifetime with executed regression evidenceb6dc6fcRepair native cache admission and validate exact consumed-history lookup0b96187Preserve canonical input identity through cold-to-hot checkpoint restoree10e78eImplement native RAM-cache capture and exact consumed-frontier restore8aa223aRoute canonical cache misses through native RAM and replace duplicate checkpoints📊 Changes
172 files changed (+42787 additions, -67 deletions)
View changed files
📝
CMakeLists.txt(+60 -0)➕
experimental/branching_context/.gitattributes(+2 -0)➕
experimental/branching_context/.gitignore(+4 -0)➕
experimental/branching_context/AGENTS.md(+58 -0)➕
experimental/branching_context/README.md(+185 -0)➕
experimental/branching_context/docs/acceptance.json(+517 -0)➕
experimental/branching_context/docs/architecture.md(+96 -0)➕
experimental/branching_context/docs/backend-adapter.md(+65 -0)➕
experimental/branching_context/docs/certification.md(+81 -0)➕
experimental/branching_context/docs/locked-references.json(+7 -0)➕
experimental/branching_context/docs/test-matrix.md(+133 -0)➕
experimental/branching_context/evidence/DECISIONS.md(+356 -0)➕
experimental/branching_context/evidence/STATUS.md(+432 -0)➕
experimental/branching_context/evidence/automatic-ram-validation.json(+810 -0)➕
experimental/branching_context/evidence/cold-identity-validation.json(+442 -0)➕
experimental/branching_context/evidence/current-native-validation.json(+76 -0)➕
experimental/branching_context/evidence/dispatch-correction-validation.json(+2242 -0)➕
experimental/branching_context/evidence/draft-data/fresh-forwards.json(+246 -0)➕
experimental/branching_context/evidence/draft-data/measurements.jsonl(+49 -0)➕
experimental/branching_context/evidence/draft-data/native.jsonl(+330 -0)...and 80 more files
📄 Description
Branch from a consumed prefix, advance independent futures, and rewind movable branch references without changing canonical history. Optional CUDA and host-RAM checkpoints accelerate replay; complete checkpoint eviction preserves the history needed to rebuild.
This is a foundation for #1938 and #1962, not a claim that either request is complete.
Current prototype
Corrected validation
Linux, RTX 4090, Qwen3.8-Flash-Next Q8_0 weights, FP16 KV:
Both private drivers previously omitted resident expert contributions because they did not bind the expert dispatch plan. The fix corrects both drivers. Earlier branch/oracle agreement shared that defect and does not establish ordinary-model correctness. The controlled regression failed before the fix (maximum error 1.1226537227630615) and passed exactly afterward. No tolerance or reference equation was relaxed. Actual PCIe expert execution was not exercised by this fixture.
Executed evidence and fingerprints
Help wanted: batched-prefill equivalence
The immediate priority is a reliable one-request-at-a-time prototype. Batched execution is not required for that milestone, but ordinary batched-prefill equivalence must be resolved before claiming general serving-path parity.
Help tracing differences between ordinary prefill chunks and the pinned token-level operator is welcome, especially expert dispatch, placement and accumulation order. Full diagnostic vectors and work counts were preserved; the historical maximum 1.5612177848815918 is an absolute logit difference, not a percentage or an accepted tolerance. The dispatch fix establishes the one-token control, not multi-token equivalence.
Preserved prefill diagnosis
Remaining scope
Draft validation only. The current numerical profile is unqualified and no cumulative G1-G5 PASS is claimed. Full current-build suites, crash/OOM campaigns, evaluation/adoption workflow, release hardening, performance qualification and conversation-server integration remain. The unchanged native conversation snapshot test still fails its same-address growth expectation. HIP/SYCL builds, native Windows persistence and image inputs are unvalidated or unsupported.
The feature remains experimental and opt-in. Default serving-path parity has not been fully established. The Python store currently requires POSIX fcntl.
Build, usage and limitations
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.