Skip to content

feat: add step.raw_response pipeline step for non-JSON HTTP responses#191

Merged
intel352 merged 3 commits intomainfrom
copilot/add-raw-response-step
Feb 27, 2026
Merged

feat: add step.raw_response pipeline step for non-JSON HTTP responses#191
intel352 merged 3 commits intomainfrom
copilot/add-raw-response-step

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

  • Create module/pipeline_step_raw_response.go — RawResponseStep implementation
  • Create module/pipeline_step_raw_response_test.go — 9 test cases
  • Register step.raw_response in plugins/pipelinesteps/plugin.go
  • Fix mis-indentation of step.raw_response in manifest StepTypes slice
  • Update package comment to include raw_response
  • Update plugin_test.go expectedSteps list and hardcoded counts from 28→29
  • All tests pass, 0 lint issues

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Add step.raw_response for non-JSON HTTP responses feat: add step.raw_response pipeline step for non-JSON HTTP responses Feb 27, 2026
@intel352 intel352 marked this pull request as ready for review February 27, 2026 05:33
Copilot AI review requested due to automatic review settings February 27, 2026 05:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new pipeline step type (step.raw_response) to allow HTTP-triggered pipelines to return non-JSON responses (e.g., XML/HTML/plain text) while stopping further pipeline execution and marking the response as handled.

Changes:

  • Implemented RawResponseStep with configurable content_type, status, headers, and raw body/body_from (with template resolution for body).
  • Added unit tests covering common response types, headers/status customization, template resolution, body_from, no-writer fallback, and config validation.
  • Registered the new step type in the pipeline-steps plugin manifest and factory map.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
plugins/pipelinesteps/plugin.go Registers step.raw_response in the plugin manifest StepTypes and StepFactories map
module/pipeline_step_raw_response.go Implements the new RawResponseStep for writing non-JSON HTTP responses
module/pipeline_step_raw_response_test.go Adds test coverage for raw response behaviors and validation

@intel352
Copy link
Contributor

@copilot apply changes based on the comments in this thread

Also fix the failing tests.

…t counts

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot apply changes based on the comments in this thread

Also fix the failing tests.

Applied all review comments in 92ee45d:

  • Fixed step.raw_response indentation in the manifest StepTypes slice
  • Updated package-level comment to include raw_response
  • Fixed failing tests: added step.raw_response to expectedSteps in TestStepFactories and updated the hardcoded count in TestPluginLoads from 28 → 29

@intel352 intel352 merged commit 1a7b39a into main Feb 27, 2026
14 checks passed
@intel352 intel352 deleted the copilot/add-raw-response-step branch February 27, 2026 06:02
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