Skip to content

Conversation

@yrobla
Copy link
Contributor

@yrobla yrobla commented Nov 17, 2025

Successfully implemented the ExpandOutputFormat() method in the template expander to support
output aggregation for multi-step vMCP composite tool workflows.

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 81.53846% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.90%. Comparing base (b2e7e32) to head (c728558).

Files with missing lines Patch % Lines
pkg/vmcp/composer/workflow_engine.go 66.66% 8 Missing and 2 partials ⚠️
pkg/vmcp/composer/template_expander.go 94.28% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                         Coverage Diff                         @@
##           feat/vmcp_composition_multistep    #2611      +/-   ##
===================================================================
+ Coverage                            55.84%   55.90%   +0.05%     
===================================================================
  Files                                  312      312              
  Lines                                29542    29600      +58     
===================================================================
+ Hits                                 16499    16549      +50     
- Misses                               11601    11608       +7     
- Partials                              1442     1443       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yrobla yrobla force-pushed the feat/vmcp_composition_multistep_2 branch from 4a28565 to df828cc Compare November 17, 2025 15:11
@yrobla yrobla changed the base branch from main to feat/vmcp_composition_multistep November 17, 2025 15:21
@yrobla yrobla requested a review from Copilot November 17, 2025 15:22
Copilot finished reviewing on behalf of yrobla November 17, 2025 15:26
Copy link
Contributor

Copilot AI left a comment

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 implements the ExpandOutputFormat() method in the template expander to enable output aggregation for multi-step vMCP composite tool workflows. The enhancement allows workflow outputs to be formatted using Go templates with access to step results, workflow metadata, and input parameters.

  • Adds ExpandOutputFormat() method to TemplateExpander interface with comprehensive documentation
  • Implements template expansion with JSON validation and size limits (10MB)
  • Includes helper method buildWorkflowMetadata() to provide workflow metrics in templates

Reviewed Changes

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

File Description
pkg/vmcp/composer/composer.go Adds ExpandOutputFormat() method to TemplateExpander interface with documentation of available template variables
pkg/vmcp/composer/template_expander.go Implements ExpandOutputFormat() and buildWorkflowMetadata() with context cancellation checks, size limits, and JSON validation
pkg/vmcp/composer/template_expander_test.go Adds comprehensive test coverage including edge cases for invalid templates, size limits, context cancellation, and various template patterns

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

Successfully implemented the ExpandOutputFormat() method in
the template expander to support output aggregation for
multi-step vMCP composite tool workflows.
Also integrate with the workflow
@yrobla yrobla force-pushed the feat/vmcp_composition_multistep_2 branch from df828cc to 5e19d8e Compare November 17, 2025 15:35
@yrobla yrobla requested a review from Copilot November 17, 2025 15:41
Copilot finished reviewing on behalf of yrobla November 17, 2025 15:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

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


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

@yrobla yrobla requested a review from Copilot November 17, 2025 16:14
Copilot finished reviewing on behalf of yrobla November 17, 2025 16:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

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


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

// Save timeout state
if e.stateStore != nil {
finalState := e.buildWorkflowStatus(workflowCtx, WorkflowStatusTimedOut)
finalState.StartTime = result.StartTime
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

Missing LastUpdateTime assignment for consistency. The timeout case should also set finalState.LastUpdateTime = result.EndTime (after line 178) to match the pattern established in the failure cases at lines 198 and 232.

Suggested change
finalState.StartTime = result.StartTime
finalState.StartTime = result.StartTime
finalState.LastUpdateTime = result.EndTime

Copilot uses AI. Check for mistakes.
// Save final workflow state
if e.stateStore != nil {
finalState := e.buildWorkflowStatus(workflowCtx, WorkflowStatusCompleted)
finalState.StartTime = result.StartTime
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

Missing LastUpdateTime assignment for consistency. The successful completion case should also set finalState.LastUpdateTime = result.EndTime (after line 249) to match the pattern established in the failure cases at lines 198 and 232.

Suggested change
finalState.StartTime = result.StartTime
finalState.StartTime = result.StartTime
finalState.LastUpdateTime = result.EndTime

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@tgrunnagle tgrunnagle left a comment

Choose a reason for hiding this comment

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

Looks good! Approving in case you don't want to add the LastUpdateTime changes to this PR.

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.

4 participants