test(execute): cover input_set_ids merge edge cases for full pipeline inputs#576
Draft
cursor[bot] wants to merge 2 commits into
Draft
test(execute): cover input_set_ids merge edge cases for full pipeline inputs#576cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Running a pipeline via harness_execute with input_set_ids plus a full pipeline document in `inputs` (either a YAML string or an object with a top-level `pipeline` key) silently dropped the input set: the materialization guard only admitted empty or flat key/value inputs, so these fell through to the `inputSetIdentifiers` query param, which pipeline execute ignores. The run proceeded without the input set applied. Broaden the guard to also handle full-pipeline inputs, and merge the materialized input set as the base with the caller's document as the override (caller wins per variable / stage), sending the result as the YAML execute body — the same mechanism the working UI path uses. Adds tests for both the YAML-string and object input forms. Note: pipeline_v1 still accepts input_set_ids in the shared schema without forwarding them; left as-is pending confirmation of the v1 execute API's input-set contract. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> AI-Session-Id: b8e26a07-057c-406c-bfde-245eb0c917ae AI-Tool: claude-code AI-Model: unknown
… inputs Add regression tests for stage-level variable merging, multiple input set ordering, bare YAML fragments, and input set load failures when callers pass full pipeline documents alongside input_set_ids. Complements fix in PR #575 by exercising mergeRuntimePipelineFragments paths that were previously untested at the harness_execute integration layer. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.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.
Description
Adds regression tests for the
harness_executepipeline run path introduced in #575, whereinput_set_idsmust be merged into the request body when callers pass full pipeline YAML (string or object) asinputs.Risky behavior now covered
input_set_ids+ full pipeline override: later input sets override earlier ones, then callerinputsoverride the merged base.inputSetIdentifiersquery param.pipeline:wrapper):extractPipelineFragmentunwraps correctly before merge.mergeRuntimePipelineFragments: both base and override variables appear in the merged body.Test files added/updated
tests/tools/tool-handlers.test.ts— 4 newharness_executeintegration teststests/utils/materialize-input-sets.test.ts— 1 new unit test for disjoint variable mergeWhy these tests materially reduce regression risk
PR #575 added two happy-path tests (string and object full pipeline inputs). The new paths exercise stage merging, multi-set ordering, error handling, and bare-fragment parsing — all areas with non-trivial logic in
mergeRuntimePipelineFragments/extractPipelineFragmentthat previously had no integration coverage. A regression would cause input sets to be dropped at execution time without obvious client-side errors.Type of Change
Checklist
pnpm testpasses (156 tests in touched files)pnpm typecheckpassespnpm buildpassespnpm standards:checkpassespnpm docs:checkpasses