You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #10949 migrated the generated models snapshot from JavaScript and declaration files to a JSON sidecar. Its .gitignore update replaced the legacy ignore patterns, so files left by earlier builds or generated while handling upstream OpenCode code started appearing as untracked changes.
Retain the old .js and .d.ts ignore patterns alongside the new .json pattern. The current generator still cleans up legacy files, while these rules keep working trees clean before that cleanup runs.
Two new commits since the previous review (cc2167fc):
refactor(sdk): simplify Bun version lookup — Removes the Bun version guard added in the prior commit from packages/sdk/js/script/build.ts. This is correct: the guard was a workaround for the symptom, and the root cause is now fixed at the source level.
fix(sdk): stabilize generated event ordering — Fixes the actual root cause in packages/opencode/src/bus/bus-event.ts. The effectPayloads() function now calls .toArray().sort(...) before .map(), ensuring event schemas are emitted in stable alphabetical key order regardless of module evaluation order across Bun versions. The sort comparator (a < b ? -1 : a > b ? 1 : 0) is correct. A test in packages/opencode/test/kilocode/bus/bus-event.test.ts verifies the ordering by registering test.order.z before test.order.a and asserting alphabetical output — this exercises real implementation, not mocks.
The generated artifacts (types.gen.ts, openapi.json) reflect the now-stable schema ordering as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #10949 migrated the generated models snapshot from JavaScript and declaration files to a JSON sidecar. Its
.gitignoreupdate replaced the legacy ignore patterns, so files left by earlier builds or generated while handling upstream OpenCode code started appearing as untracked changes.Retain the old
.jsand.d.tsignore patterns alongside the new.jsonpattern. The current generator still cleans up legacy files, while these rules keep working trees clean before that cleanup runs.Root cause: #10949