Repository navigation
fix: regenerate stale app-runtime browser bundle - #82
Closed
SawyerHood wants to merge 1 commit into
Closed
SawyerHood wants to merge 1 commit into
SawyerHood wants to merge 1 commit into
Conversation
f183840 changed projectWithThreadsResponseSchema (part of the sdk app-runtime bundle graph) without regenerating the committed bundle, breaking the @bb/sdk codegen sync check on CI for main and every PR. Regenerated via pnpm --filter @bb/sdk generate:app-runtime-browser-bundle. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Collaborator
Author
|
Superseded by #83 — the bundle is no longer checked in, so the stale copy is deleted rather than regenerated. |
SawyerHood
added a commit
that referenced
this pull request
Jun 10, 2026
…83) ## Problem `packages/sdk/src/app-runtime-browser-bundle.generated.ts` (the served `window.bb` runtime) was checked in and had to be manually regenerated whenever anything in its module graph changed — sdk, server-contract, domain, templates. The only enforcement was an after-the-fact CI sync check, so the failure mode was inevitable: f183840 changed `projectWithThreadsResponseSchema` without regenerating, breaking CI on main and every open PR (see #82 for the symptom-level fix). ## Fix: make generation a build step - **`@bb/sdk#generate:app-runtime-browser-bundle`** is now a cached turbo task whose output is the generated module. The file is untracked and gitignored. - **Dependency edges** from every task that compiles the file: `@bb/sdk` build/typecheck/test, `@bb/server` build/typecheck/test/dev (the only importer of `@bb/sdk/app-runtime`), and `@bb/integration-tests` tasks (they compile server src). `pnpm dev` runs through turbo, so dev generates it automatically. - The `--check` mode, `check:` script, and the staleness test are **deleted** — staleness is structurally impossible now. The remaining tests (sha integrity, guide-templates-only) run against a freshly generated bundle. This mirrors what `@bb/templates` already does (regenerate before its own tasks), taken one step further by untracking the artifact. ## Verified - `rm` the generated file → `turbo run build typecheck test --filter=@bb/sdk --filter=@bb/server`: generate runs first, 7/7 tasks pass - Re-run after deleting the file again: cache hit, turbo restores the file from the task output cache - `turbo run lint` and `@bb/integration-tests#typecheck` pass - `turbo run dev --filter=@bb/server --dry=json` → `['@bb/sdk#generate:app-runtime-browser-bundle', '@bb/server#dev']` ## Notes - Supersedes #82 (which just regenerates the stale copy); if this lands first, #82 can be closed. If #82 lands first, this rebases cleanly — the file gets deleted either way. - Editor DX on a fresh clone: the import in `src/app-runtime.ts` is unresolved until the first turbo run generates the file — standard codegen behavior, same as a missing `dist/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <[email protected]>
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.
Main's CI (and every open PR) is failing
@bb/sdkapp-runtime-browser-bundle.test.ts > keeps the committed bundle in sync with the runtime source graph.f183840 ("fix: seed composer with project execution defaults") added
defaultExecutionOptionstoprojectWithThreadsResponseSchema, which is part of the sdk app-runtime bundle's module graph, without regenerating the committed bundle.This is just the output of
pnpm --filter @bb/sdk generate:app-runtime-browser-bundle— no source changes.🤖 Generated with Claude Code