Repository navigation
feat(api): add delegation controls and prompt cache lifetimes - #1272
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
Castiron custom codeEvaluated main: Trusted main policy: ✅ No new custom-code files detected. 0 mixed files remain; 0 existing customizations changed. Compared A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 40025033845 --repo openai/openai-java \
--name castiron-custom-code-40025033845-1 --dir /tmp/castiron-custom-code-40025033845-1
git apply --stat /tmp/castiron-custom-code-40025033845-1/custom-code.patch
cat /tmp/castiron-custom-code-40025033845-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 0ce5f3f17518fb2390d31ec9a4de0a9dda6d9946 f73549f9aef3fbc3b99dcf6f9ef724d8fb7d0f9d
python3 scripts/castiron/custom_code_report.py report \
--base 0ce5f3f17518fb2390d31ec9a4de0a9dda6d9946 \
--head f73549f9aef3fbc3b99dcf6f9ef724d8fb7d0f9d --target-branch main --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-f73549f9aef3
cat /tmp/castiron-custom-code-f73549f9aef3/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
markstuart-oai
left a comment
There was a problem hiding this comment.
Reviewed 36486cdae264fa37c78314dabe64fd5ba8122a5d. The delegation and cache lifetime changes preserve optional defaults and unknown values. Agent-tool visitors keep their defaults, and the shared TTL model avoids repeating the enum in each breakpoint type. I found no blocking issues.
Source-only review; I did not run candidate code or tests. Completed hosted checks passed. Still running: CI / build, OkTest.
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed 36486cdae264fa37c78314dabe64fd5ba8122a5d. Requesting changes for the review-revocation race.
[P2] Retry stale main snapshots before abandoning review revocation. At .github/workflows/castiron-custom-code-comment.yml:127, requiresHuman can throw when review-required fetches a newer main than the captured SHA (custom_code_policy.py:572-573). Neither this await nor the helper catches that freshness error. The job exits before invalidating prior successful PR/queue policy statuses, so an approval dismissal/edit can leave the old authorization intact. Retry discovery on this explicit stale-main result, or safely invalidate authenticated affected statuses before exiting. Add coverage with existing successful statuses and main advancing between the read and fetch.
Hosted CI: no failed checks observed; still running: CI / tests / sdk, CI / tests / r8, CI / API compatibility, OkTest. Independent static review and coordinator cross-check; no candidate code or local tests executed.
Withdrawing my approval: I missed the review-revocation race in the shared Castiron workflow. If main advances between getRef and the policy helper fetch, the uncaught stale-main error exits before successful policy statuses are invalidated. A corrective comment review follows.
markstuart-oai
left a comment
There was a problem hiding this comment.
Correction to my earlier review: I missed this race and have withdrawn my approval. Reviewed 36486cdae264fa37c78314dabe64fd5ba8122a5d. I confirmed the existing review-revocation finding: if main advances between getRef and the helper fetch, the uncaught stale-main error exits before prior successful PR and queue policy statuses are invalidated. Retry that specific stale snapshot or safely invalidate the affected statuses before exiting. I have not duplicated the existing comment.
Source-only review; I did not run candidate code or tests. Completed hosted checks passed or were skipped. Still running: OkTest.
Castiron-Internal-PR: openai/openai-java-internal#355 Castiron-Source-SHA: 58efdbf70ac0b67c982c5e432d30a4b3aa87fb5a Castiron-Public-Base-SHA: 0ce5f3f
36486cd to
f73549f
Compare
|
@codex review Updated the candidate to retry review-policy evaluation when main advances during evaluation. Added a regression covering invalidation of existing successful PR and queue statuses. Please review the current head again. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f73549f9ae
ℹ️ 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".
| requiresReview = await requiresHuman(pr, mainSha); | ||
| } catch (error) { | ||
| const {data: currentMain} = await github.rest.git.getRef({...context.repo, ref: 'heads/main'}); | ||
| if (currentMain.object.sha !== mainSha) continue; | ||
| throw error; |
There was a problem hiding this comment.
Recheck main after a successful policy decision
If main advances after the Python helper fetches the old main ref but before it returns requires_human: true, this catch block never runs and the only subsequent main-freshness check is inside the !requiresReview branch. The handler therefore invalidates successful PR and queue statuses using the stale policy decision and may leave them pending if the requested rerun fails. Recheck heads/main after every successful evaluation and retry when it differs from mainSha, regardless of the decision.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I checked this against requires_human_policy_review and local Git-history probes. With fixed PR/base commits, advancing main preserves a true decision: budget and ratchet edits are unchanged; existing pins compare immutable policies; bootstrap pins become older than main and still require review. A false decision can become true, but that branch already rechecks main. I don't see a stale-decision defect here under normal main advancement.
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Re-reviewed f73549f. The main-ref retry addresses the earlier review-invalidation race. No remaining blocking findings in the incremental change; existing Java visitor and TTL fixes are retained.
Static review only; no local tests run. Hosted CI remains in progress and will be followed up separately.
|
@codex review Please re-review the current PR head, including any unresolved findings from the previous round. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Adds Live delegation controls, prompt cache lifetimes, and agent scheduling tools.
Changes