feat(platform): hydrate WorkItem.body; route two-pass scan through adapter#1414
feat(platform): hydrate WorkItem.body; route two-pass scan through adapter#1414babonet wants to merge 2 commits into
Conversation
…adapter WorkItem gains optional body (GitHub + ADO); watch two-pass uses adapter.getWorkItem instead of gh issue view, so it works on ADO too.
🟡 Impact Analysis — PR #1414Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
squad-cli (1 file)
squad-sdk (3 files)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 0 active Copilot thread(s) resolved (1 outdated skipped) |
| ❌ | CI passing | 6 check(s) still running |
Files Changed (5 files, +23 −12)
| File | +/− |
|---|---|
.changeset/forge-two-pass-adapter.md |
+8 −0 |
packages/squad-cli/src/cli/commands/watch/capabilities/two-pass.ts |
+10 −11 |
packages/squad-sdk/src/platform/azure-devops.ts |
+1 −0 |
packages/squad-sdk/src/platform/github.ts |
+3 −1 |
packages/squad-sdk/src/platform/types.ts |
+1 −0 |
Total: +23 −12
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Pull request overview
Adds optional WorkItem.body to the platform abstraction and updates adapters/CLI watch hydration so work-item details (especially body/description) can be fetched via PlatformAdapter.getWorkItem, enabling Azure DevOps–first squads to use the watch two-pass flow without a hard dependency on gh issue view.
Changes:
- Extend
WorkItemwith optionalbodyand populate it inGitHubAdapter.getWorkItem()andAzureDevOpsAdapter.getWorkItem(). - Update watch
two-passcapability to hydrate actionable items viacontext.adapter.getWorkItem()and remove the explicitghrequirement. - Add a changeset bumping
@bradygaster/squad-sdk(minor) and@bradygaster/squad-cli(patch).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/squad-sdk/src/platform/types.ts | Adds optional body?: string to normalized WorkItem. |
| packages/squad-sdk/src/platform/github.ts | Requests/parses body from gh issue view --json ... and returns it on WorkItem. |
| packages/squad-sdk/src/platform/azure-devops.ts | Maps System.Description into WorkItem.body when it’s a string. |
| packages/squad-cli/src/cli/commands/watch/capabilities/two-pass.ts | Routes pass-2 hydration through adapter.getWorkItem() and removes the gh requirement. |
| .changeset/forge-two-pass-adapter.md | Records SDK/CLI version bumps and describes the new behavior. |
… hydrated ADO listWorkItems populates body, so re-fetching each actionable item was wasteful. Reuse the existing body when present.
tamirdresher
left a comment
There was a problem hiding this comment.
✅ Approved — surgical and correct. Removes hardcoded gh CLI dependency from two-pass, routes through adapter. body field added with proper type guards (ADO typeof check is defensive coding done right). requires:[] is correct since the adapter owns the dependency now. Narrowed hydrated shape matches the declared type better than the old raw JSON push. No security concerns. Clean.
Phase 2 of routing the watch CLI through PlatformAdapter so ADO-first squads work.
Validation: SKIP_BUILD_BUMP=1 npm run build; vitest (184 pass). Independent of #1413.