chore: resync with upstream zblanco/runic PR #9 (snapshot checkpoint policy)#2
Open
ty13r wants to merge 4 commits into
Open
chore: resync with upstream zblanco/runic PR #9 (snapshot checkpoint policy)#2ty13r wants to merge 4 commits into
ty13r wants to merge 4 commits into
Conversation
Resume workflows from cursor-aware snapshots
…kpoint policy) Integrates upstream PR zblanco#9 'Resume workflows from cursor-aware snapshots' into The-Metagraph/runic fork. Our fork main (0507e11) was a strict ancestor of upstream main, so this is a clean fast-forward integration with zero conflicts. PR zblanco#9 commits: - 978d0d7 feat: resume workflows from cursor-aware snapshots - e0561f6 use stream/3 with opts instead of stream_after/2 for extensibility Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resyncs
The-Metagraph/runicwith upstreamzblanco/runicPR zblanco#9 ("Resume workflows from cursor-aware snapshots" / Snapshot Checkpoint Policy).Our fork
main(0507e11) was a strict ancestor of upstreammain(75ed26f) — fork main is byte-identical to upstream's PR zblanco#8 state, with zero fork-local commits onmain. The resync is therefore a clean fast-forward integration with no conflicts; the merge brought in exactly PR zblanco#9's+841/-24.Commits integrated (PR zblanco#9)
978d0d7feat: resume workflows from cursor-aware snapshotse0561f6usestream/3with opts instead ofstream_after/2for extensibility75ed26fMerge pull request Resume workflows from cursor-aware snapshots zblanco/runic#9 (upstream merge commit)Files
lib/runic/runner.ex(+122/-23) —resume/3now consumes snapshots:supports_snapshots?/1+supports_stream_options?/1gate a snapshot+tail path (load_snapshot/2→stream/3 after_cursor:), with full-stream fallback. Addsencode_snapshot/1+decode_snapshot/1(tagged:runic_workflow_snapshotv1).lib/runic/runner/store.ex(+43/-1) — optionalsave_snapshot/4+load_snapshot/2callbacks,stream/3callback, andsupports_snapshots?/1/supports_stream_options?/1capability predicates.test/runner/worker_test.exs(+110),test/support/snapshot_tail_store.ex(+129),test/support/snapshot_store_without_tail.ex(+115) — exercise both resume branches..docs/snapshot-checkpoint-policy-implementation-plan.md(+322) — design doc.Reconciliation note
No
runner.exreconcile was required — our fork had no Phase-40 customizations onmain(verified:git grepfor phase/metagraph/ariston markers returns nothing;runner.exon fork main == upstream pre-zblanco#9 byte-for-byte). The Metagraph-specific PostgresRunner.Storelives in ariston-ui, not in this fork. The pre-zblanco#9 fork-side branchclaude/s3-4-inline-durable-emit(404bfdd) is already superseded by what landed onmainas PR zblanco#8.Verification (fork only)
mix deps.getOKmix compileOK (exit 0)mix test: 1333 tests + 55 doctests, 0 failures, 13 skippedtest/runner/worker_test.exs(incl. PR Resume workflows from cursor-aware snapshots zblanco/runic#9 resume-from-snapshot cases): 40 tests, 0 failuresToolchain: Elixir 1.19.5 / OTP 28 (matches fork's PR zblanco#7 "update for 1.19.5").
PR zblanco#9 implements only the read / resume side of the snapshot policy plus the Store behaviour callbacks and
encode/decode_snapshot. The auto-writing Worker:snapshot_strategyoption (:never/:on_complete/:every_checkpoint/{:every_n_checkpoints,n}/{:after_events,n}) is documented as a "Draft follow-up" in the.docsplan and is NOT implemented —worker.exis untouched by this PR and contains nosnapshot_strategy/maybe_snapshot/save_snapshotcall. So no Worker auto-snapshot behavior changes; default behavior is unchanged regardless.Downstream (ariston-ui) follow-up — snapshot path is partially inert
ariston-ui's
AristonUi.Projects.Workflows.RunnerStore.Postgresalready implementssave_snapshot/4+load_snapshot/2→supports_snapshots?/1is true. However it implements onlystream/2(nostream/3), sosupports_stream_options?/1is false. Under PR zblanco#9,resume/3therefore takes the safe full-stream fallback (resume_from_full_stream→stream/2), not the snapshot-accelerated tail path. This is correct and lossless (the store'sstream_from_latest_snapshot?defaults tofalse, returning the full log from seq 0).Notably, PR zblanco#9 is the upstream change the Postgres store's own comment (lines 21-32, "Opus #585") anticipated — "Default flips back to true once upstream Runic wires
load_snapshotinto resume." To actually realize snapshot acceleration in ariston, a follow-up should addstream/3 after_cursor:to the Postgres store and re-evaluate thestream_from_latest_snapshot?default. Tracked separately; out of scope for this resync.Not merged / deferred
TheMetagraph/runicwas NOT touched (concurrent ariston agents path-dep it). All git work was done in a separate clone.Worth upstreaming to zblanco/runic?
Nothing fork-specific to upstream — this is a pure pull-through. The only forward-looking note for upstream is that the Worker
:snapshot_strategywrite-side policy (their own.docsfollow-up) remains unimplemented; that's zblanco's roadmap item, not ours.🤖 Generated with Claude Code