Repository navigation
docs: correct MockBuilder when() fallback guidance - #89
Merged
Bbenchaya merged 1 commit intoOct 29, 2026
Merged
Conversation
The "Scenario Predicates with when()" section said a second registration for the same tool acts as a fallback when the predicate doesn't match. The registry holds one mock per tool name, so the second registration replaces the first. Remove that example and paragraph, state the one-mock-per-tool behavior, and point to register_data_driven with a catch-all case or fallback= for a conditional mock with a default. Fixes intuit#59 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
idhanth
requested review from
Bbenchaya,
ChiefArchitect and
sboorlagadda
as code owners
October 15, 2026 21:37
Bbenchaya
approved these changes
Oct 29, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
🚨 Please review this repository's contribution guidelines.
[Unreleased]changelog entry for a user-visible change, or confirmed the change is exempt.Description
What does this change do and why?
Implements the docs-only fix decided in #59. In
docs/guides/mock-builder.md, "Scenario Predicates withwhen()":registry.mock("get_pricing").returns(...)example and the paragraph saying the next registered mock is tried when the predicate doesn't match.MockToolsRegistryholds one mock per tool name, so that second registration replaces the first.register_data_drivenwith a catch-all case (noinput) orfallback=for a conditional mock with a default.README.mdanddocs/guides/langgraph-integration.mddon't contain the same wording, so they're unchanged.Verification:
when()mock resolves only when the flag is set, a secondregistry.mock("get_pricing")replaces it, and a catch-all case andfallback=both cover unmatched input.uv run sphinx-build -b html docs docs/_build/html(as indocs.yml): builds with no warnings, and both new links resolve.Docs-only, so no code or tests change, and it's exempt from the changelog per CONTRIBUTING.
Fixes #59
🤖 Generated with Claude Code