Skip to content

refactor(dfir_lang): remove stratum, add push codegen, test fold, fold_keyed, fold_no_replay#2965

Merged
MingweiSamuel merged 1 commit into
mainfrom
mingwei/newpush-fold
Jun 24, 2026
Merged

refactor(dfir_lang): remove stratum, add push codegen, test fold, fold_keyed, fold_no_replay#2965
MingweiSamuel merged 1 commit into
mainfrom
mingwei/newpush-fold

Conversation

@MingweiSamuel

@MingweiSamuel MingweiSamuel commented Jun 19, 2026

Copy link
Copy Markdown
Member

No description provided.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploying hydro with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9868d54
Status:⚡️  Build in progress...

View logs

@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-fold branch from 909fde1 to ecf3876 Compare June 19, 2026 20:31
@MingweiSamuel MingweiSamuel changed the base branch from mingwei/derive-persistence to main June 19, 2026 20:31
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-fold branch 2 times, most recently from f810461 to 571efde Compare June 19, 2026 21:02
@MingweiSamuel MingweiSamuel marked this pull request as ready for review June 19, 2026 21:35
@MingweiSamuel MingweiSamuel requested review from a team and Copilot June 19, 2026 21:35
@MingweiSamuel

Copy link
Copy Markdown
Member Author

Diff view: 571efde

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors DFIR language/codegen and pipes to support push-side codegen for blocking/stateful operators (notably fold, fold_keyed, and fold_no_replay), removing the prior stratum-based scheduling requirement and adding new push-side combinators plus tests to validate behavior.

Changes:

  • Add unified push-side accumulator infrastructure (Accumulate + AccumState) and new push combinators (Sort, FoldKeyed, ReduceKeyed), then wire DFIR codegen to use them for push-side fold* operators.
  • Update/extend tests to cover push-side blocking behavior and adjust existing metrics expectations.
  • Minor utility/API improvements (extra derives) and CI/precheck target updates.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
precheck.bash Adds hydro_test_embedded to the hydro test targets run by precheck.
dfir_rs/tests/surface_push_blocking.rs New tests ensuring fold, fold_keyed, and fold_no_replay behave correctly when they end up on the push side of a subgraph.
dfir_rs/tests/metrics.rs Updates the handoff-metrics test pipeline and expected output.
dfir_rs/tests/compile-fail/stable/surface_fold_keyed_generics_bad.stderr Updates expected compiler stderr output for trybuild tests.
dfir_rs/tests/compile-fail/stable/surface_fold_keyed_badtype_option.stderr Updates expected compiler stderr output for trybuild tests.
dfir_rs/tests/compile-fail/stable/surface_fold_keyed_badtype_int.stderr Updates expected compiler stderr output for trybuild tests.
dfir_rs/tests/compile-fail/stable/surface_demuxenum_wrongfields_2.stderr Updates expected compiler stderr output for trybuild tests.
dfir_rs/tests/compile-fail/stable/surface_demuxenum_wrongfields_1.stderr Updates expected compiler stderr output for trybuild tests.
dfir_rs/tests/compile-fail/stable/surface_demuxenum_wrongenum.stderr Updates expected compiler stderr output for trybuild tests.
dfir_rs/src/util/sparse_vec.rs Adds Clone/Debug derives for SparseVec.
dfir_rs/src/util/mod.rs Adds common derives for Persistence and PersistenceKeyed.
dfir_pipes/src/push/sort.rs Introduces a push-side Sort combinator with backpressure-aware finalize draining.
dfir_pipes/src/push/reduce_keyed.rs Introduces a push-side ReduceKeyed combinator that flushes reduced (K,V) pairs on finalize.
dfir_pipes/src/push/mod.rs Registers new push modules/re-exports and adds constructors for fold/reduce/accumulate/sort.
dfir_pipes/src/push/fold_keyed.rs Introduces a push-side FoldKeyed combinator that flushes (K, Acc) pairs on finalize.
dfir_pipes/src/push/accumulate.rs Adds the unified Accumulate push combinator and AccumState trait.
dfir_pipes/src/push/accum_state.rs Adds AccumState implementations for fold/reduce/sort patterns.
dfir_lang/src/graph/ops/fold.rs Removes stratum delay and adds push-side codegen path using the new push accumulator infrastructure.
dfir_lang/src/graph/ops/fold_no_replay.rs Removes stratum delay and adds push-side codegen path for no-replay semantics.
dfir_lang/src/graph/ops/fold_keyed.rs Removes stratum delay and adds push-side codegen path using the new FoldKeyed push combinator.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dfir_lang/src/graph/ops/fold_no_replay.rs
Comment thread dfir_pipes/src/push/accumulate.rs
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-fold branch 4 times, most recently from d0bf7c3 to 618e6fc Compare June 22, 2026 16:49
@MingweiSamuel MingweiSamuel changed the base branch from main to mingwei/derive-persistence June 22, 2026 21:40
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-fold branch 2 times, most recently from 8614b49 to 23dee17 Compare June 22, 2026 21:40

@shadaj shadaj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed fold first, but this seems almost identical, so LGTM!

@MingweiSamuel MingweiSamuel force-pushed the mingwei/derive-persistence branch from ed3848a to 6f04df0 Compare June 24, 2026 02:55
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-fold branch from 23dee17 to 5972d6b Compare June 24, 2026 02:55
Base automatically changed from mingwei/derive-persistence to main June 24, 2026 02:56
…fold_keyed`, `fold_no_replay`

all push ops

PR: #2965
@MingweiSamuel MingweiSamuel force-pushed the mingwei/newpush-fold branch from 5972d6b to 9868d54 Compare June 24, 2026 02:56
@MingweiSamuel MingweiSamuel merged commit 7321ac2 into main Jun 24, 2026
6 of 7 checks passed
@MingweiSamuel MingweiSamuel deleted the mingwei/newpush-fold branch June 24, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants