Skip to content

WarpTickPatchV1 delta patches + commit hash v2 #149

Description

@flyingrobots

Delta Tick Patches (WarpTickPatchV1) + Commit Hash v2 (Paper III boundary semantics)

Goal

  • Implement Paper III-style boundary artefacts: a per-tick delta patch (not recipe) that is replayable without search.
  • Move commit hashing to v2 so commit_id commits ONLY to the replayable delta (patch_digest), not to planner/scheduler narration.

Decisions (locked)

  1. Patch stores unversioned slots only.
    • WarpTickPatchV1 includes in_slots/out_slots as sets of SlotId.
    • ValueVersionId := (slot_id, tick_index) is derived by interpretation along a worldline (position in payload P), not stored.
  2. Commit hash v2 commits to patch_digest ONLY.
    • v2 commit header commits to parents + state_root + patch_digest (+ policy_id/version tags).
    • plan_digest / decision_digest / rewrites_digest / receipts / applied_rewrites are diagnostics only.

Implementation outline

  • Add WarpTickPatchV1 + WarpOp minimal set to warp-core (delta ops + canonical encoding + patch_digest).
  • Generate delta ops by deterministic diff of GraphStore pre/post commit (v0 correctness first).
  • Conservative in/out derivation (over-approx OK; under-approx forbidden).
  • Update Snapshot to carry patch_digest and compute commit_id v2.
  • Update docs/spec-merkle-commit.md with v2 header + new patch digest spec doc.
  • Add tests: determinism across engines; replay patch reproduces state_root; slice extraction for a selected slot returns minimal tick subset.

Exit criteria

  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings -D missing_docs
  • New spec doc(s) in docs/ and decision log entry recorded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions