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
5 changes: 0 additions & 5 deletions .castiron-ratchet.json

This file was deleted.

7 changes: 3 additions & 4 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
schema_version: 1
generation_id: 2428792f-6df7-44d0-b2c7-92a44663a53d
generation_id: 0f3a113a-8c3e-4be1-8bf2-ac4eed2efb58
openapi_spec_hash: 2c78c708cab402e8904f555026c78020
openapi_transformed_spec_hash: 2231f30a57a7a7afe95cb0d0e305c18d
config_hash: cd0aed93d2e3579562e42f5a5e8d2112
codegen_sha: fe5d1e3d7cd5be6d987dfa5637565092197e5ce9
codegen_hash: 9ee4dd63f01c9769c3fef3f62a5047ee332b009de2d4e4a5ae58e3036f36195c
public_codegen_sha: f17901f871361f6cdc52c77d0f27e447d26f89c2
codegen_sha: 71acebef46c022e49845778711ba35231bd0f715
codegen_hash: 1929596c816dc7ee14d558cfaf310b06a5d8e24d08e155ab38830b8aeb741971
51 changes: 25 additions & 26 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,25 @@ This will install all the required dependencies and build output files to `dist/

## Modifying/Adding code

Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
Most of the SDK is generated code. Never edit generated files by hand; change
the authoritative generation inputs or compiler and regenerate instead. The generator will never
modify the contents of the `src/lib/` and `examples/` directories.

## Custom-code budget
## Generated-file ownership

The custom-code budget counts additions plus deletions in the remaining patch
against verified generated output. `.castiron-ratchet.json` defines this repository's
ceiling. CI uses the checker and budget on main, not the PR's proposed versions.
Do not edit generated SDK files by hand. Fix the API schema, generation
configuration, or compiler and regenerate instead. Put SDK-specific behavior in
separately owned handwritten helpers and extension points.

Budget changes must be in a separate PR modifying **only `.castiron-ratchet.json`**.
Justify the current usage, proposed ceiling, and why fixing generation is not
appropriate in the PR description. Increases require a **human approving review**
and must merge before an SDK change relies on them. Agents may draft proposals,
but must not approve increases or bypass the gate. Keep default CODEOWNERS.
Lower the ceiling after cleanup while retaining headroom; decreases must still
fit the measured usage.

See [custom-code technical details](../scripts/castiron/CUSTOM_CODE.md) for accounting,
local checks, trusted CI, and activation instructions.
Regeneration replaces generated files and removes retired generated paths.
Handwritten edits to generated output are overwritten, not carried forward.
Separately owned handwritten files are preserved. Resolve ownership conflicts
explicitly before regeneration. Follow the ownership rules in `AGENTS.md`
and review generated output and inventory changes together. Generated-file
ownership currently relies on contributor guidance and code review, without a
dedicated generated-file edit check or required gate. Fix violations in the
generation inputs/compiler and regenerate; do not edit inventory hashes to
accept a handwritten patch.

## Security requirements

Expand Down Expand Up @@ -321,16 +320,16 @@ in `openai/openai-node`.
Required merge checks are configured in repository rules. The `test matrix` check requires the Node.js
tests, benchmarks, credential-free ecosystem job, and Windows build to succeed.

| Checks | PR | Merge queue | Push to `main` | Release PR | npm publication |
| ------------------------------------------------------------------- | -------------- | ------------- | ----------------- | -------------- | ------------------------------------------- |
| CI lint, build, Node.js tests, packed-package tests, benchmarks | Runs¹ | Runs | Runs | Runs¹ | CI gate |
| Windows contributor bootstrap and SDK build | Runs¹ | Runs | Runs | Runs¹ | CI gate |
| Credential-free ecosystem startup/import and compatibility checks | Runs | Runs | Runs | Runs | CI gate |
| Live examples and live ecosystem tests | Skipped | Skipped | Runs² | Skipped | CI gate² |
| CodeQL merge protection, breaking-change detection, Castiron checks | Runs | Runs | Not triggered | Runs | Merge protection; no separate release gate |
| Standalone Node.js support policy workflow | Not triggered | Not triggered | Runs | Not triggered | No separate gate; assertions also run in CI |
| Release PR title/version validation | Not applicable | Not triggered | Not applicable | Runs | Checked before release creation |
| Release state, native-browser compatibility, release-package build | Not applicable | Not triggered | Release workflow³ | Not applicable | Required |
| Checks | PR | Merge queue | Push to `main` | Release PR | npm publication |
| ------------------------------------------------------------------ | -------------- | ------------- | ----------------- | -------------- | ------------------------------------------- |
| CI lint, build, Node.js tests, packed-package tests, benchmarks | Runs¹ | Runs | Runs | Runs¹ | CI gate |
| Windows contributor bootstrap and SDK build | Runs¹ | Runs | Runs | Runs¹ | CI gate |
| Credential-free ecosystem startup/import and compatibility checks | Runs | Runs | Runs | Runs | CI gate |
| Live examples and live ecosystem tests | Skipped | Skipped | Runs² | Skipped | CI gate² |
| CodeQL merge protection, breaking-change detection | Runs | Runs | Not triggered | Runs | Merge protection; no separate release gate |
| Standalone Node.js support policy workflow | Not triggered | Not triggered | Runs | Not triggered | No separate gate; assertions also run in CI |
| Release PR title/version validation | Not applicable | Not triggered | Not applicable | Runs | Checked before release creation |
| Release state, native-browser compatibility, release-package build | Not applicable | Not triggered | Release workflow³ | Not applicable | Required |

¹ Same-repository PRs run these checks through branch pushes; duplicate PR-event jobs may be skipped.
Fork PRs and `ready_for_review` events run them directly. Release PRs receive the same CI coverage.
Expand Down
Loading
Loading