Skip to content

feat: return signed log download URLs from harness_diagnose when return_download_url is set#358

Merged
thisrohangupta merged 1 commit into
mainfrom
cursor/saranya-log-download-url-diagnose-cbc2
Jun 18, 2026
Merged

feat: return signed log download URLs from harness_diagnose when return_download_url is set#358
thisrohangupta merged 1 commit into
mainfrom
cursor/saranya-log-download-url-diagnose-cbc2

Conversation

@thisrohangupta

Copy link
Copy Markdown
Collaborator

Description

Ports the remaining changes from Saranya-jena/mcp-server#1 onto main.

harness_get for execution_log already supported return_download_url=true on main (via resolveLogDownloadUrl). This PR completes the feature by wiring the same opt-in through harness_diagnose pipeline diagnostics:

  • When options.return_download_url=true, failed step logs and requested_step_log return { download_url: "<signed logs.zip URL>" } instead of inline/truncated log text.
  • Agents can fetch and paginate logs locally without buffering large blobs in the MCP server process (avoids OOM on long executions).

Changes

  • src/tools/diagnose/pipeline.ts: Add resolveDiagnoseLog helper; honor return_download_url for failed steps, explicit step requests, and auto-fetched success logs.
  • src/tools/harness-diagnose.ts: Document return_download_url in pipeline diagnostic options.
  • Tests: Coverage for diagnose pipeline, harness_get execution_log URL mode, and resolveLogDownloadUrl.

Type of Change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

Checklist

  • Tests pass (pnpm test — 1994 tests)
  • Typecheck passes
  • Build + docs check pass

Credit

Based on work by @Saranya-jena in Saranya-jena#1

Open in Web Open in Cursor 

…rn_download_url is set

Add resolveDiagnoseLog helper so pipeline diagnostics can return signed
logs.zip URLs instead of buffering inline log text, matching harness_get
execution_log behavior. Enables agents to fetch and paginate logs locally
without OOM risk.

Adapted from Saranya-jena#1

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@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.

@thisrohangupta thisrohangupta merged commit 5a4ffd9 into main Jun 18, 2026
8 checks passed
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