Skip to content

improvement(mothership): keep workflow test-run results inside the agent window - #10147

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/run-result-compact-summary
Nov 18, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/run-result-compact-summary

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • run_workflow / run_block / run_from_block / run_workflow_until_block results are now held to 16K chars before they reach the agent. Echoed block inputs and outputs give way to logs get <id> --trace pointers, largest first, so pass/fail, the failing block's error, and each block's name/status stay inline instead of the whole result spilling behind a paged read
  • if that is not enough, the final output is cut to a 4K-char JSON preview with a pointer (or a pointer only while a secret is active, since a prefix could split a secret)
  • selected values are untouched; the existing projection-cap bounding still runs first for secret-walked results
  • v2 execute and resume responses (what sim workflows run prints) now list error, timings and executionTimeoutSeconds before output/blockOutputs, matching runs get, so a reader that keeps only the head of a large run still sees why it failed. Same fields, only key order changed

Type of Change

  • Improvement

Testing

  • run-workflow-result-budget.test.ts: new/rewritten cases for fitting a failed run in the window, previewing an oversized output without a secret, and a secret-length-independent pointer with one. All four fail on the pre-change code
  • execute route.test.ts: asserts error and durationMs precede output; fails on the old key order
  • bun run --cwd apps/sim test app/api/v2/workflows/ lib/mothership/tools lib/mothership/request/tools (80 files, 1096 tests); biome on changed files. Full type-check/audits left to CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 18, 2026 4:43am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The follow-up changes appear safe to merge.

Summary

Keeps workflow test-run results inside the agent window by replacing bulky echoed data with log pointers and shortening large final outputs.

  • Workflow test-run results keep key details inline when outputs are large.
  • V2 run responses put errors and timings before large outputs.

No new actionable issues found in the follow-up changes.

Reviews (2) · Last reviewed commit: "fix(mothership): measure the run result ..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 00d21c3 into staging Nov 18, 2026
81 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/run-result-compact-summary branch November 18, 2026 05:13

This branch was previously deployed

1 inactive deployment
Preview — a415745e Deployed Nov 18, 2026 by vercel[bot]
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.

1 participant