Skip to content

fix(mothership): cut oversized run errors after projection and collapse long block runs - #10150

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/run-result-error-cap
Nov 18, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/run-result-error-cap

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #10147, which held run_* results to the agent's 16K window but never cut error strings.

  • a failed block's entry no longer repeats the run error word for word; it keeps its name and status and says …[same as the run error]
  • errors (the run error, data.error, per-block error) over 1,500 chars keep their head plus a logs get <id> --trace pointer. While a secret is active the text is projected first and the projection is cut, so a cut can only fall inside a {{NAME}}, never a secret
  • a long run of block entries (loop iterations) keeps every failed entry and five at each end, with a marker per gap naming how many were omitted
  • order of loss: dedupe, block inputs/outputs, error cuts, entry collapse, final output preview
  • boundRunResultForModel now returns { data, error } so both callers send the bounded error

Type of Change

  • Bug fix

Testing

  • run-workflow-result-budget.test.ts: new cases for a 30K HTML block error with a secret straddling the cut, and a 400-iteration loop with one failure; updated the dedupe and error-cap expectations. The new and updated cases fail on the previous head
  • bun run --cwd apps/sim test lib/mothership/tools lib/mothership/request/tools (929 tests); type-check via the pre-push hook

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 5:19am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

This PR keeps oversized workflow results easier for the agent to read by shortening errors and collapsing long block histories.

  • Workflow results trim long errors and loop logs before sending them to the agent.

No actionable issues found.

Reviews (1) · Last reviewed commit: "fix(mothership): cut oversized run error..." · Reviewed by Greptile

@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 4 files

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

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 4b78690 into staging Nov 18, 2026
81 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/run-result-error-cap branch November 18, 2026 05:58

This branch was previously deployed

1 inactive deployment
Preview — 14aebb4f 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