Skip to content

fix(serverless): decode arbitrary task outputs - #141

Open
emmmile wants to merge 1 commit into
rc/serverlessfrom
fix/runserv-1009-task-output
Open

emmmile wants to merge 1 commit into
rc/serverlessfrom
fix/runserv-1009-task-output

Conversation

@emmmile

@emmmile emmmile commented Sep 25, 2026

Copy link
Copy Markdown

The CLI's generated Serverless task client now decodes arbitrary JSON outputs, so task reads and completed async resubmissions can carry strings and lists without failing JSON decoding. apps tasks show also prints scalar outputs.

Surface Source and behavior
Task.output Serverless task responses, any JSON value

This sync is needed before the task output contract update reaches dev.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include coderabbit-review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 2a9e6369-d756-4f4e-a74b-4b928f99dc40

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The schema, generated model, display path, and tests consistently support arbitrary JSON task outputs.

Review effort: Balanced
Findings: None

What changed in this PR

Updates Serverless task outputs to support any JSON value throughout the generated client and CLI display.

Changes:

  • Generalizes the OpenAPI Task.output schema and generated Go type.
  • Renders scalar task outputs.
  • Adds coverage for scalar and list decoding.
File Description
api/​serverless/​openapi.yaml Defines output as arbitrary JSON.
internal/​api/​serverless/​gen/​client.gen.go Regenerates Task.Output as interface{}.
internal/​api/​serverless/​tasks_test.go Tests output decoding across task APIs.
internal/​cmd/​serverless/​display.go Formats arbitrary output values.
internal/​cmd/​serverless/​apps_tasks_test.go Tests scalar output rendering.
Files not reviewed (1)
  • internal/api/serverless/gen/client.gen.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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