Skip to content

Commit 834b779

Browse files
committed
Merge commit 'd7ab5ee237f8d8a8fa51dd7177a47cfbd6c331e6' into HEAD
2 parents ca5b39d + d7ab5ee commit 834b779

59 files changed

Lines changed: 4045 additions & 1601 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.castiron.stats.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
schema_version: 1
2-
generation_id: 491e58ee-627a-4a57-91d7-2d5261cecfe9
3-
openapi_spec_hash: 1f2d498f08bdd6dacffeb41cee8f44e5
4-
openapi_transformed_spec_hash: 77075630a8655ccbb8d1f790f19f5731
5-
config_hash: d356dda7ff9ca3fbc614107eb546de9f
6-
codegen_sha: eeef8c0a76fd3885ff1da6b83ed2ba0ef6531414
7-
codegen_hash: ccac0bcc0ccfd20617a6e93498d22157f63843c1288cf775b7f3d5d393e49358
8-
public_codegen_sha: 40b2e7c300353a5cc5c8f8992e6616e999f4ecad
2+
generation_id: 5bb155ba-0fb6-4563-a504-851ce952578c
3+
openapi_spec_hash: 2c78c708cab402e8904f555026c78020
4+
openapi_transformed_spec_hash: e513b495f24d8119b952521ffc783d86
5+
config_hash: e8e4d0a0f7d89bb89f18f5ed789c0ac6
6+
codegen_sha: f2b8c4107e23c8d9c2431903533c975f5cfcd342
7+
codegen_hash: d7afe679f4861d8aec19f61fefe2c0659d30cc557923b3614ca142d5985d5a4f
8+
public_codegen_sha: ebb8cc5c28762f6527f4d2ae5c96e21f4d4050b3

‎.github/workflows/castiron-custom-code-comment.yml‎

Lines changed: 269 additions & 102 deletions
Large diffs are not rendered by default.

‎.github/workflows/castiron-custom-code.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name: Castiron custom code
33

44
on:
5+
push:
6+
branches: [main]
57
pull_request:
68
types: [opened, synchronize, reopened, ready_for_review, edited]
79
pull_request_review:
@@ -14,15 +16,15 @@ permissions:
1416
contents: read
1517

1618
concurrency:
17-
group: castiron-custom-code-${{ github.event.pull_request.number || github.event.merge_group.head_ref }}
19+
group: castiron-custom-code-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref }}
1820
cancel-in-progress: false
1921

2022
env:
21-
REPORTER_SHA256: a52a1aabf4047f4c20e96d1d788c25a4aa78c1987b4fa73a13d22c92ef213a3f
23+
REPORTER_SHA256: ddb15c9a162d26a6c9abf1b4fefcd80f2e685d9d255af729863258b7ecd08e2d
2224

2325
jobs:
2426
queue-signal:
25-
if: github.event_name == 'merge_group' || github.event_name == 'pull_request_review'
27+
if: github.event_name == 'merge_group' || github.event_name == 'pull_request_review' || github.event_name == 'push'
2628
runs-on: ubuntu-latest
2729
timeout-minutes: 1
2830
permissions: {}

‎.github/workflows/codeql.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
persist-credentials: false
3333

3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
35+
uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
3636
with:
3737
languages: python
3838

3939
- name: Analyze
40-
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
40+
uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0

‎api_reference/openapi.transformed.yml‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74734,7 +74734,8 @@ components:
7473474734
required:
7473574735
- mode
7473674736
title: Prompt cache breakpoint
74737-
description: Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
74737+
description: Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
74738+
x-stainless-go-constant-constructor: true
7473874739
ModerationMode:
7473974740
type: string
7474074741
enum:
@@ -74964,7 +74965,8 @@ components:
7496474965
required:
7496574966
- mode
7496674967
title: Prompt cache breakpoint
74967-
description: Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
74968+
description: Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
74969+
x-stainless-go-constant-constructor: true
7496874970
InputTextContent:
7496974971
properties:
7497074972
type:
@@ -74979,6 +74981,7 @@ components:
7497974981
description: The text input to the model.
7498074982
prompt_cache_breakpoint:
7498174983
$ref: '#/components/schemas/PromptCacheBreakpointConfig'
74984+
x-stainless-go-constant-constructor: true
7498274985
type: object
7498374986
required:
7498474987
- type
@@ -75254,6 +75257,7 @@ components:
7525475257
description: The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
7525575258
prompt_cache_breakpoint:
7525675259
$ref: '#/components/schemas/PromptCacheBreakpointConfig'
75260+
x-stainless-go-constant-constructor: true
7525775261
type: object
7525875262
required:
7525975263
- type
@@ -75285,6 +75289,7 @@ components:
7528575289
description: The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
7528675290
prompt_cache_breakpoint:
7528775291
$ref: '#/components/schemas/PromptCacheBreakpointConfig'
75292+
x-stainless-go-constant-constructor: true
7528875293
type: object
7528975294
required:
7529075295
- type
@@ -75322,6 +75327,7 @@ components:
7532275327
The content of the file to be sent to the model.
7532375328
prompt_cache_breakpoint:
7532475329
$ref: '#/components/schemas/PromptCacheBreakpointConfig'
75330+
x-stainless-go-constant-constructor: true
7532575331
file_url:
7532675332
type: string
7532775333
format: uri
@@ -77314,6 +77320,7 @@ components:
7731477320
anyOf:
7731577321
- $ref: '#/components/schemas/PromptCacheBreakpointParam'
7731677322
- type: 'null'
77323+
x-stainless-go-constant-constructor: true
7731777324
type: object
7731877325
required:
7731977326
- type
@@ -77351,6 +77358,7 @@ components:
7735177358
anyOf:
7735277359
- $ref: '#/components/schemas/PromptCacheBreakpointParam'
7735377360
- type: 'null'
77361+
x-stainless-go-constant-constructor: true
7735477362
type: object
7735577363
required:
7735677364
- type
@@ -77401,6 +77409,7 @@ components:
7740177409
anyOf:
7740277410
- $ref: '#/components/schemas/PromptCacheBreakpointParam'
7740377411
- type: 'null'
77412+
x-stainless-go-constant-constructor: true
7740477413
type: object
7740577414
required:
7740677415
- type
@@ -99861,6 +99870,7 @@ components:
9986199870
The content of the file to be sent to the model.
9986299871
prompt_cache_breakpoint:
9986399872
$ref: '#/components/schemas/BetaPromptCacheBreakpointConfig'
99873+
x-stainless-go-constant-constructor: true
9986499874
file_url:
9986599875
type: string
9986699876
format: uri
@@ -99898,7 +99908,8 @@ components:
9989899908
required:
9989999909
- mode
9990099910
title: Prompt cache breakpoint
99901-
description: Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
99911+
description: Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
99912+
x-stainless-go-constant-constructor: true
9990299913
BetaInputImageContent:
9990399914
properties:
9990499915
type:
@@ -99924,6 +99935,7 @@ components:
9992499935
description: The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
9992599936
prompt_cache_breakpoint:
9992699937
$ref: '#/components/schemas/BetaPromptCacheBreakpointConfig'
99938+
x-stainless-go-constant-constructor: true
9992799939
type: object
9992899940
required:
9992999941
- type
@@ -99951,6 +99963,7 @@ components:
9995199963
description: The text input to the model.
9995299964
prompt_cache_breakpoint:
9995399965
$ref: '#/components/schemas/BetaPromptCacheBreakpointConfig'
99966+
x-stainless-go-constant-constructor: true
9995499967
type: object
9995599968
required:
9995699969
- type
@@ -101731,6 +101744,7 @@ components:
101731101744
anyOf:
101732101745
- $ref: '#/components/schemas/BetaPromptCacheBreakpointParam'
101733101746
- type: 'null'
101747+
x-stainless-go-constant-constructor: true
101734101748
type: object
101735101749
required:
101736101750
- type
@@ -101755,7 +101769,8 @@ components:
101755101769
required:
101756101770
- mode
101757101771
title: Prompt cache breakpoint
101758-
description: Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
101772+
description: Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
101773+
x-stainless-go-constant-constructor: true
101759101774
BetaDetailEnum:
101760101775
type: string
101761101776
enum:
@@ -101780,6 +101795,7 @@ components:
101780101795
anyOf:
101781101796
- $ref: '#/components/schemas/BetaPromptCacheBreakpointParam'
101782101797
- type: 'null'
101798+
x-stainless-go-constant-constructor: true
101783101799
type: object
101784101800
required:
101785101801
- type
@@ -101899,6 +101915,7 @@ components:
101899101915
anyOf:
101900101916
- $ref: '#/components/schemas/BetaPromptCacheBreakpointParam'
101901101917
- type: 'null'
101918+
x-stainless-go-constant-constructor: true
101902101919
type: object
101903101920
required:
101904101921
- type
@@ -104224,6 +104241,7 @@ components:
104224104241
description: The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.
104225104242
prompt_cache_breakpoint:
104226104243
$ref: '#/components/schemas/BetaPromptCacheBreakpointConfig'
104244+
x-stainless-go-constant-constructor: true
104227104245
type: object
104228104246
required:
104229104247
- type

‎docs/castiron-generated-code-transition.md‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,29 @@ Eliminate handwritten patches in generated-owned files while preserving every ex
66

77
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.
88

9-
## Current public baseline and measured final candidate — 2026-10-22
9+
## Verified public baseline — 2026-10-27
10+
11+
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.
12+
13+
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.
14+
15+
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.
16+
17+
## Current incremental plan
18+
19+
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.
20+
21+
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.
22+
23+
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.
24+
25+
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.
26+
27+
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.
28+
29+
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.
30+
31+
## Historical public baseline and candidate — 2026-10-22
1032

1133
The released baseline `cfa0a79b6395bb0561b28879122a9f90a87cdada` (3.37.0) contains **41 mixed files / 7,409 custom patch lines** (4,890 additions and 2,519 deletions), spanning **39,960 physical lines**. Its public generated checkpoint is `992b9cbba312b4bf10128b9f1d36112b48340363`.
1234

0 commit comments

Comments
 (0)