fix: expose issue commentCount field

This commit is contained in:
Codex
2026-06-09 10:47:31 +00:00
parent 229f81e07c
commit 5f3b6596e2
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ bun scripts/cli.ts gh issue list [owner/repo] \
```bash
bun scripts/cli.ts gh issue view <number|url|owner/repo#number> \
[--repo owner/name] [--json body,title,state,comments] [--raw|--full]
[--repo owner/name] [--json body,title,state,closed,closedAt,comments,commentCount] [--raw|--full]
```
`read` 是兼容别名。支持 `owner/repo#number` shorthand(如 `pikasTech/HWLAB#1024`)。
+2
View File
@@ -123,6 +123,8 @@ AgentRun `v0.1` 运行面物化对象是 `agentrun-v01` namespace 中的 `agentr
profile 配置后的最小真实验收是通过同一 HWLAB v0.2 Cloud API/Web dispatcher 路径创建 Code Agent session 并完成一轮真实 turn`client agent session create --provider-profile <profile>`,再 `client agent send --session-id <sessionId> --provider-profile <profile>`,最后用 `client agent result <traceId>``client agent trace <traceId> --render web` 确认终端状态和最终 assistant 文本。只看到 Secret 存在、AgentRun canary 通过、PipelineRun 成功或源码测试通过,都不能替代这一真实入口验收。对 profile-sensitive CaseRun 或 provider 修复,关闭证据还必须来自原入口 `case run`/Web 等价路径,结果中应同时显示 `requestedProviderProfile``resolvedBackendProfile`、AgentRun `backendProfile`、模型名和终端状态;涉及 ds-flash/Moon Bridge 时,还要确认 `deepseek-v4-flash`、1M context/model catalog 元数据生效,且归档中不再出现 `responses/compact 404``404 page not found`。当前 HY 凭据对的稳定 profile 名是 `hy`;复测时使用同一标准入口,不在任何长期文档或 issue 中记录凭据内容。
CaseRun 的 prompt 组装、tools-only resource bundle、skill/reference 读取边界、trace 归档和 case registry 证据形态属于 HWLAB 仓库内 `docs/reference/spec-hwpod-harness.md` 的权威范围;UniDesk 指挥侧只负责按目标 lane 重新读取 HWLAB `AGENTS.md`、使用 `G14:/root/hwlab-v02` 原入口验证,并在关闭 issue 时记录 runId、traceId、provider profile、registry commit 和负向检索摘要。不要在 UniDesk reference 里复写 CaseRun prompt 细则或 `.agents/skills` 装配实现,避免与 HWLAB runtime lane 真相分叉。
## D601 Legacy HWLAB DEV CD Wrapper
以下 UniDesk wrapper 是旧 D601 DEV CD 指挥入口,只用于显式 legacy 诊断和迁移对照。当前 HWLAB 发布、GitOps 和运行面收敛必须优先按 G14 active runtime lane 与 HWLAB repo-owned 规则执行;不要把下面的 D601 wrapper 当作当前 HWLAB release truth。
+4 -3
View File
@@ -1308,20 +1308,21 @@ export async function runGhCliIssueGuardContract(): Promise<JsonRecord> {
assertCondition(shorthandConflictData.degradedReason === "validation-failed", "conflicting --repo should be validation-failed", shorthandConflictData);
assertCondition(String(shorthandConflictData.message ?? "").includes("resolves to repo pikasTech/HWLAB"), "conflict message should name the derived repo", shorthandConflictData);
const issueConflictCommands = shorthandConflictData.supportedCommands as string[];
assertCondition(Array.isArray(issueConflictCommands) && issueConflictCommands.some((command) => command === "bun scripts/cli.ts gh issue view 7 --repo pikasTech/HWLAB --json body,title,state,closed,closedAt,comments,number,url,author,createdAt,updatedAt"), "conflict should include the exact supported issue view command", shorthandConflictData);
assertCondition(Array.isArray(issueConflictCommands) && issueConflictCommands.some((command) => command === "bun scripts/cli.ts gh issue view 7 --repo pikasTech/HWLAB --json body,title,state,closed,closedAt,comments,commentCount,number,url,author,createdAt,updatedAt"), "conflict should include the exact supported issue view command", shorthandConflictData);
const rawIssueList = await runCli(["gh", "issue", "list", "--raw"], env);
assertCondition(rawIssueList.status === 0, "issue list --raw should be a supported explicit list disclosure path", rawIssueList.json ?? { stdout: rawIssueList.stdout });
const rawIssueListData = dataOf(rawIssueList.json ?? {});
assertCondition(rawIssueListData.command === "issue list" && rawIssueListData.rawCount === 3, "issue list --raw should keep compact list semantics with raw pagination metadata", rawIssueListData);
const readFields = await runCli(["gh", "issue", "read", "20", "--repo", "pikasTech/unidesk", "--json", "body,title,state,closed,closedAt,comments"], env);
const readFields = await runCli(["gh", "issue", "read", "20", "--repo", "pikasTech/unidesk", "--json", "body,title,state,closed,closedAt,comments,commentCount"], env);
assertCondition(readFields.status === 0, "common --json field selection should succeed", readFields.json ?? { stdout: readFields.stdout });
const readFieldsData = dataOf(readFields.json ?? {});
const fieldsJson = readFieldsData.json as JsonRecord;
assertCondition(fieldsJson.title === "长期总看板", "selected json title should be exposed", fieldsJson);
assertCondition(fieldsJson.closed === false && fieldsJson.closedAt === null, "open issue read should expose lifecycle fields", fieldsJson);
assertCondition(Array.isArray(fieldsJson.comments) && fieldsJson.comments.length === 1, "selected json comments should be exposed", fieldsJson);
assertCondition(fieldsJson.commentCount === 1, "selected json commentCount should be exposed", fieldsJson);
const unsupported = await runCli(["gh", "issue", "read", "20", "--repo", "pikasTech/unidesk", "--json", "body,unknown"], env);
assertCondition(unsupported.status !== 0, "unsupported --json field should fail", unsupported.json ?? { stdout: unsupported.stdout });
@@ -1878,7 +1879,7 @@ export async function runGhCliIssueGuardContract(): Promise<JsonRecord> {
"issue create dry-run parses repeated/comma labels, supports --body-stdin and compatible --body-file -, rejects inline --body, and exposes request plan",
"issue create sends labels through REST and preserves GitHub validation errors for missing labels",
"issue list unsupported fields and states fail structurally",
"issue read supports body,title,state,closed,closedAt,comments selection",
"issue read supports body,title,state,closed,closedAt,comments,commentCount selection",
"unknown/full disclosure option guidance remains actionable",
"unsupported --json fields fail structurally",
"issue edit --body-file rejects literal null",
+2 -2
View File
@@ -24,7 +24,7 @@ const DEFAULT_BOARD_KNOWN_META_ISSUES = [CODE_QUEUE_BOARD_TARGET_ISSUE, COMMANDE
const BOARD_AUDIT_REQUIRED_COLUMNS = ["branch", "acceptance", "relatedTask", "progress"] as const;
const BOARD_ROW_FIELDS = ["progress", "status", "validation", "branch", "tasks", "focus"] as const;
const BOARD_ROW_UPSERT_TEXT_FIELDS = ["category", "branch", "tasks", "summary", "focus", "validation", "progress"] as const;
const ISSUE_VIEW_JSON_FIELDS = ["body", "title", "state", "closed", "closedAt", "comments", "number", "url", "author", "createdAt", "updatedAt"] as const;
const ISSUE_VIEW_JSON_FIELDS = ["body", "title", "state", "closed", "closedAt", "comments", "commentCount", "number", "url", "author", "createdAt", "updatedAt"] as const;
const ISSUE_LIST_JSON_FIELDS = ["number", "title", "state", "closed", "closedAt", "url", "updatedAt", "createdAt", "author", "labels"] as const;
const PR_LIST_JSON_FIELDS = [
"body",
@@ -6778,7 +6778,7 @@ export function ghHelp(): unknown {
"bun scripts/cli.ts gh repo view <owner/repo>|--repo owner/name",
"bun scripts/cli.ts gh repo create <owner/repo>|--repo owner/name [--private|--public] [--description text] [--auto-init] [--dry-run]",
"bun scripts/cli.ts gh issue list [owner/repo] [--state open|closed|all] [--limit N] [--search text] [--label label[,label...]]... [--repo owner/name] [--json number,title,state,closed,closedAt,url,updatedAt,createdAt,author,labels] [--raw|--full]",
"bun scripts/cli.ts gh issue view <number|url|owner/repo#number> [--repo owner/name] [--number N compat] [--json body,title,state,closed,closedAt,comments] [--raw|--full]",
"bun scripts/cli.ts gh issue view <number|url|owner/repo#number> [--repo owner/name] [--number N compat] [--json body,title,state,closed,closedAt,comments,commentCount] [--raw|--full]",
"bun scripts/cli.ts gh issue read <number|url|owner/repo#number> [--repo owner/name] [--number N compat] [--raw|--full] [compatibility alias for issue view]",
"bun scripts/cli.ts gh issue create --title <title> (--body-stdin|--body-file <file|->) [--label label[,label...]]... [--repo owner/name] [--dry-run]",
"bun scripts/cli.ts gh issue update <number> --mode replace|append (--body-stdin|--body-file <file|->) [--title title] [--repo owner/name] [--number N compat] [--dry-run] [--expect-updated-at ts|--expect-body-sha sha256] [--body-profile auto|code-queue-board|commander-brief] [--allow-short-body] [--full|--raw]",