fix(blueprints): preserve bindings on code-only updates - #149
Open
ai-yang wants to merge 1 commit into
Open
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
ai-yang
marked this pull request as ready for review
August 11, 2026 15:15
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.
Fixes #147
Summary
Make
Overseer.updateBlueprint()refresh binding metadata only when callers explicitly passupdateBindings: true.The API already treats
updateCodeandupdateBindingsas independent flags, and the Workshop's Update code action sends only{ updateCode: true }. Previously, that call still collected and replaced binding metadata, which could silently change the published blueprint contract or reject on an unrelated invalid annotation.The production change is intentionally limited to guarding the existing binding collection. Code-only, bindings-only, and combined updates otherwise retain their existing propagation behavior.
Regression coverage
The new tests verify that:
collectBindingMetadata(), preserves existing bindings, and still succeeds when collection would throw;Test plan
pnpm --filter @gadgets/workshop-backend exec vitest run __tests__/blueprint-update.test.ts— 1 test file / 3 tests passedpnpm --filter @gadgets/workshop-backend test— 26 unit-test files / 282 tests passed; 4 environment-dependent integration tests skipped by the existing configurationpnpm --filter @gadgets/workshop-backend types:checkpnpm exec oxlint packages/workshop-backend/src/overseer.ts packages/workshop-backend/__tests__/blueprint-update.test.ts— exit 0; pre-existing warnings inoverseer.tsare unchangedgit diff --check