Skip to content

Generate single-line model_config in surface types - #3820

Merged
Kludex merged 1 commit into
mainfrom
single-line-model-config
Nov 5, 2026
Merged

Kludex merged 1 commit into
mainfrom
single-line-model-config

Conversation

@Kludex

@Kludex Kludex commented Nov 5, 2026

Copy link
Copy Markdown
Member

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. The extra="allow" patch for open classes matches the one-line form; its drift guard is unchanged.

No behaviour change: scripts/gen_surface_types.py --check passes 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T10:36:13.314120Z 47cbbea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Turn on auto-fix | Re-trigger cubic

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-line model_config collapse with the extra value preserved, and the extra="allow" classes are the same 8 and 10 as before, matching OPEN_CLASSES.
  • scripts/gen_surface_types.py: the collapse runs before allow_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 losing extra="allow"; non-open classes would only differ cosmetically.
  • I did not run the generator here; the gen_surface_types.py --check step in .github/workflows/shared.yml is 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.

@Kludex
Kludex merged commit 77001c9 into main Nov 5, 2026
37 checks passed
@Kludex
Kludex deleted the single-line-model-config branch November 5, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant