SIGN IN SIGN UP

ci: check custom-code budgets against main's policy (#2447)

## 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](https://github.com/openai/openai-python/pull/3714) and [Python
#3715](https://github.com/openai/openai-python/pull/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 **+1,955 / −208 = 2,163 custom lines**,
below the **3,000-line** ceiling. This includes the reporter changes
themselves.

## Stack

The [budget-only
foundation](https://github.com/openai/openai-node/pull/2446) has merged.
This tooling commit is now restacked onto `main` at `d1410d190d04`; 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.
A
Alex Chang committed
7b7d6ca71130d37ec09792c50056b47861f2eccf
Parent: d1410d1
Committed by GitHub <noreply@github.com> on 8/21/2026, 7:23:36 PM