Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

packages/sdk/js v2 gen tree does not round-trip: build.ts regenerates ~12k lines of types.gen.ts on main

オープン
#1,148 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
bun, typescript

調査の方向性

クリーンな main checkout で packages/sdk/js/script/build.ts を実行し、src/v2/gen に生成された変更、特に types.gen.ts と sdk.gen.ts を確認します。生成されたツリーをコミット済みのファイルと比較し、その後、non-JSON-response work で既に実施されている再現性チェックを確認します。v2 ツリーが diff なしで再生成され、最後の tsc ステップが成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

What

Running packages/sdk/js/script/build.ts on a clean checkout of main regenerates src/v2/gen/types.gen.ts with a ~12k-line diff (and sdk.gen.ts changes), then fails at its trailing tsc step. The committed v2 gen tree and the output of bun dev generate + codegen have drifted apart.

Why it matters

script/publish.ts runs build.ts inside prepareReleaseFiles() on every release, so what ships in @opencode-ai/sdk/v2 is the regenerated tree — not the reviewed, committed one. Any post-codegen patch (SseFn, and the JSON-parse guard being added in the non-JSON-response PR) is only as reproducible as this tree.

Evidence

Observed while adding a "SDK codegen is reproducible" CI check for the non-JSON-response PR: the patched client/client.gen.ts round-trips byte-for-byte, but types.gen.ts does not, so the check had to be scoped to the patched file. The build's final tsc fails on the regenerated types (e.g. FileSystemEntry no longer exported).

Suggested fix

Regenerate and commit the v2 gen tree from current main, then widen the CI check to git diff --exit-code -- src/v2/gen so it can never drift silently again.

主要言語
TypeScript
スター
813
フォーク
134
平均マージ
2日 3時間
マージ済み PR(30日)
65

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。