test: harden release compatibility contracts - #4297
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5026567c1b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38dab9dcbd
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| default = entry["default"] | ||
| if isinstance(default, dict) and default.get("kind") == "required": | ||
| errors.append(f"{name}.{entry['name']} added a required parameter") |
There was a problem hiding this comment.
Reject optional parameters inserted before released variadics
When a tracked constructor ends in *args—as the committed contract does for AgentsException—adding an optional positional parameter immediately before that variadic is accepted because the new parameter is not required and the old positional prefix is empty. Existing calls then bind their first positional value to the new parameter rather than args, so the compatibility check permits exactly the positional-meaning change it is intended to prevent; reject new positional parameters that precede a released VAR_POSITIONAL.
AGENTS.md reference: AGENTS.md:L80-L84
Useful? React with 👍 / 👎.
| ] | ||
| } | ||
| }, | ||
| "public_modules": [ |
There was a problem hiding this comment.
Add released submodule paths to the contract
At the v0.19.4 baseline, shipped examples already import supported paths such as agents.items, agents.run_context, and agents.stream_events, but none is present in public_modules or canonical_imports. A refactor can therefore move their symbols while retaining the top-level exports and all contract checks will pass even though those released imports break; seed the manifest with the intended submodule paths and identities used by released examples.
AGENTS.md reference: AGENTS.md:L86-L86
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab031791bf
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| should_track = name in tracked_constructors | ||
| if not should_track and inspect.isclass(value): |
There was a problem hiding this comment.
Track signatures for exported public functions
When a released export is a function rather than a class, this condition never records its signature, so changing the positional order or renaming a keyword parameter on APIs such as handoff, function_tool, or trace still passes the release contract as long as the symbol remains exported. Add inspectable public functions to the signature contract so the release gate covers parameter compatibility for all exported runtime APIs.
AGENTS.md reference: AGENTS.md:L80-L80
Useful? React with 👍 / 👎.
This pull request adds release-hardening contracts for public APIs, historical RunState payloads, packaged distributions, runtime symmetry, and credential redaction without changing the runtime public API.
It also adds an explicit local release-preparation command that promotes the candidate's public exports and inspectable classes into the rolling compatibility manifest. The update remains outside credentialed GitHub workflows, preserves manually curated canonical import policy, and can be checked again after rebasing the release branch.