Skip to content

feat: OpenAPI x-pipeline extension for spec-driven pipeline triggers#193

Merged
intel352 merged 3 commits intomainfrom
copilot/extend-openapi-pipeline-trigger
Feb 27, 2026
Merged

feat: OpenAPI x-pipeline extension for spec-driven pipeline triggers#193
intel352 merged 3 commits intomainfrom
copilot/extend-openapi-pipeline-trigger

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

  • Explore codebase and understand OpenAPI module, pipeline system, and wiring hooks
  • Add x-pipeline field to openAPIOperation struct in module/openapi.go
  • Add PipelineLookup function field and setter to OpenAPIModule
  • Modify openAPIRouteHandler to execute named pipeline when x-pipeline is set
  • Update wireOpenAPIRoutes wiring hook to inject pipeline lookup from engine service
  • Add tests for x-pipeline parsing and pipeline execution
  • Address review feedback: nil lookup → 500, per-request pipeline copy, JSON body extraction
  • Run tests and linting (all pass, 0 lint issues)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@intel352 intel352 marked this pull request as ready for review February 27, 2026 05:34
Copilot AI review requested due to automatic review settings February 27, 2026 05:34
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.

Copilot wasn't able to review any files in this pull request.

When an OpenAPI operation includes `x-pipeline: <name>`, the route
handler executes the named pipeline instead of returning 501 Not
Implemented. Pipeline lookup is injected by the wiring hook from the
engine's pipeline registry.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
@intel352 intel352 requested a review from Copilot February 27, 2026 05:44
Copilot AI changed the title [WIP] Add OpenAPI spec as pipeline trigger source feat: OpenAPI x-pipeline extension for spec-driven pipeline triggers Feb 27, 2026
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

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

@intel352
Copy link
Contributor

@copilot apply changes based on the comments in this thread

- Return 500 (not silent 501 fallback) when x-pipeline is set but
  pipelineLookup is nil, making misconfiguration easier to diagnose
- Use per-request shallow copy of Pipeline to avoid concurrent mutations
  of shared pipeline state (seqNum, etc.)
- Implement JSON body extraction in openAPIExtractRequestData with a
  1 MiB limit, body restoration, and query-param precedence over body
- Add tests: nil-lookup 500, JSON body extraction, query-param priority,
  non-JSON body skipped

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
@intel352 intel352 merged commit 1cfab0c into main Feb 27, 2026
14 checks passed
@intel352 intel352 deleted the copilot/extend-openapi-pipeline-trigger branch February 27, 2026 07:17
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