Skip to content

fix: revert oapi to v2.6.0#209

Merged
archandatta merged 2 commits intomainfrom
archand/fix-oapi-version
Apr 10, 2026
Merged

fix: revert oapi to v2.6.0#209
archandatta merged 2 commits intomainfrom
archand/fix-oapi-version

Conversation

@archandatta
Copy link
Copy Markdown
Contributor

@archandatta archandatta commented Apr 10, 2026

Note

Medium Risk
Regenerates large portions of lib/oapi/oapi.go, including request parameter encoding and server parameter binding helpers, which could subtly change runtime behavior. Main risk is mismatched query/path parsing or validation differences after the codegen upgrade.

Overview
Regenerates lib/oapi/oapi.go with oapi-codegen v2.6.0, updating the embedded swagger payload, adding Valid() helpers for multiple enums, and switching generated request/handler parameter styling/binding to the newer runtime.*WithOptions APIs (with explicit Type/Format, e.g. UUIDs and booleans).

Simplifies the oapi-generate Makefile target by dropping the patch_strict_optional_json step and deletes scripts/oapi/patch_strict_optional_json, leaving only the SSE methods patch as a post-processing step.

Reviewed by Cursor Bugbot for commit e270add. Bugbot is set up for automated code reviews on this repo. Configure here.

@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

Reason: PR reverts a dependency version with no visible changes to kernel API endpoints or Temporal workflows; unclear if this affects the monitored code paths.

To monitor this PR anyway, reply with @firetiger monitor this.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4d039f1. Configure here.

@archandatta archandatta merged commit 6090d5e into main Apr 10, 2026
7 checks passed
@archandatta archandatta deleted the archand/fix-oapi-version branch April 10, 2026 15:20
rgarcia added a commit that referenced this pull request Apr 10, 2026
## Summary

- Adds `tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen`
directive to `server/go.mod`, pinning oapi-codegen at v2.6.0 via go.sum
- Switches `server/Makefile` from `go install ...@latest` to `go tool
oapi-codegen` so the pinned version is always used
- Removes the `OAPI_CODEGEN` binary variable and install target from the
Makefile (no longer needed)

This is the root cause fix for the version regression in #201 (where
`@latest` resolved to v2.5.1 instead of v2.6.0). PR #209 already
restored the generated code; this PR prevents it from happening again by
adopting the same `go.mod` tool directive pattern used in
`kernel/kernel`.

## Test plan

- [x] `go vet ./...` passes
- [x] Unit tests pass (`go test -race` on all non-e2e packages)
- [x] `go tool oapi-codegen -config ./oapi-codegen.yaml
./openapi-3.0.yaml` uses pinned v2.6.0
- [ ] CI server-test workflow passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk build tooling change: it only affects OpenAPI code generation
and Go module dependency resolution, not runtime behavior. Main risk is
unexpected dependency/tooling differences if the pinned tool or updated
transitive deps behave differently across environments.
> 
> **Overview**
> **Pins `oapi-codegen` for reproducible OpenAPI generation.**
`server/go.mod` now declares `oapi-codegen` as a Go `tool` dependency
(and updates module sums), and `server/Makefile` switches
`oapi-generate` from installing `@latest` into `bin/` to invoking `go
tool oapi-codegen`.
> 
> This removes the Makefile’s local `oapi-codegen` install
target/variable and updates Go module dependencies (including bumping
`github.com/getkin/kin-openapi` to `v0.133.0`) to reflect the pinned
toolchain.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d7632bf. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants