Skip to content

fix(sdk): correct reviseProposal + setProposalBranch wire contracts#76

Merged
kerem-acer merged 1 commit into
mainfrom
fix/proposal-revise-branch-contracts
Jun 10, 2026
Merged

fix(sdk): correct reviseProposal + setProposalBranch wire contracts#76
kerem-acer merged 1 commit into
mainfrom
fix/proposal-revise-branch-contracts

Conversation

@kerem-acer

Copy link
Copy Markdown
Contributor

Summary

Two proposal mutations drifted from the deployed API (source of truth: ReviseProposalEndpointRequest.cs, SetProposalBranchEndpointRequest.cs, SetProposalBranchEndpoint.cs in the core repo):

Method Bug Fix
reviseProposal request typed coverage?: Coverage — endpoint reads CoverageGroupIds; group-scoped reruns silently became current-group reruns coverageGroupIds?: readonly string[] | null
setProposalBranch request typed branchId: string — endpoint binds AgentBranchId, so every call cleared the branch; client also POSTed where the endpoint registers PUT (405) agentBranchId: string | null + putNoContent

New wire-level unit tests assert both bodies + the PUT verb.

Test Plan

  • bun run typecheck
  • bun run build
  • bun run test (incl. 2 new wire tests)
  • bun run lint + format:check

🤖 Generated with Claude Code

ReviseProposalRequest carried a 'coverage' field the deployed
proposals/{id}/revise endpoint never reads — the real body field is
CoverageGroupIds (ReviseProposalEndpointRequest.cs). Reruns with
selected coverage groups silently degraded to current-groups reruns.

SetProposalBranchRequest used 'branchId' but the endpoint binds
AgentBranchId; the mismatch made every assignment clear the branch
instead of setting it. The endpoint also registers PUT, not POST —
the client now PUTs.

Both verified against InsurUp core WebApi endpoint + contract sources.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kerem-acer kerem-acer merged commit 115bfc8 into main Jun 10, 2026
2 checks passed
@kerem-acer kerem-acer deleted the fix/proposal-revise-branch-contracts branch June 10, 2026 05:52
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.

1 participant