# pydantic/pydantic — codebase unpack

> Canonical page: https://codevetter.com/unpack/pydantic

This is a deterministic Repo Unpack scan of pydantic/pydantic — a structural map, not a review, security audit, or maintainer-endorsed description.

- Scanned commit: 29933d1c8cfc882a7640f4d831b09381b39aa311 (2026-10-01)
- Last upstream commit: Bump py-cov-action/python-coverage-comment-action from 4.1 to 4.4 (#13916)
- Generated by codevetter 1.15.0 on 2026-10-02
- 791 files scanned · 8.7 MB

Source inspection; upstream code and tests were not executed.

## Languages

- Python: 453 files
- Rust: 144 files
- Markdown: 102 files
- YAML: 29 files
- TOML: 19 files
- HTML: 5 files
- JavaScript: 5 files
- Shell: 4 files

## Repository structure

- pydantic-core/ — 292 files
- tests/ — 229 files
- docs/ — 112 files
- pydantic/ — 107 files
- .github/ — 27 files
- .hyperlint/ — 4 files
- release/ — 4 files
- .agents/ — 1 files

Probable source entrypoint: `pyproject.toml` (inferred from the tree, not upstream docs)

## Package

- pyproject.toml: pydantic — 5 declared dependencies

## Structural health signals

Average score 6.3/10 across 96 files; 64 hotspots. These are deterministic review leads, not proof of a bug.

## Recent history

- 29933d1c8cfc (2026-10-01) Bump py-cov-action/python-coverage-comment-action from 4.1 to 4.4 (#13916)
- 00ab3d5a2f7c (2026-10-01) Bump pnpm/action-setup from 6.0.9 to 6.1.0 (#13917)
- 24c1cbd3288a (2026-10-01) Bump re-actors/alls-green from 1.2.2 to 1.3.0 (#13915)
- 4944bf39a080 (2026-10-01) Bump astral-sh/setup-uv from 10.0.1 to 10.2.0 (#13914)
- 1bde20b3b824 (2026-10-01) Bump uraimo/run-on-arch-action from 3.1.0 to 3.2.0 (#13913)

## Overview

Pydantic is a Python library for developers who need to validate application data against type annotations and serialize the resulting objects. At commit 29933d1c8cfc882a7640f4d831b09381b39aa311, Python handles model construction, annotation resolution, customization, and JSON Schema generation, while a bundled Rust/PyO3 package executes validation and serialization. Its public surfaces include BaseModel, TypeAdapter, validated dataclasses, function-call validation, specialized types, and validation instrumentation plugins.

## System map

This checkout is a library workspace with Python and native-extension boundaries. The Python package constructs schemas and exposes developer APIs; pydantic-core compiles schema descriptions into Rust validator and serializer objects. Model state belongs to Python instances, while compiled schemas belong to classes or adapters. Packaging, documentation publication, and ecosystem checks are handled by repository tooling and GitHub Actions.
- The package entrypoint checks core compatibility immediately, then lazily resolves public attributes through _dynamic_imports and caches exports from the imported module. — [pydantic/__init__.py#L5-L9](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/__init__.py#L5-L9) [pydantic/__init__.py#L430-L457](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/__init__.py#L430-L457)
- ModelMetaclass collects configuration and decorators, builds fields, and either installs deferred mocks or calls complete_model_class. — [pydantic/_internal/_model_construction.py#L116-L133](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L116-L133) [pydantic/_internal/_model_construction.py#L146-L151](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L146-L151) [pydantic/_internal/_model_construction.py#L215-L259](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L215-L259)
- Core schemas are dictionaries with supported type tags; GenerateSchema produces them, and Rust build_validator_inner dispatches their type to concrete validator builders. — [docs/internals/architecture.md#L27-L45](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/docs/internals/architecture.md#L27-L45) [pydantic-core/src/validators/mod.rs#L538-L564](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L538-L564)
- The _pydantic_core PyO3 module exports SchemaValidator, SchemaSerializer, JSON helpers, URL types, and structured errors; module initialization also exposes build information and the recursion limit. — [pydantic-core/src/lib.rs#L110-L136](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/lib.rs#L110-L136)
- The root package requires Python >=3.10, uses Hatchling, and pins pydantic-core==2.49.0; uv resolves that dependency from the local workspace member. — [pyproject.toml#L1-L3](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L1-L3) [pyproject.toml#L45-L53](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L45-L53) [pyproject.toml#L204-L215](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L204-L215)
- The core uses Maturin with module name pydantic_core._pydantic_core; Cargo builds cdylib/rlib artifacts with Rust edition 2024 and minimum Rust 1.88. — [pydantic-core/pyproject.toml#L1-L3](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/pyproject.toml#L1-L3) [pydantic-core/pyproject.toml#L88-L94](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/pyproject.toml#L88-L94) [pydantic-core/Cargo.toml#L1-L4](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/Cargo.toml#L1-L4) [pydantic-core/Cargo.toml#L25-L55](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/Cargo.toml#L25-L55)
- The inspected storage boundary is caller-owned: model state consists of __dict__, extras, explicit-field tracking, and private attributes; dumps return values rather than writing application records. — [pydantic/main.py#L520-L536](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L520-L536) [pydantic/main.py#L587-L604](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L587-L604) [pydantic/main.py#L1208-L1223](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1208-L1223)
- Makefile defines lint, typecheck, test, benchmark, and documentation commands; tag-gated CI publishes core before Pydantic, while documentation jobs publish dev/latest versions and upload Algolia search data. — [Makefile#L33-L79](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L33-L79) [Makefile#L131-L137](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L131-L137) [.github/workflows/ci.yml#L994-L1001](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/ci.yml#L994-L1001) [.github/workflows/docs-update.yml#L111-L129](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/docs-update.yml#L111-L129)

## Feature catalog

User-facing functionality is exposed through Python APIs rather than application routes or screens. BaseModel and TypeAdapter cover structured and arbitrary typed data, with dedicated wrappers for dataclasses and function calls. Field metadata, custom validators, serializers, and specialized types refine those contracts. JSON Schema export and instrumentation plugins support integration with surrounding developer systems.
- BaseModel supports keyword construction, Python-object validation with optional attribute extraction, and JSON validation; call options include strictness, extra-field behavior, context, and alias/name selection. — [pydantic/main.py#L270-L287](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L270-L287) [pydantic/main.py#L784-L798](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L784-L798) [pydantic/main.py#L839-L847](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L839-L847)
- model_dump returns Python data and model_dump_json returns a string; both support inclusion/exclusion, unset/default/None filtering, context, round-trip behavior, fallbacks, and serialization warning policy. — [pydantic/main.py#L520-L536](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L520-L536) [pydantic/main.py#L538-L604](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L538-L604)
- TypeAdapter builds or reuses a schema for an arbitrary type, validates Python or JSON input, supports experimental partial validation, and returns JSON bytes from dump_json. — [pydantic/type_adapter.py#L250-L297](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L250-L297) [pydantic/type_adapter.py#L362-L418](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L362-L418) [pydantic/type_adapter.py#L460-L474](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L460-L474) [pydantic/type_adapter.py#L651-L668](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L651-L668)
- pydantic.dataclasses.dataclass wraps stdlib dataclasses with initialization validation and optional assignment validation; validate_on_init=False is rejected. — [pydantic/dataclasses.py#L100-L118](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/dataclasses.py#L100-L118) [pydantic/dataclasses.py#L205-L236](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/dataclasses.py#L205-L236) [pydantic/dataclasses.py#L273-L279](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/dataclasses.py#L273-L279)
- validate_call validates function arguments and optionally return values, preserving wrapper identity and supporting coroutine functions with validation after awaiting their result. — [pydantic/validate_call_decorator.py#L83-L121](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/validate_call_decorator.py#L83-L121) [pydantic/_internal/_validate_call.py#L29-L47](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_validate_call.py#L29-L47) [pydantic/_internal/_validate_call.py#L106-L141](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_validate_call.py#L106-L141)
- FieldInfo represents defaults/factories, distinct validation and serialization aliases, exclusions, tagged-union discriminators, frozen fields, and constraints; decorators and Annotated handlers add custom validation and serialization. — [pydantic/fields.py#L112-L141](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/fields.py#L112-L141) [pydantic/functional_validators.py#L75-L87](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/functional_validators.py#L75-L87) [pydantic/functional_serializers.py#L80-L86](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/functional_serializers.py#L80-L86) [pydantic/_internal/_generate_schema.py#L1260-L1312](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_generate_schema.py#L1260-L1312)
- Specialized APIs include root-value models, runtime create_model factories, ImportString resolution, filesystem path checks, masked secret types, and normalized email validation with deliverability checks disabled. — [pydantic/root_model.py#L48-L70](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/root_model.py#L48-L70) [pydantic/main.py#L1823-L1843](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1823-L1843) [pydantic/types.py#L1293-L1345](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/types.py#L1293-L1345) [pydantic/networks.py#L1402-L1414](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/networks.py#L1402-L1414)
- JSON Schema export supports validation/serialization modes and selectable union representation; plugins receive schema identity and settings plus optional handlers for Python, JSON, and string validation. — [pydantic/json_schema.py#L2733-L2760](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L2733-L2760) [pydantic/plugin/__init__.py#L34-L67](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/plugin/__init__.py#L34-L67) [pydantic/plugin/_schema_validator.py#L77-L93](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/plugin/_schema_validator.py#L77-L93)

## Data flow

Type declarations first become field metadata, configuration, and executable core schemas. Validators and serializers retain those schemas while each validation call creates its own execution state. Input mode, aliases, context, and policy overrides travel into the Rust boundary. Results return as Python objects, structured errors, JSON bytes/strings, or JSON Schema dictionaries; persistence remains outside the main validation flow.
- Configuration merges base-class dictionaries, then class-body configuration, then recognized class keyword options; core_config translates selected keys and omits None values. — [pydantic/_internal/_config.py#L169-L189](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_config.py#L169-L189) [pydantic/_internal/_config.py#L203-L228](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_config.py#L203-L228)
- Field annotations and metadata enter _common_field_schema, which combines decorator validators, applies discriminator handling, wraps defaults, and installs field serializers. — [pydantic/_internal/_generate_schema.py#L1260-L1318](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_generate_schema.py#L1260-L1318)
- complete_model_class generates and cleans the schema, stores __pydantic_core_schema__, and installs a plugin-aware validator plus SchemaSerializer on the class. — [pydantic/_internal/_model_construction.py#L621-L661](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L621-L661)
- SchemaValidator.py_new builds a validator graph and definitions, retaining the original Python schema/configuration and error-display settings. — [pydantic-core/src/validators/mod.rs#L141-L183](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L141-L183)
- Python validation converts per-call extra behavior and enters _validate; that function creates recursion and ValidationState objects carrying strictness, context, input mode, aliases, and self_instance. — [pydantic-core/src/validators/mod.rs#L188-L215](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L188-L215) [pydantic-core/src/validators/mod.rs#L434-L467](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L434-L467)
- JSON validation checks the input byte representation, parses it with jiter::JsonValue::parse_with_config, then uses the same validator graph with InputType::Json and converts failures to ValidationError. — [pydantic-core/src/validators/mod.rs#L264-L296](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L264-L296) [pydantic-core/src/validators/mod.rs#L471-L510](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L471-L510)
- Model field validation returns a dictionary, extras, and fields-set tuple; ModelValidator writes these onto the instance and invokes post-init, with a separate root-model branch. — [pydantic-core/src/validators/model.rs#L249-L279](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/model.rs#L249-L279) [pydantic-core/src/validators/model.rs#L305-L327](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/model.rs#L305-L327) [pydantic-core/src/validators/model.rs#L367-L378](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/model.rs#L367-L378)
- Serialization produces JSON bytes and checks warnings before return; BaseModel decodes those bytes, while JSON Schema generation separately traverses the core schema, prunes/remaps definitions, and sorts the resulting dictionary. — [pydantic-core/src/serializers/mod.rs#L179-L193](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/serializers/mod.rs#L179-L193) [pydantic/main.py#L587-L604](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L587-L604) [pydantic/json_schema.py#L432-L458](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L432-L458)

## Behavior traces

The source traces cover model definition and instantiation, JSON validation and serialization, and validated function invocation end-to-end. They also follow adapter initialization, JSON Schema export, plugin callbacks, and state restoration. Each sequence describes implementation order and material branches rather than an observed execution. Deferred schemas and optional return validation change when parts of these sequences run.
- Import flow: pydantic.__init__ imports version information → _ensure_pydantic_core_version checks compatibility → __getattr__ resolves a requested public symbol → import_module loads and caches exports. — [pydantic/__init__.py#L5-L9](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/__init__.py#L5-L9) [pydantic/version.py#L77-L98](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/version.py#L77-L98) [pydantic/__init__.py#L440-L457](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/__init__.py#L440-L457)
- Model-definition flow: ModelMetaclass.__new__ → ConfigWrapper.for_model/inspect_namespace → DecoratorInfos.build → set_model_fields → complete_model_class → GenerateSchema.generate_schema/clean_schema → validator and serializer installation; defer_build substitutes mocks. — [pydantic/_internal/_model_construction.py#L116-L133](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L116-L133) [pydantic/_internal/_model_construction.py#L146-L151](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L146-L151) [pydantic/_internal/_model_construction.py#L215-L259](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L215-L259) [pydantic/_internal/_model_construction.py#L621-L661](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L621-L661)
- Instantiation flow: BaseModel.__init__ → validate_python(data, self_instance=self) → SchemaValidator._validate → ModelValidator.validate_init → inner field validation → set_model_attrs → call_post_init. — [pydantic/main.py#L270-L287](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L270-L287) [pydantic-core/src/validators/mod.rs#L434-L467](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L434-L467) [pydantic-core/src/validators/model.rs#L123-L126](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/model.rs#L123-L126) [pydantic-core/src/validators/model.rs#L249-L279](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/model.rs#L249-L279)
- JSON round-trip flow: model_validate_json checks alias/name options → SchemaValidator.validate_json checks bytes → _validate_json parses through jiter and validates → model_dump_json calls SchemaSerializer.to_json → to_json_bytes/final warning check → bytes are decoded to str. — [pydantic/main.py#L839-L847](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L839-L847) [pydantic-core/src/validators/mod.rs#L280-L296](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L280-L296) [pydantic-core/src/validators/mod.rs#L484-L499](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L484-L499) [pydantic-core/src/serializers/mod.rs#L179-L193](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/serializers/mod.rs#L179-L193) [pydantic/main.py#L587-L604](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L587-L604)
- TypeAdapter flow: __init__ captures appropriate function/caller namespaces → _init_core_attrs reuses existing schema objects or generates/cleans new ones → create_schema_validator and SchemaSerializer initialize → validate_python forwards per-call policy and partial-validation options. — [pydantic/type_adapter.py#L177-L214](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L177-L214) [pydantic/type_adapter.py#L245-L297](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L245-L297) [pydantic/type_adapter.py#L404-L418](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L404-L418)
- Function-call flow: validate_call → ValidateCallWrapper → _create_validators/GenerateSchema._call_schema → __call__ packages ArgsKwargs → Rust CallValidator validates arguments and invokes the function → optional return validator runs, awaiting coroutine results when necessary. — [pydantic/validate_call_decorator.py#L109-L121](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/validate_call_decorator.py#L109-L121) [pydantic/_internal/_validate_call.py#L92-L141](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_validate_call.py#L92-L141) [pydantic/_internal/_generate_schema.py#L1983-L2006](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_generate_schema.py#L1983-L2006) [pydantic-core/src/validators/call.rs#L79-L103](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/call.rs#L79-L103)
- JSON Schema flow: BaseModel.model_json_schema → model_json_schema constructs a generator and rebuilds a mocked core schema if necessary → GenerateJsonSchema.generate/generate_inner → definition cleanup/remapping → sorted dictionary; a used generator cannot be reused. — [pydantic/main.py#L636-L643](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L636-L643) [pydantic/json_schema.py#L2765-L2778](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L2765-L2778) [pydantic/json_schema.py#L411-L458](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L411-L458)
- State-restoration flow: __getstate__ emits instance fields, extras, fields-set, and defined private values → the caller's serialization mechanism carries that state → __setstate__ assigns it directly without invoking validation. — [pydantic/main.py#L1208-L1223](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1208-L1223)

## Testing signals

Tests and CI were inspected, not executed; test existence establishes intended coverage, not passing results. The inspected suites use pytest, with separate native-core, documentation, plugin-installation, and static-type integration checks. CI defines platform and interpreter matrices, benchmarks, and downstream compatibility jobs. This inventory is bounded and does not establish exhaustive coverage or current coverage percentages.
- Root pytest configuration targets tests, treats warnings as errors, enables strict configuration, and disables benchmark timing by default; make test invokes coverage-backed pytest with configurable parallel threads. — [pyproject.toml#L185-L202](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L185-L202) [Makefile#L73-L79](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L73-L79)
- Inspected BaseModel tests assert missing-field/error payloads, invalid numeric inputs, Python/JSON dumps, and cyclic-input recursion errors. — [tests/test_main.py#L78-L116](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_main.py#L78-L116) [tests/test_main.py#L3079-L3089](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_main.py#L3079-L3089)
- Serialization tests parameterize UUID, IP, secret, temporal, collection, Decimal, enum, and model outputs; core JSON tests assert partial parsing and base64 byte round-trips including invalid encoding. — [tests/test_json.py#L60-L94](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_json.py#L60-L94) [pydantic-core/tests/test_json.py#L181-L211](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/tests/test_json.py#L181-L211)
- Function-call tests inspect preserved wrapper signatures, configuration-driven return validation, coercion in decorated constructors, and asynchronous return-validation failures. — [tests/test_validate_call.py#L31-L42](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_validate_call.py#L31-L42) [tests/test_validate_call.py#L942-L947](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_validate_call.py#L942-L947) [tests/test_validate_call.py#L985-L994](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_validate_call.py#L985-L994) [tests/test_validate_call.py#L1087-L1105](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_validate_call.py#L1087-L1105)
- Plugin tests assert schema identity/settings and JSON success/error callbacks; the mutable installation fixture is marked thread-unsafe, and CI separately installs tests/plugin before running its integration suite. — [tests/test_plugins.py#L23-L75](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_plugins.py#L23-L75) [tests/test_plugins.py#L80-L124](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_plugins.py#L80-L124) [.github/workflows/ci.yml#L792-L796](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/ci.yml#L792-L796) [tests/plugin/pyproject.toml#L10-L11](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/plugin/pyproject.toml#L10-L11)
- Core model tests directly construct SchemaValidator graphs and assert instance dictionaries, extras, and explicit-field tracking; CI defines core pytest and cargo test on Ubuntu, macOS, and Windows. — [pydantic-core/tests/validators/test_model.py#L16-L49](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/tests/validators/test_model.py#L16-L49) [pydantic-core/tests/validators/test_model.py#L52-L84](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/tests/validators/test_model.py#L52-L84) [.github/workflows/ci.yml#L437-L474](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/ci.yml#L437-L474)
- Documentation tests discover and execute examples with platform/skip conditions and explicitly skip v1 docstrings; Mypy tests require --test-mypy, while CI separately invokes Pyright, Mypy, and Pyrefly integration targets. Coverage configuration omits deprecated and v1 modules. — [tests/test_docs.py#L167-L175](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_docs.py#L167-L175) [tests/test_docs.py#L191-L207](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_docs.py#L191-L207) [tests/mypy/test_mypy.py#L40-L44](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/mypy/test_mypy.py#L40-L44) [.github/workflows/ci.yml#L845-L855](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/ci.yml#L845-L855) [pyproject.toml#L276-L289](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L276-L289)
- CI defines Python/platform matrices, CodSpeed workloads, scheduled family integration tests, dependency-boundary cases, and conditional downstream FastAPI tests; none supplies an executed result in this investigation. — [.github/workflows/ci.yml#L717-L765](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/ci.yml#L717-L765) [.github/workflows/codspeed.yml#L50-L63](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/codspeed.yml#L50-L63) [.github/workflows/integration.yml#L3-L28](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/integration.yml#L3-L28) [.github/workflows/dependencies-check.yml#L26-L42](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/dependencies-check.yml#L26-L42) [.github/workflows/third-party.yml#L37-L77](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/third-party.yml#L37-L77)

## Risk map

These are source-observed trust boundaries and maintenance hazards, not confirmed vulnerabilities. Validation can intentionally execute application callbacks, resolve annotations, import modules, and load installed plugins. Legacy parsing and filesystem types expose explicit file/input boundaries beyond ordinary in-memory validation. Cross-language schema contracts, cached validators, and output policy have broad effects across public APIs.
- create_model explicitly warns that resolving string annotations may execute arbitrary code; annotation evaluation delegates to version-dependent typing._eval_type using supplied namespaces. — [pydantic/main.py#L1829-L1832](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1829-L1832) [pydantic/_internal/_typing_extra.py#L344-L363](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_typing_extra.py#L344-L363) [pydantic/_internal/_typing_extra.py#L416-L452](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_typing_extra.py#L416-L452)
- ImportString routes string values to import_module and optional getattr, including a dotted-path fallback; this field type crosses into module execution rather than merely checking text. — [pydantic/types.py#L1011-L1023](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/types.py#L1011-L1023) [pydantic/_internal/_validators.py#L67-L75](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_validators.py#L67-L75) [pydantic/_internal/_validators.py#L96-L127](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_validators.py#L96-L127)
- Plugin discovery loads installed entry points automatically unless disabled; callbacks receive inputs/results/errors, and callback exceptions are not isolated from callers by build_wrapper. — [pydantic/plugin/_loader.py#L27-L56](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/plugin/_loader.py#L27-L56) [pydantic/plugin/_schema_validator.py#L118-L135](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/plugin/_schema_validator.py#L118-L135)
- Deprecated load_file reads the caller-supplied path directly, and load_str_bytes invokes pickle.loads only when pickle is selected and allow_pickle=True; the default rejects pickle decoding. — [pydantic/deprecated/parse.py#L27-L55](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/deprecated/parse.py#L27-L55) [pydantic/deprecated/parse.py#L61-L81](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/deprecated/parse.py#L61-L81)
- PathType validators inspect arbitrary supplied paths using is_file/is_dir/is_socket/exists; they neither constrain paths to a repository root nor reserve a new path after checking it. — [pydantic/types.py#L1317-L1345](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/types.py#L1317-L1345)
- model_construct bypasses validation, including extra='forbid' errors, and model_copy(update=...) applies unvalidated updates; treating either as a fresh input-validation boundary would violate its documented contract. — [pydantic/main.py#L334-L351](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L334-L351) [pydantic/main.py#L421-L426](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L421-L426) [pydantic/main.py#L456-L468](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L456-L468)
- Secret wrappers retain recoverable plaintext through get_secret_value and mask JSON output; error input hiding defaults to False, and ordinary validation-error tests include rejected input values. — [pydantic/types.py#L1549-L1559](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/types.py#L1549-L1559) [pydantic/types.py#L1753-L1761](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/types.py#L1753-L1761) [pydantic/_internal/_config.py#L291-L294](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_config.py#L291-L294) [tests/test_main.py#L89-L105](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_main.py#L89-L105)
- Schema compatibility and cache reuse are maintenance hotspots: import checks an exact core version, while forced model rebuilds use a global lock, replace compiled objects with mocks, and disable prebuilt reuse to avoid stale references. — [pydantic/version.py#L77-L98](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/version.py#L77-L98) [pydantic/main.py#L701-L744](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L701-L744) [pydantic/_internal/_model_construction.py#L651-L661](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L651-L661)

## Extension points

Most application extensions attach to public schema hooks, Annotated metadata, decorators, factories, or plugin protocols. JSON Schema generation offers an explicit generator subclass boundary separate from executable-schema generation. Installed validation plugins wrap three input methods without replacing the underlying Rust validator. Adding a native schema kind requires coordination with fixed dispatch and schema definitions.
- Custom types can implement __get_pydantic_core_schema__; GenerateSchema supplies CallbackGetCoreSchemaHandler and normalizes returned definitions/references, while skipping BaseModel's compatibility implementation. — [pydantic/_internal/_generate_schema.py#L953-L992](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_generate_schema.py#L953-L992)
- Annotated handlers such as AfterValidator and PlainSerializer compose a generated inner schema with Python callbacks and, for serializers, an optional generated return schema. — [pydantic/functional_validators.py#L75-L87](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/functional_validators.py#L75-L87) [pydantic/functional_serializers.py#L65-L86](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/functional_serializers.py#L65-L86)
- field_validator and field_serializer register PydanticDescriptorProxy metadata; class construction collects it, and _common_field_schema applies matching field handlers. — [pydantic/functional_validators.py#L503-L520](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/functional_validators.py#L503-L520) [pydantic/functional_serializers.py#L296-L306](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/functional_serializers.py#L296-L306) [pydantic/_internal/_model_construction.py#L146-L151](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L146-L151) [pydantic/_internal/_generate_schema.py#L1269-L1312](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_generate_schema.py#L1269-L1312)
- JSON Schema customization uses __get_pydantic_json_schema__ metadata hooks or a GenerateJsonSchema subclass supplied to model_json_schema; schema tags map to named *_schema methods. — [pydantic/_internal/_generate_schema.py#L796-L801](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_generate_schema.py#L796-L801) [pydantic/json_schema.py#L324-L340](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L324-L340) [pydantic/json_schema.py#L2733-L2739](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L2733-L2739) [pydantic/json_schema.py#L2767-L2778](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L2767-L2778)
- Validation instrumentation plugins register in entry-point group pydantic and implement new_schema_validator, returning optional Python/JSON/string handlers; PYDANTIC_DISABLE_PLUGINS supports global disablement or named exclusions. — [tests/plugin/pyproject.toml#L10-L11](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/plugin/pyproject.toml#L10-L11) [pydantic/plugin/__init__.py#L37-L67](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/plugin/__init__.py#L37-L67) [pydantic/plugin/_loader.py#L27-L48](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/plugin/_loader.py#L27-L48)
- create_model accepts bases, configuration, validators, namespace attributes, and field definitions, checks namespace clashes, and delegates class creation to the resolved metaclass. — [pydantic/main.py#L1834-L1843](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1834-L1843) [pydantic/main.py#L1873-L1908](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1873-L1908) [pydantic/main.py#L1914-L1939](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1914-L1939)
- Native validators plug into BuildValidator implementations selected by EXPECTED_TYPE in build_validator_inner; unknown type tags error, and supported executable schema kinds are constrained by the Python/Rust contract. — [pydantic-core/src/validators/mod.rs#L538-L564](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L538-L564) [pydantic-core/src/validators/call.rs#L25-L43](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/call.rs#L25-L43) [docs/internals/architecture.md#L39-L45](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/docs/internals/architecture.md#L39-L45)
- The Mypy plugin factory returns PydanticPlugin, whose hooks transform BaseModel subclasses, model metaclasses, from_orm calls, and create_model dynamic classes; configuration data participates in cache invalidation. — [pydantic/mypy.py#L121-L176](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/mypy.py#L121-L176)

## Contributor handoff

Start from the schema boundary and trace the specific public API before changing shared internals. Tests and CI were inspected, not executed, so future implementation work must establish its own validation results. The investigation covered selected source, tests, configuration, and every listed workflow entrypoint, but remains a bounded inventory. Keep version coupling, deferred construction, output types, and validation bypasses explicit in acceptance criteria.
- Read architecture.md, ModelMetaclass/complete_model_class, GenerateSchema, and the relevant Rust validator first; executable core schemas and exported JSON Schema are separate contracts. — [docs/internals/architecture.md#L12-L45](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/docs/internals/architecture.md#L12-L45) [pydantic/_internal/_model_construction.py#L621-L661](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L621-L661) [pydantic/json_schema.py#L2767-L2778](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/json_schema.py#L2767-L2778)
- Keep Pydantic's compatible-core constant, root dependency pin, and Cargo version synchronized; this checkout declares Pydantic 2.14.0b2 with core 2.49.0. — [pydantic/version.py#L11-L22](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/version.py#L11-L22) [pyproject.toml#L45-L53](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L45-L53) [pydantic-core/Cargo.toml#L1-L4](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/Cargo.toml#L1-L4)
- Prefer the repository uv workspace and existing Makefile targets; root formatting is Ruff with 120-column lines, single quotes, Python 3.10 targeting, and Google-style docstrings. — [pyproject.toml#L204-L225](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L204-L225) [pyproject.toml#L247-L251](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L247-L251) [pyproject.toml#L273-L274](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L273-L274) [Makefile#L13-L40](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L13-L40)
- For authorized changes, begin with focused model, serialization, call, or plugin tests; broader existing checks include make test, make lint, and Rust cargo test. These commands and CI were inspected only, not executed here. — [tests/test_main.py#L78-L116](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_main.py#L78-L116) [tests/test_json.py#L60-L94](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_json.py#L60-L94) [tests/test_validate_call.py#L31-L42](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_validate_call.py#L31-L42) [tests/test_plugins.py#L35-L75](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/test_plugins.py#L35-L75) [Makefile#L42-L75](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L42-L75) [.github/workflows/ci.yml#L472-L474](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/ci.yml#L472-L474)
- Static typing needs separate checks: Mypy integration is skipped without --test-mypy, and Makefile exposes distinct Mypy-plugin, Pyright, Mypy, and Pyrefly targets. — [tests/mypy/test_mypy.py#L40-L44](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/tests/mypy/test_mypy.py#L40-L44) [Makefile#L53-L71](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L53-L71)
- Preserve delayed-build and forced-rebuild semantics: unresolved annotations can install mocks, model_rebuild resolves namespaces under a lock, and forced completion prevents reuse of stale compiled objects. — [pydantic/_internal/_model_construction.py#L627-L641](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L627-L641) [pydantic/main.py#L701-L744](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L701-L744) [pydantic/_internal/_model_construction.py#L651-L661](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L651-L661)
- Acceptance tests should preserve BaseModel JSON str versus TypeAdapter JSON bytes, alias/name validation guards, unvalidated construction/copy updates, and RootModel's rejection of extra configuration. — [pydantic/main.py#L587-L604](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L587-L604) [pydantic/type_adapter.py#L651-L668](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/type_adapter.py#L651-L668) [pydantic/main.py#L784-L798](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L784-L798) [pydantic/main.py#L334-L345](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L334-L345) [pydantic/main.py#L421-L426](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L421-L426) [pydantic/root_model.py#L54-L70](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/root_model.py#L54-L70)
- Contributor policy targets new features at v2 and requires understanding AI-assisted changes; the assignment workflow closes non-exempt PRs whose referenced closing issues are not assigned to the author, while allowing PRs with no closing references through that check. — [docs/contributing.md#L27-L35](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/docs/contributing.md#L27-L35) [docs/contributing.md#L45-L54](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/docs/contributing.md#L45-L54) [.github/workflows/enforce-issue-assignment.yml#L13-L18](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/enforce-issue-assignment.yml#L13-L18) [.github/workflows/enforce-issue-assignment.yml#L48-L78](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/enforce-issue-assignment.yml#L48-L78)

Source repository: https://github.com/pydantic/pydantic
Full evidence corpus: https://github.com/Codevetter/codevetter/tree/main/benchmarks/repo-unpacks/pydantic.json

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
