Repository navigation
Generate single-line model_config in surface types - #3820
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
LGTM — this is a formatting-only regeneration; no model's extra setting changes.
What was reviewed:
- Both generated modules: all 301 changed hunks (153 in
_v2025_11_25, 148 in_v2026_07_28) are the same three-line-to-one-linemodel_configcollapse with theextravalue preserved, and theextra="allow"classes are the same 8 and 10 as before, matchingOPEN_CLASSES. scripts/gen_surface_types.py: the collapse runs beforeallow_open_class_extras, whose regex now targets the one-line form. If codegen's layout ever stops matching, open classes stay unpatched and the existing count assert fails instead of silently losingextra="allow"; non-open classes would only differ cosmetically.- I did not run the generator here; the
gen_surface_types.py --checkstep in.github/workflows/shared.ymlis what confirms the checked-in output matches it.
Extended reasoning...
The change adds one re.sub and adjusts one regex in scripts/gen_surface_types.py (+4/-1), and regenerates the two internal surface modules under src/mcp-types/mcp_types/ (+301/-903, an exact 1:3 ratio). It touches no auth, injection or data-exposure surface; the only behaviour-relevant setting is pydantic's extra mode, and every hunk keeps it the same (no ignore/allow flips, and the allow-listed classes are identical at base and HEAD). The existing drift assert still fires if the open-class patch stops matching. No CODEOWNERS file covers these paths and there are no open objections on the timeline. Approval rests on the change being mechanical and fully enumerated, with CI's --check step guarding generator-versus-output drift that could not be run in this session.
Every generated wire model spelled
model_config = ConfigDict(extra=...)across three lines. The generator now folds it onto one, which drops about 600 lines from the two surface modules. Theextra="allow"patch for open classes matches the one-line form; its drift guard is unchanged.No behaviour change:
scripts/gen_surface_types.py --checkpasses and the regenerated modules differ only in formatting.AI Disclaimer
This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.