Repository navigation
chore: set a 1,000-line custom-code budget - #126
Conversation
Castiron custom code✅ No new custom-code files detected. 5 mixed files remain; 0 existing customizations changed. Compared 5 existing customizations unchanged
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 32501927218 --repo openai/openai-cli \
--name castiron-custom-code-32501927218-1 --dir /tmp/castiron-custom-code-32501927218-1
git apply --stat /tmp/castiron-custom-code-32501927218-1/custom-code.patch
cat /tmp/castiron-custom-code-32501927218-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 056f306419877c8b97b4e5a2340a90f6bfda717f 3b0f397e182c13feb562efaa139f331094360ff3
python3 scripts/castiron/custom_code_report.py report \
--base 056f306419877c8b97b4e5a2340a90f6bfda717f \
--head 3b0f397e182c13feb562efaa139f331094360ff3 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-3b0f397e182c
cat /tmp/castiron-custom-code-3b0f397e182c/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
There was a problem hiding this comment.
Pull request overview
Introduces a Castiron “ratchet” configuration file to cap the allowed size of the remaining custom patch against verified generated output, aligning with the stated 1,000-line additions+deletions budget.
Changes:
- Add
.castiron-ratchet.jsonwithschema_version: 1andmax_custom_patch_lines: 1000.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed the proposed allowance against the small CLI customization baseline: current usage is 102 lines (+61/-41), and the 1,000-line ceiling leaves 898 lines of practical generation headroom while remaining the smallest absolute SDK cap. The valid schema-version-1 policy seed changes no runtime, API, workflow, security, or ownership behavior; enforcement is intentionally staged separately.
## 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.** The integrated tooling measures **+427 / −68 = 495 custom lines**, below the **1,000-line** ceiling. This includes the reporter changes themselves. ## Stack The [budget-only foundation](openai#126) has merged. This tooling commit is now restacked onto `main` at `016bfb28b10f`; 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 1,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 verified current patch is +61 / −41 = 102 lines, leaving 898 lines of headroom. This is a generous bound on accidental growth, not a target or permission to add custom code.
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: #127