chore(3574): add changeset fragment for Phase 5.1

This commit is contained in:
Tom Boucher
2026-05-15 14:35:38 -04:00
parent 7ebcf41939
commit 683f1890e9

View File

@@ -0,0 +1,5 @@
---
type: Changed
pr: 3574
---
**State commands now route through the SDK runtime bridge by default** — `gsd-tools state <sub>` (every canonical subcommand: load, json, get, update, patch, begin-phase, advance-plan, record-metric, update-progress, add-decision, add-blocker, resolve-blocker, record-session, signal-waiting, signal-resume, planned-phase, validate, sync, prune, milestone-switch) executes the same SDK handler that `gsd-sdk query state.<sub>` executes, in-process via `executeForCjs`. Output and exit-code shapes are byte-equivalent; 104 existing CJS tests pass unchanged. Two operating modes: SDK-delegation (default) and CJS-fallback (transparently used when the SDK is not loadable or when GSD_WORKSTREAM is set, since the sync bridge transport forces subprocess for workstream-scoped commands and subprocess is disabled inside the bridge). Bundles a fix for a Phase 5.0 (PR #3558) defect in `sdk/src/runtime-bridge-sync/worker.ts` that dropped `projectDir` and `workstream` from `RuntimeBridgeExecuteInput` — every sync-bridge dispatch hardcoded `projectDir = ''`, which prevented any registry handler from finding its `.planning/` files. Per-request adapter construction now closes over the correct values. Two CJS↔SDK behavioral asymmetries documented but not resolved in this PR: `state.complete-phase` remains CJS-only (no SDK handler exists yet); `state.add-roadmap-evolution` remains SDK-only (CJS router lists as unsupported). Closes #3567.