Skip to content

fix(http): keep unwrapping legacy success envelopes for existing workflows - #9909

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/http-legacy-envelope-compat
Nov 11, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/http-legacy-envelope-compat

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Type of Change

  • Bug fix

Testing

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)

…flows

#9889 fixed JSend-style 200s ({status, data}) being reported as failures by
deleting the old /api/proxy envelope branch outright. That also changed two
behaviors existing workflows rely on: 200 bodies with success/status/data were
unwrapped (<api.data.x> read the inner data) and success: false failed the
block. Restore both through one shared toHttpToolResponse helper, gated on the
body carrying a success field — the only shape the old route ever produced —
so only the misclassified case changes. Non-string envelope errors are now
serialized instead of surfacing as [object Object].
@vercel

vercel Bot commented Nov 11, 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 11, 2026 10:42pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Restores legacy response unwrapping for HTTP and webhook calls while keeping JSend-style bodies intact.

  • HTTP and webhook calls keep reading legacy success envelopes as before.

waleedlatif1 explicitly describes replacing HTTP fields with legacy envelope fields as intentional compatibility behavior.

Reviews (1) · Last reviewed commit: "fix(http): keep unwrapping legacy succes..." · 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.

1 issue found across 5 files

Confidence score: 3/5

  • apps/sim/tools/http/utils.ts can treat a legacy response with success: "false" as a successful tool call. Require body.success to be a boolean before unwrapping the envelope.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/tools/http/utils.ts">

<violation number="1" location="apps/sim/tools/http/utils.ts:172">
P2: The legacy-envelope check accepts non-boolean success values, so a response containing `success: "false"` is reported as a successful tool call. Require `body.success` to be a boolean before unwrapping the envelope.</violation>
</file>

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/tools/http/utils.ts Resolved

This branch was previously deployed

1 inactive deployment
Preview — 2d87d913 Deployed Nov 11, 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