Jump to solution
Details

The Fix

pip install pydantic==2.11.5

Based on closed pydantic/pydantic issue #10744 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Open PR/Commit
@@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@ - # This ia a test file
fix.md
Option A — Upgrade to fixed release\npip install pydantic==2.11.5\nWhen NOT to use: This fix is not suitable if documentation does not require linting.\n\n

Why This Fix Works in Production

  • Trigger: * add `anchors: warn` to `validation` in `mkdocs.yml` (this is [new in mkdocs 1.6](https://www.mkdocs.org/user-guide/configuration/#validation))
  • Mechanism: Linting tools were not applied to documentation, causing syntax mistakes
  • Why the fix works: Introduces markdownlint to lint Markdown files in the documentation, addressing syntax mistakes that affect rendering. (first fixed release: 2.11.5).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Linting tools were not applied to documentation, causing syntax mistakes
  • Production symptom (often without a traceback): * add `anchors: warn` to `validation` in `mkdocs.yml` (this is [new in mkdocs 1.6](https://www.mkdocs.org/user-guide/configuration/#validation))

Proof / Evidence

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“To clarify, we lint the code examples, but not the markdown 👍”
@sydney-runkle · 2024-10-31 · source
“@Viicos @sydney-runkle I recently came across mdformat (https://mdformat.readthedocs.io/en/stable/) which I use before markdownlint to format Markdown files”
@mschoettle · 2025-05-08 · source
“Thanks for the suggestion. Any risk of conflicts between the linter and formatter? > The one downside in this context is that it enforces the…”
@Viicos · 2025-05-09 · source

Failure Signature (Search String)

  • * add `anchors: warn` to `validation` in `mkdocs.yml` (this is [new in mkdocs 1.6](https://www.mkdocs.org/user-guide/configuration/#validation))
  • The one disadvantage of this is that this does not play nicely with IDE integration (see
Copy-friendly signature
signature.txt
Failure Signature ----------------- * add `anchors: warn` to `validation` in `mkdocs.yml` (this is [new in mkdocs 1.6](https://www.mkdocs.org/user-guide/configuration/#validation)) The one disadvantage of this is that this does not play nicely with IDE integration (see

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- * add `anchors: warn` to `validation` in `mkdocs.yml` (this is [new in mkdocs 1.6](https://www.mkdocs.org/user-guide/configuration/#validation)) The one disadvantage of this is that this does not play nicely with IDE integration (see

What Broke

Documentation contained multiple syntax mistakes that affected rendering.

Why It Broke

Linting tools were not applied to documentation, causing syntax mistakes

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install pydantic==2.11.5

When NOT to use: This fix is not suitable if documentation does not require linting.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Option D — Guard side-effects with OnceOnly Guardrail for side-effects

Mitigate duplicate external side-effects under retries/timeouts/agent loops by gating the operation before calling external systems.

  • Place OnceOnly between your code/agent and real side-effects (Stripe, emails, CRM, APIs).
  • Use a stable key per side-effect (e.g., customer_id + action + idempotency_key).
  • Fail-safe: configure fail-open vs fail-closed based on blast radius and spend risk.
Show example snippet (optional)
onceonly.py
from onceonly import OnceOnly import os once = OnceOnly(api_key=os.environ["ONCEONLY_API_KEY"], fail_open=True) # Stable idempotency key per real side-effect. # Use a request id / job id / webhook delivery id / Stripe event id, etc. event_id = "evt_..." # replace key = f"stripe:webhook:{event_id}" res = once.check_lock(key=key, ttl=3600) if res.duplicate: return {"status": "already_processed"} # Safe to execute the side-effect exactly once. handle_event(event_id)

See OnceOnly SDK

When NOT to use: Do not use this to hide logic bugs or data corruption. Use it to block duplicate external side-effects and enforce tool permissions/spend caps.

Fix reference: https://github.com/pydantic/pydantic/pull/11307

First fixed release: 2.11.5

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not suitable if documentation does not require linting.
  • Do not use this to hide logic bugs or data corruption. Use it to block duplicate external side-effects and enforce tool permissions/spend caps.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
  • Upgrade behind a canary and run integration tests against the canary before 100% rollout.

Version Compatibility Table

VersionStatus
2.11.5 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.