Skip to content

[codex] Test extension API contracts - #26835

Merged
anp-oai merged 4 commits into
mainfrom
codex/extension-api-tests
Jun 9, 2026
Merged

[codex] Test extension API contracts#26835
anp-oai merged 4 commits into
mainfrom
codex/extension-api-tests

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Why

codex-extension-api defines contracts shared by extension crates and their hosts, but it had no direct test suite. Host and feature tests cover downstream behavior, while regressions in the API crate's own typed state, registry ordering, and capability adapters could go unnoticed.

What

  • Add public-surface integration tests for ExtensionData, including concurrent initialization and poison recovery.
  • Cover contributor registration order, approval short-circuiting, event sink retention, no-op response injection, and closure-based agent spawning.
  • Add the test-only dependencies used by the suite.

Validation

  • just test -p codex-extension-api
  • just argument-comment-lint -p codex-extension-api
  • just bazel-lock-check

@anp-oai anp-oai changed the title [codex] Add extension API contract tests [codex] Test extension API contracts Jun 6, 2026
@anp-oai
anp-oai marked this pull request as ready for review June 7, 2026 01:17
@anp-oai
anp-oai requested a review from a team as a code owner June 7, 2026 01:17

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 705ff9478e

ℹ️ 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 codex-rs/ext/extension-api/Cargo.toml
Comment thread codex-rs/ext/extension-api/tests/state.rs
Comment thread codex-rs/ext/extension-api/tests/registry.rs
anp-oai added a commit that referenced this pull request Jun 8, 2026
Comment thread codex-rs/deny.toml
anp-oai added a commit that referenced this pull request Jun 9, 2026
## Why

The PR babysitter could surface inline comments from a GitHub review
that was still in the `PENDING` state. That allowed Codex to start
acting on feedback before the reviewer submitted it.

## What changed

- Correlate inline comments with their parent review and ignore pending
reviews and their comments.
- Remove pending review IDs from saved watcher state so the feedback
surfaces normally after publication.
- Update the skill instructions and add regression coverage for the
draft-to-published transition.

## Validation

- `python3 -m pytest
.codex/skills/babysit-pr/scripts/test_gh_pr_watch.py`
- Skill package validation with `quick_validate.py`
- Live verification on #26835: the draft comment stayed hidden and
surfaced after the review was submitted.

@jif-oai jif-oai 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.

Mostly nits. Pre-approving

Comment thread codex-rs/.cargo/audit.toml
Comment thread codex-rs/ext/extension-api/tests/state.rs Outdated
Comment thread codex-rs/ext/extension-api/tests/registry.rs Outdated
Comment thread codex-rs/ext/extension-api/tests/state.rs Outdated
Comment thread codex-rs/ext/extension-api/tests/registry.rs Outdated
@anp-oai
anp-oai force-pushed the codex/extension-api-tests branch from a26e6b4 to 3a804ef Compare June 9, 2026 18:23
@anp-oai
anp-oai enabled auto-merge (squash) June 9, 2026 18:26
@anp-oai
anp-oai merged commit 99da697 into main Jun 9, 2026
31 checks passed
@anp-oai
anp-oai deleted the codex/extension-api-tests branch June 9, 2026 18:30
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants