Skip to content

Fix execution log URL mode schema exposure#343

Draft
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/critical-bug-investigation-0ee0
Draft

Fix execution log URL mode schema exposure#343
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/critical-bug-investigation-0ee0

Conversation

@cursor

@cursor cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Exposes return_download_url on the public harness_get input schema so schema-driven MCP clients can request URL-only execution log retrieval without the field being dropped before handler dispatch.

Bug and impact: execution_log documented and handled return_download_url=true, but the registered top-level schema omitted it. Strict/schema-driven clients could strip the unknown field, silently falling back to downloading and decompressing log content instead of returning a signed URL. That reintroduces the large-log buffering path that URL mode was meant to avoid.

Root cause: the handler supported input.return_download_url, but the public schema only had generic params for resource-specific fields.

Fix: add top-level return_download_url to harness_get and add tool-handler regressions for schema exposure and URL-mode dispatch.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Checklist

  • Tests pass
  • Typecheck passes

Validation performed:

  • pnpm exec vitest run tests/tools/tool-handlers.test.ts -t "return_download_url"
  • pnpm build
  • pnpm docs:generate
  • pnpm typecheck
  • pnpm exec vitest run tests/tools/tool-handlers.test.ts
  • pnpm test
  • pnpm docs:check
Open in Web View Automation 

cursoragent and others added 4 commits June 15, 2026 11:09
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No blocking findings.

Assumptions / residual risk:

  • params.return_download_url still appears to work via the generic params merge path in harness_get, but the new regressions only cover the top-level return_download_url field. I treated that as low risk because the architecture bug here was specifically the missing top-level schema field that strict MCP clients could strip before the handler ran.
  • execution_log still has some pre-existing metadata debt in src/registry/toolsets/logs.ts (responseExtractor: passthrough and listFilterFields on a get-only resource), but this PR does not worsen that surface.

Change summary:

  • harness_get now advertises top-level return_download_url, restoring public schema/runtime parity for execution_log.
  • The fix removes the silent fallback where schema-driven clients could lose URL-only mode and drop back to downloading/decompressing log content.
  • Added the right shared-tool regressions for this bug: one proves the field is exposed in the registered schema, and one proves URL mode calls resolveLogDownloadUrl instead of resolveLogContent.
  • PR head 21cd023d61b05ad448c6f15655c0b010626254b2 matched the reviewed diff, and CI was green at review time.
Open in Web View Automation 

Sent by Cursor Automation: Sunil On Demand Architecture Review

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants