Skip to content

docs: add per-protocol mock matching reference#878

Open
slayerjain wants to merge 2 commits into
mainfrom
docs/per-protocol-mock-matching
Open

docs: add per-protocol mock matching reference#878
slayerjain wants to merge 2 commits into
mainfrom
docs/per-protocol-mock-matching

Conversation

@slayerjain

Copy link
Copy Markdown
Member

Description

Adds a new reference page "How Keploy Matches Mocks per Protocol" under Running Keploy (running-keploy/mock-matching), registered in the v4.0.0 sidebar after Custom Mocks.

There was no single page answering the questions every replay-debugging session starts with:

  • What does Keploy actually compare when matching an outgoing call to a recorded Mock — per protocol?
  • What does my application see on a mock miss (HTTP 502 vs MySQL connection reset vs PostgreSQL KP001 vs Mongo reconnect)?
  • What is ignored automatically (volatile headers, bind values, ObjectIDs), and when do I actually need noise config?
  • How do the noise vocabulary, learned request-body noise (--schema-noise-detection / --schema-noise-strict), and the fuzzy-match policy (--fuzzy-match warn|on|off, deterministic replay) fit together?
  • Where are mock misses reported and how do I read the field diffs (miss log, MOCKS MISMATCH SUMMARY, report yaml unmatched_calls, keploy report)?

The page documents current behavior plus the controls landing in keploy/keploy#4271 (unified noise vocabulary + universal mismatch reporting) and keploy/keploy#4272 (fuzzy-match policy + deterministic replay) — it should merge alongside/after those.

Checks

  • yarn build — passes locally (Docusaurus compiles, sidebar reference valid)
  • prettier@2.8.8 --check — clean on both changed files
  • Commit follows Conventional Commits (docs:) with sign-off
  • No customer data: all examples use placeholder hosts/fields

🤖 Generated with Claude Code

Users debugging a replay failure had no single page answering: what does
Keploy actually compare when it matches an outgoing call to a recorded
Mock, per protocol? What happens to my application on a mock miss for
HTTP vs MySQL vs MongoDB? Which fields are ignored automatically, when
do I need noise configuration, and what do the new mock-miss reports
and fuzzy-match policy mean?

This page documents, per protocol (HTTP, gRPC, MySQL, PostgreSQL,
MongoDB, DNS, generic TCP): what is matched, what is ignored by
default, and the app-visible failure mode on a miss. It also documents
the shared noise vocabulary (body.<path> / header.<name>) across
response assertions and mock matching, learned request-body noise
(--schema-noise-detection / --schema-noise-strict), the fuzzyMatch
policy (warn/on/off deterministic replay), and the four places a mock
miss is reported (miss log, MOCKS MISMATCH SUMMARY, report yaml
unmatched_calls, keploy report). Behavior references keploy/keploy
PRs #4271 and #4272.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
Copilot AI review requested due to automatic review settings June 12, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new v4.0.0 “Mock Matching Reference” doc page explaining how Keploy matches recorded mocks per protocol during replay, including mock-miss behavior and configuration knobs relevant to replay debugging.

Changes:

  • Registers a new doc entry running-keploy/mock-matching in the v4.0.0 sidebar under “Running Keploy”.
  • Adds a new reference page documenting per-protocol matching inputs, default ignores/noise behavior, fuzzy matching controls, and where to find mismatch reporting details.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
versioned_sidebars/version-4.0.0-sidebars.json Adds the new “mock-matching” page to the v4.0.0 navigation sidebar under Running Keploy.
versioned_docs/version-4.0.0/running-keploy/mock-matching.md Introduces the new “How Keploy Matches Mocks per Protocol” reference page with protocol matching tables and debugging guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Replace 'charset' with 'character set', 'regexes' with 'regular
expressions', and lowercase 'yaml' with 'YAML file' in prose; add
'Jaccard' (proper noun, the similarity coefficient referenced with its
thresholds) to the accepted vocabulary.

Signed-off-by: slayerjain <shubhamkjain@outlook.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.

2 participants