mergedhumanPR #249Payments
Add optional quote-intent profile for cheaper wrong-item failures
Add the optional a2a-quote-intent@0.1 profile to the existing Path runner. A quote within the price ceiling is not enough if it describes the wrong item.
Description
The pitch.
## Summary Add the optional `a2a-quote-intent@0.1` profile to the existing Path runner. A quote within the price ceiling is not enough if it describes the wrong item. This carries forward one requirement from [#215 by chainaim-sathya](https://github.com/projnanda/nandatown/pull/215), reviewed at `0b7667d5896bedd80f237a188f7cd0607d46237f`. It is a fresh implementation for current main, not a merge of the legacy payment plugin. ## Behavior - Require observed SKU, color, integer quantity, merchant identifier, currency and current request ID to match the selected synthetic quote contract. - Accept integer totals from 0 through 3990 cents, including discounts. Reject missing, negative, over-budget, floating-point, boolean and string amounts. - Persist response-derived fields, not request-filled assumptions; report each mismatched term and replay from the evidence bundle. - Keep both price-only profiles, their fingerprints, the default selection and `path-0.2` replay semantics unchanged. The opt-in profile selects `path-quote-intent-0.1`. - Add a reference `wrong_item` CLI demonstration: a 3000-cent red quote fails the blue-item requirement. - Record non-object quote artifacts as unparseable subject output instead of a Town driver exception. ## Verification - Full suite: **431 passed**, 8 pre-existing warnings. - New profile suite: **39 passed**. - TDD: after correcting the test client's base URL, **29 failed / 5 passed** against unchanged production code, including wrong-item cases incorrectly passing. Reference-agent support then had its own two failing tests before implementation. - Mutation checks: omitting item checks causes **13 failures**; omitting the amount check causes **8 failures**. Mutations were in disposable processes, not committed files. - Real localhost CLI healthy run: exit 0 / PASS. Wrong-item run: exit 1 / semantic color failure. Both independently verify through the CLI. - Fresh-process offline replay and both old-profile compatibility checks pass. - Local self-review only; no separate reviewer agent was contacted. ## Scope and credit This tests an observed **quote**, not purchase authorization, payment settlement, merchant ownership or physical delivery. The duplicate condition compares returned quote content, not external merchant effects. This Town-authored fixture is not proof of outside adoption. The broader Prava client, hosted service, live charges, intent-certification, FX and return-policy work from #215 is not ported or claimed implemented. Its source remains the reference for a separately designed provider integration. #215 stays open until this replacement is merged and its final disposition is documented.
Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/249/head:pr-249
git checkout pr-249