Skip to content

refactor(httpapi): describe bodyless global upgrade payload#29264

Merged
kitlangton merged 1 commit into
anomalyco:devfrom
kitlangton:kit/httpapi-global-upgrade-no-content
May 25, 2026
Merged

refactor(httpapi): describe bodyless global upgrade payload#29264
kitlangton merged 1 commit into
anomalyco:devfrom
kitlangton:kit/httpapi-global-upgrade-no-content

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

@kitlangton kitlangton commented May 25, 2026

Summary

  • Declare POST /global/upgrade as accepting either GlobalUpgradeInput or HttpApiSchema.NoContent.
  • Keep the existing raw handler and runtime behavior unchanged.
  • Add focused tests for its existing bodyless-upgrade and malformed-JSON behavior.

Context

/global/upgrade already treats an absent request body as {} and uses that to select the latest version. Its HttpApi declaration described only the object body, so this aligns the declared contract with existing behavior.

This is an internal contract correction and regression-coverage improvement, not a user-facing runtime bug fix: bodyless requests already succeeded before this change. HttpApiSchema.NoContent is the intended HttpApi representation for that supported bodyless request shape.

Verification

  • bun prettier --write src/server/routes/instance/httpapi/groups/global.ts test/server/httpapi-global.test.ts
  • bun oxlint packages/opencode/src/server/routes/instance/httpapi/groups/global.ts packages/opencode/test/server/httpapi-global.test.ts
  • bun typecheck from packages/opencode
  • bun run test -- test/server/httpapi-global.test.ts from packages/opencode
  • ./packages/sdk/js/script/build.ts (no generated SDK changes)
  • Pre-push hook: bun turbo typecheck passed across the workspace

@kitlangton kitlangton changed the title fix(httpapi): model bodyless global upgrade payload refactor(httpapi): describe bodyless global upgrade payload May 25, 2026
@kitlangton kitlangton merged commit 7753211 into anomalyco:dev May 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant