Skip to content

ci: publish Castiron statuses despite stale PR base metadata - #687

Merged
jbeckwith-oai merged 1 commit into
mainfrom
codex/castiron-stale-base-statuses
Sep 8, 2026
Merged

ci: publish Castiron statuses despite stale PR base metadata#687
jbeckwith-oai merged 1 commit into
mainfrom
codex/castiron-stale-base-statuses

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

GitHub can retain an older base.sha on an open PR after main advances. The Castiron handler treated that metadata as PR identity, so rerunning a valid PR could leave both required budget statuses missing while the publisher appeared green.

Resolve the current PR by its verified repository, branch, and head identity. Continue evaluating current-main policy against trusted Git objects and checking the actual evaluation revisions before publication. Publish failing statuses and fail the publisher job when evaluation is unavailable, stale, or fails. Recheck main before writing the report comment.

Validation

  • Castiron suite passed: 55 tests, with the optional compiler contract test skipped (CASTIRON_TEST_BIN is unset), including stale PR base metadata, stale heads, evaluation base changes, failure visibility, and comment publication freshness.
  • Ruff, actionlint for both Castiron workflows, and git diff --check passed.
  • Security review and two consecutive clean adversarial-review rounds, with two independent fresh-context reviewers per round.

The trusted workflow runs from main, so the updated publisher takes effect after this PR merges. Budget policy, accounting, and permissions are unchanged.

@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner September 8, 2026 18:52
@openai-sdks

openai-sdks Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

236/236 SDK tests passed in 9.015s for Ruby SDK PR #687.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 145ms
tests/chat-completions-create.test.ts ✅ Passed 228ms
tests/chat-completions-stream.test.ts ✅ Passed 144ms
tests/files-content-binary.test.ts ✅ Passed 146ms
tests/files-create-multipart.test.ts ✅ Passed 142ms
tests/files-list-pagination.test.ts ✅ Passed 165ms
tests/initialize-config.test.ts ✅ Passed 98ms
tests/instance-isolation.test.ts ✅ Passed 204ms
tests/models-list.test.ts ✅ Passed 188ms
tests/responses-background-lifecycle.test.ts ✅ Passed 120ms
tests/responses-body-method-errors.test.ts ✅ Passed 443ms
tests/responses-cancel-timeout.test.ts ✅ Passed 250ms
tests/responses-cancel.test.ts ✅ Passed 209ms
tests/responses-compact-retries.test.ts ✅ Passed 244ms
tests/responses-compact.test.ts ✅ Passed 240ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 215ms
tests/responses-create-advanced.test.ts ✅ Passed 201ms
tests/responses-create-disconnect.test.ts ✅ Passed 137ms
tests/responses-create-errors.test.ts ✅ Passed 338ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 136ms
tests/responses-create-retries.test.ts ✅ Passed 238ms
tests/responses-create-stream-failures.test.ts ✅ Passed 129ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 219ms
tests/responses-create-stream-wire.test.ts ✅ Passed 1.983s
tests/responses-create-stream.test.ts ✅ Passed 146ms
tests/responses-create-terminal-states.test.ts ✅ Passed 275ms
tests/responses-create-timeout.test.ts ✅ Passed 282ms
tests/responses-create.test.ts ✅ Passed 162ms
tests/responses-delete.test.ts ✅ Passed 137ms
tests/responses-input-items-errors.test.ts ✅ Passed 164ms
tests/responses-input-items-list.test.ts ✅ Passed 208ms
tests/responses-input-items-options.test.ts ✅ Passed 128ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 267ms
tests/responses-input-tokens-count.test.ts ✅ Passed 153ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.204s
tests/responses-not-found-errors.test.ts ✅ Passed 327ms
tests/responses-parse.test.ts ✅ Passed 140ms
tests/responses-retrieve-retries.test.ts ✅ Passed 144ms
tests/responses-retrieve.test.ts ✅ Passed 245ms
tests/responses-stored-method-errors.test.ts ✅ Passed 631ms
tests/retry-behavior.test.ts ✅ Passed 3.387s
tests/sdk-error-shape.test.ts ✅ Passed 512ms

View OkTest run #34265600900

SDK merge (ed252c607be3) · head (fe571bae6877) · base (107973fe5db3) · OkTest (08ec4299e769)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 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-09-08T18:53:56.150448Z fe571ba PR opened
🔒 Security Review Completed 2026-09-08T18:55:37.467215Z fe571ba 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.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

