Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,148 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
bun, typescript

Direzione di ricerca

Esegui packages/sdk/js/script/build.ts in un checkout pulito di main e ispeziona le modifiche generate in src/v2/gen, soprattutto types.gen.ts e sdk.gen.ts. Confronta l’albero generato con i file sottoposti a versionamento, quindi esamina il controllo di riproducibilità esistente del lavoro sulle risposte non-JSON. Il lavoro è completato quando l’albero v2 viene rigenerato senza diff e il passaggio finale di tsc ha esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
813
Fork
134
Merge medio
2g 2h
PR unite (30g)
67

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AltimateAI/altimate-code

Tutte le issue di AltimateAI/altimate-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.