fix: validate generic TypedDict state assignments

HA
6h ago
+188-48

Summary

Closes #7995.

  • Validate generic TypedDict fields against their specialized types in development and check the dictionary shape in production.
  • Honor postponed required and optional key annotations, and handle inherited type arguments that Python 3.11 can omit.
  • Cover standard-library and backport TypedDict classes, nested containers, and typed extra items.

Tests

  • 652 passed on Python 3.11 and 649 passed on Python 3.14 across the type, field, and state unit suites.
  • Verified state assignments in development and production, plus the reported invalid values.
  • Ruff formatting, lint, changelog validation, and git diff --check passed.