Skip to content

test: harden release compatibility contracts - #4297

Open
seratch wants to merge 4 commits into
mainfrom
test/v020-release-hardening-contracts
Open

test: harden release compatibility contracts#4297
seratch wants to merge 4 commits into
mainfrom
test/v020-release-hardening-contracts

Conversation

@seratch

@seratch seratch commented Aug 8, 2026

Copy link
Copy Markdown
Member

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.

@seratch seratch added the project label Aug 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread .github/scripts/update_released_api_contract.py Outdated
Comment thread integration_tests/_contract_support.py Outdated
Comment thread integration_tests/_contract_support.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment on lines +164 to +166
default = entry["default"]
if isinstance(default, dict) and default.get("kind") == "required":
errors.append(f"{name}.{entry['name']} added a required parameter")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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": [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment on lines +110 to +111
should_track = name in tracked_constructors
if not should_track and inspect.isclass(value):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant