Skip to content

fix(tasks): hash the declared share, skills and location terms like vAPI - #123

Merged
vapi-development merged 2 commits into
mainfrom
fix/terms-hash-share-skills-location
Dec 2, 2026
Merged

vapi-development merged 2 commits into
mainfrom
fix/terms-hash-share-skills-location

Conversation

@vapi-development

@vapi-development vapi-development commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

vAPI freezes every declared order term into the on-chain terms hash, including share, skills and location. The client's terms model did not have those fields, so it computed a different terms hash and predicted a different clone address. Since 0.17.2 the client signs a first funding only when its own prediction equals vAPI's address, so on Base mainnet a new pool was refused: v2_plan_mismatch: The funding target differs from the prediction for accepted creation terms. Nothing was signed.

Proof on Base mainnet (order 0eb0adc1…): the pinned pool factory's predictPool returns vAPI's funding address 0x96d5…e021 for the terms hash with share, and 0xd4FA…4e32 for the client's hash without it.

Fix: taskTermsFields carries share, skills and location exactly like vAPI's orderTermsSchema, so the terms hash and prediction match for pools, tasks and bounties.

Tests (red on main): the exact terms hash of the mainnet pool; share, skills and location each change a task's terms hash. Core suite green apart from swarm tests that timed out under laptop load and pass alone (125/125).

follow-up: a contract test that fails when vAPI adds a declared order field the client does not hash.

🤖 Generated with Claude Code

follow-up: a hosted order view is a projection: share can change after funding and location is redacted for some readers, so recomputing the frozen terms hash from it can fail closed. vAPI should return the frozen declared terms snapshot for V2 orders, and the client should hash that.
follow-up: the client proof schema rejects a PR proof with repository, merged and challenge together, which vAPI accepts.

vapi-development and others added 2 commits December 2, 2026 16:58
vAPI freezes every declared order term into the on-chain terms hash,
including `share`, `skills` and `location` (orderTermsSchema). The client's
terms model did not know those fields, so it hashed other terms than vAPI and
predicted another clone address. On Base mainnet the funding of a new pool was
refused with "The funding target differs from the prediction for accepted
creation terms." Nothing was signed.

The client now carries those three declared fields, so its terms hash and
clone prediction match vAPI for pools, tasks and bounties. A regression test
pins the terms hash of a real mainnet pool posted on 2026-12-02, which makes the
pinned pool factory predict vAPI's funding address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: vAPI Development <336934719+vapi-development@users.noreply.github.com>
`share`, `skills` and `location` are set on vAPI, not by this client's post.
They now live in `declaredTermsFields`, which only the terms hash reads;
`taskTermsFields`, the post input of the SDK, CLI and MCP, is unchanged, so
MCP `tasks.post` does not accept fields it would drop.

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 5bf15eb into main Dec 2, 2026
4 checks passed
@vapi-development
vapi-development deleted the fix/terms-hash-share-skills-location branch December 2, 2026 16:15
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