You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Track rc4 codegen follow-ups from Argus review #907
Follow-ups from Argus review on PR #906. These were non-blocking for the rc4 schema update, but should be tracked before the next schema regen that introduces named open-payload classes.
Extend scripts/post_generate_fixes.py_set_class_extra_allow to handle compact model_config = ConfigDict(extra=...) forms and add a unit test for compact extra='forbid' -> extra='allow'.
Harden _ensure_configdict_import for files without an existing from pydantic import ... line.
Rework _open_payload_class_names title-less root fallback so it cannot target the first enum in a multi-class generated file.
Revisit tests/test_extra_policy.py::_schema_allows_extra handling of x-adcp-open-payload: false; either leave it unhandled until the spec lands or fail CI if source schemas set it.
Document the rc4 verify_brand_claim(s) success response change where signed_response is now required.
Consider stabilizing or documenting PricingCurrency, which is codegen-derived from an inline schema.
Improve SCHEMA_DELTAS.md output for human-readable rc.2 -> rc.4 changes instead of reporting only "No field-shape changes detected."
code-reviewer: Items 1–3 are latent correctness bugs — compact ConfigDict falls through to "insert fresh block" producing two model_config declarations; missing pydantic import leaves ConfigDict undefined in the generated file; first-^class match for the title-less root fallback silently targets enum classes in multi-class files; all non-breaking, one PR; item 4 blocked-on feat(codegen): consume x-adcp-open-payload in generated models #902.
docs-expert: Item 5 is clean additive docs (non-breaking, types already enforce signed_response required); item 6 needs a design call first (alias vs. dedup vs. prose, plus two duplicate PricingCurrency definitions to resolve); item 7 is a codegen/CI snapshot-management problem, not a prose edit.
My take: Items 1–3 are correctness-blocking for the next schema regen that introduces named open-payload classes or compact ConfigDict forms — they should land before that regen. Items 6–7 are pre-design; they should remain open as follow-ons with a decision from @bokelley on scope.
Items 1–3 — one PR (scripts/post_generate_fixes.py + tests/test_extra_policy.py):
_set_class_extra_allow: add compact model_config = ConfigDict(extra=...) one-liner match before the multi-line fallback; a second model_config block breaks Pydantic at import time
_ensure_configdict_import: when ConfigDict is in content but no from pydantic import line exists, prepend from pydantic import ConfigDict instead of silently returning
_first_generated_class_name / _open_payload_class_names: exclude classes whose header contains an Enum base from the title-less root sentinel so multi-class files are safe
Unit tests for compact extra='forbid' → extra='allow', no-pydantic-import injection, multi-class file with leading enum; no public API changes, no semver bump
Item 4: Blocked-on #902 — the x-adcp-open-payload: false enforcement decision belongs inside that work. Add an inline comment in _schema_allows_extra marking the passive short-circuit as intentional pending #902.
Item 5 (separate PR): Add CHANGELOG entry and a docs note for signed_response now required on VerifyBrandClaimSuccessResponse; the generated types already enforce this, docs is the only gap.
Items 6–7: Deferred — item 6 needs a design decision (which of alias/dedup/prose, and which of the two duplicate PricingCurrency definitions is authoritative); item 7 needs snapshot-management architecture in generate_types.py/CI. Both should stay open here as named follow-ons.
The compact ConfigDict rewrite, missing-pydantic-import injection, and enum-safe title-less fallback are implemented in scripts/post_generate_fixes.py with focused tests in tests/test_extra_policy.py.
x-adcp-open-payload: false is now covered by a regression and remains non-widening.
The required signed_response change is documented in CHANGELOG.md and enforced by public-surface tests.
PricingCurrency is a tested public export from adcp and adcp.types.
SCHEMA_DELTAS.md now reports detailed added/generated symbols and field-shape changes instead of only the former empty summary.
Current verification: 280 collision/codegen-related tests passed while auditing the remaining issue queue after #1072.
Activity
bokelley commentedon May 30, 2026
Triage
Classification: Enhancement — codegen script hardening + rc4 docs follow-ups (tracking issue)
Bucket(s): client (items 1–3), docs (item 5)
Status: ready-to-implement
What the experts said:
ConfigDictfalls through to "insert fresh block" producing twomodel_configdeclarations; missing pydantic import leavesConfigDictundefined in the generated file; first-^classmatch for the title-less root fallback silently targets enum classes in multi-class files; all non-breaking, one PR; item 4 blocked-on feat(codegen): consume x-adcp-open-payload in generated models #902.signed_responserequired); item 6 needs a design call first (alias vs. dedup vs. prose, plus two duplicatePricingCurrencydefinitions to resolve); item 7 is a codegen/CI snapshot-management problem, not a prose edit.My take: Items 1–3 are correctness-blocking for the next schema regen that introduces named open-payload classes or compact
ConfigDictforms — they should land before that regen. Items 6–7 are pre-design; they should remain open as follow-ons with a decision from @bokelley on scope.Items 1–3 — one PR (
scripts/post_generate_fixes.py+tests/test_extra_policy.py):_set_class_extra_allow: add compactmodel_config = ConfigDict(extra=...)one-liner match before the multi-line fallback; a secondmodel_configblock breaks Pydantic at import time_ensure_configdict_import: whenConfigDictis in content but nofrom pydantic importline exists, prependfrom pydantic import ConfigDictinstead of silently returning_first_generated_class_name/_open_payload_class_names: exclude classes whose header contains anEnumbase from the title-less root sentinel so multi-class files are safeextra='forbid'→extra='allow', no-pydantic-import injection, multi-class file with leading enum; no public API changes, no semver bumpItem 4: Blocked-on #902 — the
x-adcp-open-payload: falseenforcement decision belongs inside that work. Add an inline comment in_schema_allows_extramarking the passive short-circuit as intentional pending #902.Item 5 (separate PR): Add CHANGELOG entry and a docs note for
signed_responsenow required onVerifyBrandClaimSuccessResponse; the generated types already enforce this, docs is the only gap.Items 6–7: Deferred — item 6 needs a design decision (which of alias/dedup/prose, and which of the two duplicate
PricingCurrencydefinitions is authoritative); item 7 needs snapshot-management architecture ingenerate_types.py/CI. Both should stay open here as named follow-ons.Triaged by Claude Code. Session: https://claude.ai/code/cse_01SwCsRM6poDDTB97iiT7aJd
Generated by Claude Code
fix(codegen): rewrite compact ConfigDict extra in place (#935)
bokelley commentedon Aug 24, 2026
Closing as complete on current main.
Current verification: 280 collision/codegen-related tests passed while auditing the remaining issue queue after #1072.