fix(kernel): scope collect step to preceding fan-out outputs - #1277
Open
andyst-dev wants to merge 1 commit into
Open
fix(kernel): scope collect step to preceding fan-out outputs#1277andyst-dev wants to merge 1 commit into
andyst-dev wants to merge 1 commit into
Conversation
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.
Fixes #1253
Summary
The
collectstep joins the whole run-wideall_outputsbuffer instead of only the outputs of the immediately preceding fan-out group. A workflow shapedsequential → fan_out → fan_out → collecttherefore feeds the earlier sequential step's output into the collected payload, and multi-phase workflows keep carrying stale pre-fan-out context across later collect steps.docs/workflows.mdspecifies: "Thecollectstep gathers all outputs from the preceding fan-out group" — the implementation did not match that contract.Changes
execute_runnow keeps afan_out_startmarker, reset toall_outputs.len()at the beginning of each fan-out group.collectstep joinsall_outputs[fan_out_start..]instead of the full buffer, so it merges only the outputs produced by the immediately preceding fan-out group.sequential → fan_out → fan_out → collect, asserting the collected payload contains both branch outputs and not the earlier sequential output.Behavior for workflows without a preceding fan-out group is unchanged (the marker defaults to the start of the buffer).
Testing
cargo test -p openfang-kernel— all tests pass (workflow tests: 18 passed)cargo fmt -p openfang-kernel -- --check— cleancargo clippy -p openfang-kernel --all-targets -- -D warnings— only a pre-existingclippy::question_markwarning incrates/openfang-channels/src/feishu.rs:1052, present onmainand unrelated to this change; the changed file produces no warningsSecurity