chore: set a 2,000-line custom-code budget - #924
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. |
Castiron custom code✅ No new custom-code files detected. 57 mixed files remain; 0 existing customizations changed. Compared 57 existing customizations unchanged
17 more in the full report. 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 32501931551 --repo openai/openai-java \
--name castiron-custom-code-32501931551-1 --dir /tmp/castiron-custom-code-32501931551-1
git apply --stat /tmp/castiron-custom-code-32501931551-1/custom-code.patch
cat /tmp/castiron-custom-code-32501931551-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 085ea7d5f9c863aaeb6698f2c5f7efdc283bc01e f5bb93045e5a34d1c08f30f7ec54705d18d99130
python3 scripts/castiron/custom_code_report.py report \
--base 085ea7d5f9c863aaeb6698f2c5f7efdc283bc01e \
--head f5bb93045e5a34d1c08f30f7ec54705d18d99130 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-f5bb93045e5a
cat /tmp/castiron-custom-code-f5bb93045e5a/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Approved after two independent reviews. The schema-v1 2,000-line policy seed is currently inert; projected compatible-WebSocket-regeneration usage is 1,339 lines, rising to 1,732 with tooling and leaving 268 lines of headroom. The enforcement companion must remain draft/inactive until the compatible WebSocket regeneration has actually landed on public main.
## Summary Catch accidental growth in the SDK's remaining generated-file customization before it becomes a large patch to maintain. This ports the same layout and tooling approved in [Python #3714](openai/openai-python#3714) and [Python #3715](openai/openai-python#3715), including Python's trusted report computation. The existing workflow pair measures additions **plus** deletions against verified generated output, using the checker and budget from main. A PR cannot increase its own allowance; budget changes must be isolated and explicitly justified, and increases require a human approving review. Agents cannot approve or bypass increases. Technical details live in `scripts/castiron/CUSTOM_CODE.md`, with references from AGENTS and CONTRIBUTING. No extra workflow files, SDK API changes, checkpoint edits, exclusion changes, or CODEOWNERS changes. **Ruleset enforcement is intentionally deferred.** **Do not merge until the compatible WebSocket event regeneration reaches public main.** The 2,000-line budget is sized for the fixed generated baseline, not today’s large event customization. A local merge preview of the fixed generation plus this tooling measures **+1,524 / −208 = 1,732 lines**, leaving **268 lines** below the ceiling. The budget-only foundation can merge independently. Verify this tooling against the released fix before merging. ## Stack The [budget-only foundation](#924) has merged. This tooling commit is now restacked onto `main` at `a5228db57265`; the tooling patch is unchanged and the PR contains no budget-file change. CI is rerunning against main. The trusted statuses become active after the tooling lands, but will not be required until a separately authorized ruleset rollout.
Summary
Set a 2,000-line ceiling on additions plus deletions in the remaining custom patch against verified generated output. This is the budget-only foundation for the same rollout approved in Python #3714 and Python #3715.
The ceiling is based on the upcoming compatible WebSocket event regeneration: +1,158 / −181 = 1,339 lines, leaving 661 lines of headroom. Current public main still carries the old large event customization; seeding a temporary 55k allowance would retain that accident as the policy.
This policy-only PR can merge now. Its tooling companion will remain draft and must not merge until the fixed generation reaches public main.
Only
.castiron-ratchet.jsonchanges here. The stacked tooling PR will use the base-branch allowance, so a PR cannot raise its own budget. Future increases require a separate budget-only PR, explicit justification, and a human approving review; agents cannot approve them.No workflow, CODEOWNERS, or ruleset changes are included. Ruleset enforcement is a separate, later decision.
Tooling companion: #925