Skip to content

fix(qa): issue unique mock tool call ids#96338

Merged
vincentkoc merged 1 commit into
mainfrom
fix/qa-unique-mock-tool-call-ids
Jun 24, 2026
Merged

fix(qa): issue unique mock tool call ids#96338
vincentkoc merged 1 commit into
mainfrom
fix/qa-unique-mock-tool-call-ids

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The QA runtime parity soak can report a tool error when a scenario legitimately repeats the same tool call. The QA mock provider reused the same call_id, function item id, and response id for identical tool name/argument pairs, which violates the provider tool-call identity contract.

Why This Change Was Made

Keep the existing argument hash for readable, repeatable diagnostics, then append a process-local monotonic sequence to every emitted mock function call. This preserves the useful prefix while guaranteeing distinct identities across repeated turns. The regression test sends the same request twice and asserts distinct call ids.

User Impact

No production runtime behavior changes. Release QA parity and soak runs no longer produce false tool-error failures from duplicate mock tool-call ids.

Evidence

  • node scripts/run-vitest.mjs extensions/qa-lab/src/providers/mock-openai/server.test.ts --run
  • 106 tests passed
  • autoreview: clean, no accepted/actionable findings
  • Fixes the repeated-call identity failure observed in runtime-long-context-cache-stability

@vincentkoc vincentkoc self-assigned this Jun 24, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review June 24, 2026 08:40
@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(qa): issue unique mock tool call ids This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@vincentkoc
vincentkoc merged commit f65aca6 into main Jun 24, 2026
153 of 158 checks passed
@vincentkoc
vincentkoc deleted the fix/qa-unique-mock-tool-call-ids branch June 24, 2026 08:50
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant