Regenerate SDK from serverside-api v235.0.0 and fix generate.sh leftovers - #77
Merged
Merged
Conversation
Regenerating the SDK left the tree in a broken state whenever anything went wrong. Building chat-manager needs tens of GB of scratch space, and when the Go compiler ran out it died with "no space left on device" partway through, after the generator had already written part of the output. Check for free space before starting, build the generator before touching the SDK tree, and roll generated sources back if any step fails. Models and webhook fixtures are now wiped before regenerating so schemas dropped from the spec stop surviving as stale sources, and the CallParticipant patch only applies when that model is actually generated. Co-authored-by: Cursor <cursoragent@cursor.com>
Adds the importer external storage endpoints, GCS external storage models, and the moderation analysis failed event, and prunes 124 model classes that no longer exist in the spec. Those were leftovers from earlier runs: generate.sh never removed generated files, so schemas kept accumulating after being dropped upstream. None of them are referenced by the client. Co-authored-by: Cursor <cursoragent@cursor.com>
mogita
reviewed
Aug 5, 2026
mogita
reviewed
Aug 5, 2026
mogita
reviewed
Aug 5, 2026
Addresses review on #77. Rollback only covered models and fixtures, so a failure partway through generate-client could leave a half-written services/Common.java behind — the state the rollback exists to prevent. It also restored from the index, which silently discarded uncommitted edits and untracked files. Snapshot every path the generator writes before the wipe and restore from that instead. Recovering the actual pre-run contents preserves local work and keeps re-runs on a dirty tree working, so no clean-worktree gate is needed. The disk check now probes the Go build and module caches and $HOME as well. Those are where the space actually goes, and they need not share a volume with the repo or TMPDIR, so the old check could pass while the real target was full. Results are deduplicated per filesystem, and the default floor is 30GB since the build wants 20-30GB and 20 was too close to the line to be useful. Co-authored-by: Cursor <cursoragent@cursor.com>
mogita
approved these changes
Aug 5, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
./generate.shwas failing partway through and leaving the working tree in a broken, half-generated state. This fixes the script and lands a fresh generation from the current spec.Why it failed: building
chat-managerpulls in a very large Go dependency graph and needs tens of GB of scratch space. When it ran out, the Go compiler died withno space left on device— but only after the generator had already written part of its output, so every failed attempt left untracked leftovers behind.Why leftovers accumulated: the script never removed anything before regenerating. Models dropped from the spec upstream simply stayed on disk forever. This regeneration prunes 124 such classes that no longer exist in
serverside-api.yaml.generate.shchangesTMPDIRand the repo up front, and fail with a hint instead of dying mid-build.models/frameworkis hand-written and deliberately preserved.set -euo pipefail, resolve paths from the script location, and only apply theCallParticipantpatch when that model is actually generated (it no longer is, which was printing an error on every run).Regenerated output
Generated from
chatata3178a8796(Release v235.0.0).CommonChannelContextResponse,DeleteUserMessagesRequestPayload,GetExternalStorageGCSResponse,UpsertExternalStorageGCSRequest,ModerationAnalysisFailedEventTest plan
./generate.shruns end to end,BUILD SUCCESSFUL./gradlew compileTestJavapasses, so no test source referenced a pruned modelStreamHTTPClientTestneedingSTREAM_API_KEY/STREAM_API_SECRET, and it passes once those are set)models/frameworkfiles, and the fixtures were restored, and a planted untracked leftover was cleaned upMIN_FREE_GB=999999 ./generate.sh, which exits 1 with the reclaim hintNote for reviewers
The 124 deletions are public classes, so this is technically a breaking change for anyone importing them. They were unreachable dead code — no endpoint returns or accepts them, and nothing in the client or tests references them.
I also had to install a Java 21 toolchain locally to build; the repo pins
JavaLanguageVersion.of(21)and only JDK 25/26 were present. Nothing in the repo needed changing for that.Made with Cursor