一键导入
helix-sdk-summary-vs-details
Audit pattern for comparing WorkItemSummary (list API) fields against WorkItemDetails (per-item API) after a Helix.Client SDK bump
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audit pattern for comparing WorkItemSummary (list API) fields against WorkItemDetails (per-item API) after a Helix.Client SDK bump
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Investigate .NET CI failures using the hlx CLI tool via bash. USE FOR: checking Helix job status, searching build logs, downloading test results, AzDO build timeline analysis — when MCP tools aren't loaded, when the MCP server isn't configured or fails to start, or when scripting with JSON output and jq. DO NOT USE FOR: tasks where Helix/AzDO MCP tools are already available in context (prefer ci-analysis skill when MCP server is loaded). INVOKES: bash (hlx CLI commands with --json output).
{what this skill teaches agents}
Domain-layer normalizer + JSON-stable cache key pattern for filter types with server-side defaults and case-insensitive fields.
Strict unknown-parameter rejection for MCP tools: Stage A (UnmappedMemberHandling.Disallow) + Stage B (did-you-mean CallToolFilter).
Audit MCP/CLI tool parameter surface against underlying REST API capabilities to find silently-dropped params.
Test MCP CallToolFilter behavior with real CallToolRequestParams and McpServerTool invocation.
| name | helix-sdk-summary-vs-details |
| description | Audit pattern for comparing WorkItemSummary (list API) fields against WorkItemDetails (per-item API) after a Helix.Client SDK bump |
| domain | helix |
| confidence | high |
| source | issue-91 |
Use this pattern when a Helix.Client SDK bump potentially adds new fields to WorkItemSummary (the list-API response), and you need to decide which DetailsAsync (per-item) call sites can be eliminated.
ListAsync returns a WorkItemSummary for every work item in one HTTP call.
DetailsAsync fetches WorkItemDetails per work item — O(N) HTTP calls.
When the list API starts returning fields that previously required a per-item details call, those details calls become unnecessary (for those fields). The key question: which fields does each call site actually need?
For every call site that calls GetWorkItemDetailsAsync:
List the fields read from details.
Common: ExitCode, State, MachineName, Started, Finished, ConsoleOutputUri.
Check which of those fields are now on IWorkItemSummary.
After arcade PR #16722 (client ≥ 11.0.0-beta.26325.x): ExitCode, ConsoleOutputUri.
Decision matrix:
| Fields needed from details | Can skip DetailsAsync? |
|---|---|
ONLY ExitCode | ✅ Use summary.ExitCode |
ONLY ConsoleOutputUri | ✅ Use summary.ConsoleOutputUri |
ONLY ExitCode + ConsoleOutputUri | ✅ Use both from summary |
State or MachineName or Started/Finished (duration) | ❌ Keep DetailsAsync |
State/MachineName/Duration. A hybrid is also valid: use summary.ExitCode to avoid DetailsAsync for zero-exit-code items, still call it for non-zero/null.// In a loop over IWorkItemSummary items:
var tasks = workItems.Select(wi => wi.ExitCode == 0
? Task.FromResult(CreatePassedResult(wi, id)) // skip DetailsAsync
: CreateDetailedResultAsync(wi, id, semaphore, ct)) // still calls DetailsAsync
.ToList();
This is correct because:
ExitCode == 0 → item passed, no State/MachineName/Duration needed for a pass resultExitCode != 0 → classification + duration require State/MachineName/Started/FinishedExitCode == null → in-progress; check details for isCompleted = details.ExitCode.HasValueSee helix-iscompleted-bucketing skill. After adopting list-API ExitCode:
summary.ExitCode == null for in-progress items → still route to DetailsAsync, set isCompleted = falsesummary.ExitCode.HasValue for completed items → can skip DetailsAsync IF no other fields are neededsummary.ExitCode.HasValue and skip DetailsAsync if you need details.Statesummary.ConsoleOutputUri is now available from the list API. The codebase also constructs the URL via:
https://helix.dot.net/api/2019-06-17/jobs/{jobId}/workitems/{name}/console
Both resolve to the same endpoint. The constructed URL is always valid (even for in-progress items where the field may be null). Prefer the field if switching; keep the constructed URL if the call site needs reliability over null-safety.
| SDK version | WorkItemSummary.ExitCode populated at runtime | WorkItemSummary.ConsoleOutputUri populated |
|---|---|---|
≤ 11.0.0-beta.26265.121 | ❌ (field exists in model, server returns null) | ❌ |
≥ 11.0.0-beta.26325.102 | ✅ | ✅ |
26265.121 → 26325.102, confirmed ExitCode=0 fast-path now works at runtime in GetJobStatusAsync. No additional refactoring needed (all other call sites need State/MachineName/Duration).