Repository navigation
fix(types): retain serialization schema fields - #1246
Conversation
|
Overall technical verdict for
Non-blocking pre-existing companion defect: CI/full-suite results are still pending with no failures reported. Formal aao review follows ready status. |
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
Removes the -> Any return annotation from AdCPBaseModel's inherited wrap serializer so Pydantic derives the serialization JSON schema from model fields instead of emitting {}, plus a regression test pinning #1243. Wire output is unchanged (annotation affects schema generation only), so the fix: prefix is the correct semver signal — no public-surface break, no forward-compat regression, no generated-code hand-edit, no import-layering violation. The # type: ignore[no-untyped-def] is a specific-code suppression (allowed; only blanket suppressions are flagged). Reviewer found no blocking or Medium findings.
No decision-table trigger fired: no critical/high/medium findings, gated_paths is false, high_risk is false, no no-auto-approve team match, no prior decision. Falls through to row 9. (review_decision is REVIEW_REQUIRED, but row 2 only applies when gated_paths is true.)
Noted as out of scope: the identical pre-existing -> Any in canonical_creative.py, flagged as a follow-up.
AdCPBaseModelannotated its wrap serializer-> Any, causing subclasses that inherit that serializer to emit{}for their serialization JSON Schema. Removing the return annotation lets Pydantic derive the schema from model fields. The regression checks thatNotificationConfigretainssubscriber_id,url, andevent_types.Before:
NotificationConfig.model_json_schema(mode="serialization") == {}. After: it has an object schema with those properties.Validation:
make lint,make typecheck-all, mypy, Ruff, Black, commit hooks, and focused tests pass. Fullmake testpassed: 12,111 passed, 2,397 skipped, 9 deselected, 1 xfailed; 81.54% coverage. All 52 completed CI checks pass, including PostgreSQL conformance. Independent technical review passed 87 related checks. A separate pre-existing serializer override incanonical_creative.pyhas the same annotation issue and is outside this fix.Fixes #1243.