Skip to content

fix(tasks): parse pool claims and pool cards from the server - #125

Merged
vapi-development merged 2 commits into
mainfrom
fix/pool-claim-kind
Dec 2, 2026
Merged

vapi-development merged 2 commits into
mainfrom
fix/pool-claim-kind

Conversation

@vapi-development

Copy link
Copy Markdown
Contributor

What & why

On Base mainnet (2026-12-02) vapi task claim <pool> --claimant <addr> failed before signing with
invalid_response … workOrder.proposals.0.signedPayload.kind: expected "proposal"|"submission".
The vAPI server lists pool claims in GET /v1/work-orders/:id as proposals with kind: "claim",
preset proof fills ([{ preset: "text", value }]) and an optional invite code. The client's response
schema reused the request proposal schema, so any pool with one claim broke task claim, show and
cancel … pool. The 0.17.1 fixture only covered a pool without claims.

Changes

  • Response-only proposalPayloadViewSchema mirrors the server view (vapi-app
    order-view.ts workProposalPayloadViewSchema): kinds proposal | submission | claim, 1–20 legacy or
    preset proof fills, preset fills only on claims, proof forbidden on plain proposals, invite code
    /^[A-Z2-7]{8}$/ only on claims. Values are validated with the existing request validators but
    returned unchanged, so a parsed claim keeps its exact signed bytes. The request schema stays narrow.
  • Same class, found in review: public task cards accept shape: "pool" (one listed pool broke
    task board and signed-out task show); the pr proof requirement accepts the server's
    repository, merged, challenge binding (all three or none).

Review

Codex gpt-6.2-astra review, then repair, then narrow re-review. The re-review's two remaining points
(value validation, all-or-none pr binding) were applied afterwards with tests, without a third review round.

  • follow-up: client response schemas are hand-mirrored from vapi-app; a generated or shared contract
    (or a parity test against the server's view schemas) would stop this drift class.

Test evidence

  • New tests in packages/core/src/tasks/server-parity.test.ts: red on main (claim kind + preset proof
    rejected) and red against the first commit for the review cases; green now.
  • core 2605, cli 1548, mcp 706 tests pass; pnpm build, pnpm typecheck, pnpm lint exit 0.
    (swarm-capital.test.ts timed out once in a full run, passes alone: known flake.)
  • Smoke: the built CLI reads the live prod pool 587fd51b-… with 9 claims (task show ok).

🤖 Generated with Claude Code

vapi-development and others added 2 commits December 2, 2026 23:16
…uirements from the server

Order views list pool claims as proposals with kind "claim" and preset proof
fills; the client reused its request schema and rejected them, so task claim,
show and cancel failed on any pool with a claim. Response payloads now mirror
the server view (kinds, proof bounds, invite codes) and keep signed proof bytes
unchanged. Public cards accept shape "pool"; pr requirements accept
repository, merged and challenge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: vAPI Development <336934719+vapi-development@users.noreply.github.com>
…nding fields go together

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: vAPI Development <336934719+vapi-development@users.noreply.github.com>
@vapi-development
vapi-development merged commit 2c63e95 into main Dec 2, 2026
9 checks passed
@vapi-development
vapi-development deleted the fix/pool-claim-kind branch December 2, 2026 22:22
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