Skip to content

ZBBS-HOME-436: paraphrase a quote-take as bought, not offered#236

Merged
jeffdafoe merged 2 commits into
mainfrom
zbbs-home-436-settled-pay-paraphrase
Jun 12, 2026
Merged

ZBBS-HOME-436: paraphrase a quote-take as bought, not offered#236
jeffdafoe merged 2 commits into
mainfrom
zbbs-home-436-settled-pay-paraphrase

Conversation

@jeffdafoe

Copy link
Copy Markdown
Owner

Companion to salem #419.

A pay_with_item carrying quote_id settles instantly in the engine (ZBBS-HOME-424 fast path), so replaying it in cross-tick history as (I offered to buy …) misreads a done deal as still pending and primes a re-buy — half of the Ezekiel six-meat morning.

  • paraphraseToolCall: quote_id present (Number() > 0, Llama may stringify) → (I bought Meat from John Ellis and ate it on the spot); plain offers keep the offered phrasing, still accurate for the pending slow path.
  • A rejected quote-take replays with its [error] tool result immediately adjacent (paired by tool_call_id in stored row order) — invariant pinned in test-build-tool-use-messages.js per code_review.

Tests: test-paraphrase-tool-call.js 20/20, test-build-tool-use-messages.js 14/14.

Reviewed by code_review (mail bc43e08d); findings addressed in 1c4631e.

🤖 Generated with Claude Code

jeffdafoe and others added 2 commits June 12, 2026 08:23
A pay_with_item carrying quote_id settles instantly in the engine
(ZBBS-HOME-424 fast path), so replaying it as '(I offered to buy ...)'
misreads a done deal as still pending and primes a re-buy — half of the
Ezekiel six-meat morning. Quote-takes now replay as '(I bought Meat from
John Ellis and ate it on the spot)'; plain offers keep the offered
phrasing, which is still accurate for the pending slow path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
code_review: the 'I bought' paraphrase relies on the [error] tool result
replaying immediately adjacent (paired by tool_call_id in stored row
order) to correct a rejected take. Pin that invariant in
test-build-tool-use-messages.js rather than leave it implicit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeffdafoe jeffdafoe merged commit 5574fbd into main Jun 12, 2026
6 checks passed
@jeffdafoe jeffdafoe deleted the zbbs-home-436-settled-pay-paraphrase branch June 12, 2026 12:31
jeffdafoe added a commit that referenced this pull request Jun 16, 2026
* ZBBS-HOME-436: paraphrase a quote-take as bought, not offered

A pay_with_item carrying quote_id settles instantly in the engine
(ZBBS-HOME-424 fast path), so replaying it as '(I offered to buy ...)'
misreads a done deal as still pending and primes a re-buy — half of the
Ezekiel six-meat morning. Quote-takes now replay as '(I bought Meat from
John Ellis and ate it on the spot)'; plain offers keep the offered
phrasing, which is still accurate for the pending slow path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ZBBS-HOME-436: pin the rejected-quote-take replay adjacency in tests

code_review: the 'I bought' paraphrase relies on the [error] tool result
replaying immediately adjacent (paired by tool_call_id in stored row
order) to correct a rejected take. Pin that invariant in
test-build-tool-use-messages.js rather than leave it implicit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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