50 mixed files remain; 2 existing customizations changed.

Compared 107973fe5db3fe571bae6877. Generated baselines verified.

File Result Current custom patch
scripts/castiron/custom_code_report.py Existing customization changed +201 / −44
scripts/castiron/test_custom_code_report.py Existing customization changed +436 / −51
48 existing customizations unchanged
  • lib/openai.rb
  • lib/openai/client.rb
  • lib/openai/models/audio/transcription_create_response.rb
  • lib/openai/models/chat/chat_completion_message.rb
  • lib/openai/models/chat/chat_completion_message_function_tool_call.rb
  • lib/openai/models/chat/completion_create_params.rb
  • lib/openai/models/response_format_json_schema.rb
  • lib/openai/models/responses/function_tool.rb
  • lib/openai/models/responses/response.rb
  • lib/openai/models/responses/response_create_params.rb
  • lib/openai/models/responses/response_format_text_config.rb
  • lib/openai/models/responses/response_format_text_json_schema_config.rb
  • lib/openai/models/responses/response_function_tool_call.rb
  • lib/openai/models/responses/response_function_web_search.rb
  • lib/openai/models/responses/response_output_text.rb
  • lib/openai/models/responses/tool.rb
  • lib/openai/resources/beta/threads.rb
  • lib/openai/resources/chat/completions.rb
  • lib/openai/resources/containers/files.rb
  • lib/openai/resources/files.rb
  • lib/openai/resources/responses.rb
  • lib/openai/resources/vector_stores/file_batches.rb
  • lib/openai/resources/vector_stores/files.rb
  • lib/openai/resources/webhooks.rb
  • rbi/openai/client.rbi
  • rbi/openai/models/chat/chat_completion_message.rbi
  • rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi
  • rbi/openai/models/chat/completion_create_params.rbi
  • rbi/openai/models/response_format_json_schema.rbi
  • rbi/openai/models/responses/response.rbi
  • rbi/openai/models/responses/response_create_params.rbi
  • rbi/openai/models/responses/response_function_tool_call.rbi
  • rbi/openai/models/responses/response_function_web_search.rbi
  • rbi/openai/models/responses/response_output_text.rbi
  • rbi/openai/resources/chat/completions.rbi
  • rbi/openai/resources/files.rbi
  • rbi/openai/resources/responses.rbi
  • rbi/openai/resources/vector_stores/file_batches.rbi
  • rbi/openai/resources/vector_stores/files.rbi
  • scripts/castiron/README.md

8 more in the full report.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 34265631834 --repo openai/openai-ruby \
  --name castiron-custom-code-34265631834-1 --dir /tmp/castiron-custom-code-34265631834-1
git apply --stat /tmp/castiron-custom-code-34265631834-1/custom-code.patch
cat /tmp/castiron-custom-code-34265631834-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin 107973fe5db38f5ef5aaee9f590c70d4cf77a1c5 fe571bae6877032015c578161073dabf5e772e0c
python3 scripts/castiron/custom_code_report.py report \
  --base 107973fe5db38f5ef5aaee9f590c70d4cf77a1c5 \
  --head fe571bae6877032015c578161073dabf5e772e0c --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-fe571bae6877
cat /tmp/castiron-custom-code-fe571bae6877/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

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

Reviewed all seven changed files at fe571ba, including the surrounding trusted evaluator, Git-object verification, publisher workflows, and tests. No substantive findings.

The change cleanly separates PR identity from evaluation freshness: repository/ref/head checks remain exact, while the budget evaluator and publication checks use current main independently of PR base metadata. Missing, stale, and failed evaluations produce failing statuses and a visible publisher failure; report comments recheck main after pagination. The existing resolver owns the change, with no new modes or helper layers. Production scripts plus workflows grow by only 3 lines / 240 bytes, and no file crosses 1,000 lines.

Validation: the full Castiron suite ran 55 tests successfully with one optional compiler-contract skip (CASTIRON_TEST_BIN unset); six additional isolated probes passed, covering the stale-metadata status matrix, identity mismatches, a real newer-main budget decrease, comment retry idempotency, replacement-ref isolation, and mocked status transport failures. Reporter checksum and git diff --check passed; observed PR checks were green. Local Ruff was blocked by the package-registry proxy, and actionlint was unavailable. No live publisher or workflow was invoked.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit 0e4c906 Sep 8, 2026
20 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/castiron-stale-base-statuses branch September 8, 2026 19:29
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.

2 participants