refactor(dfir_lang): remove stratum, add push codegen, test reduce, reduce_keyed, reduce_no_replay#2966
Open
MingweiSamuel wants to merge 1 commit into
Open
refactor(dfir_lang): remove stratum, add push codegen, test reduce, reduce_keyed, reduce_no_replay#2966MingweiSamuel wants to merge 1 commit into
reduce, reduce_keyed, reduce_no_replay#2966MingweiSamuel wants to merge 1 commit into
Conversation
Deploying hydro with
|
| Latest commit: |
8a2b324
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://80ebb3ea.hydroflow.pages.dev |
| Branch Preview URL: | https://mingwei-newpush-reduce.hydroflow.pages.dev |
MingweiSamuel
added a commit
that referenced
this pull request
Jun 19, 2026
… `reduce_keyed`, `reduce_no_replay` PR: #2966
909fde1 to
ecf3876
Compare
93d6298 to
a23896f
Compare
ecf3876 to
f810461
Compare
d8a1f65 to
870055e
Compare
f810461 to
571efde
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Refactors dfir_lang reduce-family operators to remove stratum-based delay typing and adds push-side codegen paths, with new/updated tests to validate push behavior (including no-replay semantics).
Changes:
- Add push-side surface tests for
reduce,reduce_keyed, andreduce_no_replay. - Update
reduce,reduce_keyed, andreduce_no_replayoperator codegen to support push outputs and removeDelayType::Stratum. - Refresh compile-fail
.stderrexpectations forreduce_keyedbad-type cases.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dfir_rs/tests/surface_push_blocking.rs | Adds new push-side tests for reduce, reduce_keyed, and reduce_no_replay. |
| dfir_rs/tests/compile-fail/stable/surface_reduce_keyed_badtype_option.stderr | Updates expected compiler output for keyed-reduce bad option input. |
| dfir_rs/tests/compile-fail/stable/surface_reduce_keyed_badtype_int.stderr | Updates expected compiler output for keyed-reduce bad int input. |
| dfir_lang/src/graph/ops/reduce_no_replay.rs | Removes stratum delay typing and adds push codegen that attempts “no replay” gating. |
| dfir_lang/src/graph/ops/reduce_keyed.rs | Removes stratum delay typing and adds push codegen path for keyed reduce. |
| dfir_lang/src/graph/ops/reduce.rs | Removes stratum delay typing and adds push codegen that forwards output when downstream exists. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+119
to
+128
| let write_iterator = if !is_pull { | ||
| let output = &outputs[0]; | ||
| quote_spanned! {op_span=> | ||
| let #ident = #root::dfir_pipes::push::ReduceKeyed::new( | ||
| &mut #singleton_output_ident, | ||
| #aggfn, | ||
| #output, | ||
| ); | ||
| } | ||
| } else { |
Comment on lines
+125
to
+144
| let #was_updated_ident = ::std::cell::Cell::new(false); | ||
| let #ident = #root::dfir_pipes::push::reduce_ref( | ||
| &mut #singleton_output_ident, | ||
| |#accumulator_ident: &mut _, #item_ident| { | ||
| #was_updated_ident.set(true); | ||
| #[allow(clippy::redundant_closure_call)] | ||
| (#func)(#accumulator_ident, #item_ident); | ||
| }, | ||
| #root::dfir_pipes::push::filter( | ||
| { | ||
| let __was_updated = &#was_updated_ident; | ||
| let __context: &_ = #context; | ||
| move |_| __was_updated.get() || __context.current_tick().0 == 0 | ||
| }, | ||
| #root::dfir_pipes::push::map( | ||
| |__val: &mut _| ::std::clone::Clone::clone(&*__val), | ||
| #output, | ||
| ), | ||
| ), | ||
| ); |
571efde to
36df39f
Compare
e565624 to
c8d8e3a
Compare
18965f1 to
d0bf7c3
Compare
c8d8e3a to
bc727b8
Compare
… `reduce_keyed`, `reduce_no_replay` PR: #2966
bc727b8 to
8a2b324
Compare
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.
No description provided.