Skip to content

fix(runloop): declare SDK model aliases for type checkers#3504

Open
sakinaroufid wants to merge 2 commits into
openai:mainfrom
sakinaroufid:fix/runloop-type-aliases
Open

fix(runloop): declare SDK model aliases for type checkers#3504
sakinaroufid wants to merge 2 commits into
openai:mainfrom
sakinaroufid:fix/runloop-type-aliases

Conversation

@sakinaroufid
Copy link
Copy Markdown

Summary

This pull request fixes the Runloop sandbox backend's exported SDK model aliases so the backend type-checks cleanly without changing runtime behavior.

The Runloop extension already exports RunloopAfterIdle, RunloopLaunchParameters, and RunloopUserParameters as public symbols, but sandbox.py defined them as plain runtime aliases and then reused them in type positions. Pyright and mypy treated those names as variables rather than type aliases and rejected the file when checked directly.

The patch makes those exports explicit TypeAlias declarations and adds a concrete annotation for the launch-parameter payload mapping. It also includes a small test-only typing cleanup for asyncio.eager_task_factory so the branch does not inherit an existing mypy failure from main on the repo's supported Python floor.

Test plan

  • Ran bash .agents/skills/code-change-verification/scripts/run.sh
  • Ran make coverage
  • Ran uv run --python 3.12 pytest tests/test_run_step_execution.py -q -k eager_task_factory
  • Ran env UV_PROJECT_ENVIRONMENT=.venv_310 uv run --python 3.10 pytest tests/test_run_step_execution.py -q -k eager_task_factory

Issue number

N/A

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@sakinaroufid
Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants