fix(blueprints): preserve bindings on code-only updates - #149
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Hi maintainers — this PR was opened before the new contribution-policy workflow was added. The production change is 8 changed lines; the deterministic regression test accounts for the remaining 151 lines. I rechecked current Would you prefer to keep the regression test under a If the current scope is acceptable, could you also approve the pending CI and Bonk PR Review workflows when convenient? Thank you. |
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