Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: 4dd013a4-3586-4b2e-8d90-dd4d6b6d8e18
generation_id: 5bb155ba-0fb6-4563-a504-851ce952578c
openapi_spec_hash: 2c78c708cab402e8904f555026c78020
openapi_transformed_spec_hash: e513b495f24d8119b952521ffc783d86
config_hash: 26002a7ad4f9fdd7011b62a2da3511b1
codegen_sha: b9a21b51f252010a29b36f9dff4118593321d48c
config_hash: e8e4d0a0f7d89bb89f18f5ed789c0ac6
codegen_sha: f2b8c4107e23c8d9c2431903533c975f5cfcd342
codegen_hash: d7afe679f4861d8aec19f61fefe2c0659d30cc557923b3614ca142d5985d5a4f
public_codegen_sha: 889f63058deba0eb0a04a593a9cf771c0674972a
public_codegen_sha: ebb8cc5c28762f6527f4d2ae5c96e21f4d4050b3
20 changes: 12 additions & 8 deletions docs/castiron-generated-code-transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,27 @@ Eliminate handwritten patches in generated-owned files while preserving every ex

No removals or renames of public symbols, new required arguments, narrower input/return types, dependency or Python-floor changes, altered defaults, new payload limits, changed warnings, or changed sync/async behavior are authorized by this transition. Deprecated methods and compatibility import paths remain supported.

## Verified public baseline — 2026-10-26
## Verified public baseline — 2026-10-27

The strict public report at `904ed3f6ba0f2351af67c9456e9f020401a8a7f8` measured **0 generated files with custom edits / 0 custom patch lines**. These counts carry forward to public main `06dbb5d019d7b6870b5898bf5df579ca60b61d28`: a full-tree comparison found only a change to the SDK-owned `create-releases.yml` workflow, outside generated ownership. All other paths, including all **2,025 generated manifest entries**, retain identical bytes and Git modes. The report verified the generated snapshot hash; its two omitted generated workflows were separately authenticated against the manifest and private checkpoint.
Public main `3596d18f05b63081fd64c6da82b515293afb98c6` has **0 generated files with custom edits / 0 custom patch lines**. The verified generated inventory contains **2,028 manifest entries**; including the manifest itself, qualification compares **2,029 emitted paths**, bytes and Git modes. Public promotion [#4186](https://github.com/openai/openai-python/pull/4186) is delivered. Current physical line counts for all 41 formerly mixed files total **40,356 lines**, including comments and blanks, and are recorded under `current_status.former_mixed_files` in the [inventory](castiron-transition-inventory.json); every file has zero custom patch lines.

The original `cfa0a79b6395bb0561b28879122a9f90a87cdada` audit measured **41 mixed files / 7,409 custom patch lines**, comprising 4,890 additions and 2,519 deletions. Patch lines measure differences from generated output, including removed lines; they are not the total size of handwritten runtime modules or compiler templates.
The policy is **strict generated-file ownership with a zero-line customization budget**. The effective main-branch rules require both `Castiron / budget-only change` and `Castiron / custom-code budget`. New generated-file changes must come from the compiler and regeneration; handwritten algorithms belong in handwritten runtime modules.

The original `cfa0a79b6395bb0561b28879122a9f90a87cdada` audit measured **41 mixed files / 7,409 custom patch lines**, comprising 4,890 additions and 2,519 deletions. Patch lines measure differences from generated output, including removed lines; they are not the size of handwritten runtime modules or compiler templates.

## Current incremental plan

The mixed-file count reached zero before this follow-up. Remaining work simplifies how the compiler expresses the preserved SDK interfaces: ordinary templates consume native compiler facts, while runtime algorithms remain in wholly handwritten modules. Do not introduce a new facade framework or developer-facing breaking changes.
The mixed-file count reached zero before this follow-up. This follow-up simplifies the compiler representation of preserved SDK interfaces: ordinary templates use native compiler facts, while runtime algorithms remain wholly handwritten. No new facade framework or developer-facing breaking change is part of this work.

The Chat/Uploads compiler batch and SDK adoption are delivered. The compiler changes for Files/Artifacts, WebSocket declarations, Sessions stream/create, Threads, Runs, Package, Client and Responses have also landed. An inventory at actual merged compiler `efa47f65cef47f54391723b787de5239d8b61bff` covers all **14 authored YAML files** and finds **0 legacy declaration blocks / 0 declaration lines**. Final combined-compiler qualification passed, and this update records SDK adoption of the native configuration.

The first slice covers Chat parsing/streaming and chunked uploads, with separate compiler reviews followed by private SDK adoption and public promotion where there is an actual SDK change. Subsequent small slices cover Files/Artifacts, Sessions, Threads/Runs, Responses, and client/package wiring, followed by removal of unused declaration machinery after a compatibility audit.
Keep the separate **75 lines of runtime bindings**: they express constants, loggers and small forwarders to handwritten behavior. They contain no handwritten runtime algorithms and contribute zero SDK custom patch lines. Replacing them would add machinery without simplifying ownership. Historical declaration readers remain available for compatible input replay; this transition does not claim their removal.

The remaining inventory contains nine declaration blocks totaling **16,555 authored YAML lines**, plus **75 residual binding lines** tracked separately. These measure compiler configuration still to simplify, not custom patches in SDK files.
The actual merged compiler passed all **914 renderer tests**, with none ignored, and the canonical Rust lint checks. Both legacy and native configurations reproduce all **2,029 emitted paths byte for byte**, including Git modes and valid manifests, against public baseline `3596d18f`; there are no output exceptions. This preserves signatures, annotations, defaults, import identities, sync/async behavior, method placement and runtime algorithms. Reporting validation retains the 282 Python-only tests and four lint/type checks from identical output, settings and tool versions, with the existing compiler-dependent test rerun successfully against the final compiler.

For each slice, compare generated output against the existing implementation using the same API/configuration inputs. Preserve method signatures, annotations, defaults, imports, sync/async behavior, and runtime algorithms. Review any other generated drift separately, run the relevant compatibility and repository checks, keep the verified mixed-file and patch-line counts at zero, and satisfy ordinary review and merge gates.
The SDK candidate follows the normal private adoption and public promotion process. Public delivery is completed by merging the SDK pull request. These final compatibility measurements use the actual merged compiler; candidate-only measurements below remain historical.

The dated audits and original work tracks below are historical records. Their pending-delivery statements and proposed declaration machinery describe the earlier approach; this incremental plan supersedes them.
The dated audits and original tracks below are historical records. Their pending-delivery statements and earlier declaration-framework plans are superseded by the current status above.

## Historical public baseline and candidate — 2026-10-22

Expand Down
Loading
Loading