JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
fix(auto-harness): /auto-harness issue指令文档补充 & Tui 显示修复调整
ray_le295371f6bb43
diff --git a/docs/en/SlashCommands.md b/docs/en/SlashCommands.mdindex d8c87f7da6..3da9e772c2 100644--- a/docs/en/SlashCommands.md+++ b/docs/en/SlashCommands.md@@ -34,7 +34,7 @@ Executed locally in the terminal UI, not through Gateway control pipeline.| `/hooks` | Browse configured hooks (read-only, see below) || `/sandbox` | Set sandbox mode (see below) || `/agents` | Manage Agent configs (list, get, create, update, enable, disable, delete, see below) |-| `/auto-harness` | Auto-Harness task management (`run`/`schedule`, see below) |+| `/auto-harness` | Auto-Harness task management (`run`/`schedule`/`issue`, see below) |> Note: `/mode` controlled switching logic is primarily on Gateway side, see "`/mode` and `/switch`" below. The TUI local command additionally supports `/mode plan` and `/mode team.normal`; see the TUI guide for details.@@ -973,6 +973,10 @@ If configuration is incomplete, the task creation will prompt the missing fields| `/auto-harness schedule logs <task_id> [--history <n>]` | View task execution logs || `/auto-harness schedule cancel <task_id>` | Cancel a task || `/auto-harness schedule delete <task_id>` | Delete a task |+| `/auto-harness issue fix <issue_numbers>` | Create fix tasks for GitCode issues |+| `/auto-harness issue scan [--repo <repo>] [--page <n>] [--labels <labels>] [--force-refresh]` | Scan repo GitCode issues |+| `/auto-harness issue status` | View GitCode issue processing status |+| `/auto-harness issue delete <issue_numbers>` | Delete issue processing records |#### `/auto-harness run` (One-time Execution)@@ -1009,6 +1013,61 @@ If configuration is incomplete, the task creation will prompt the missing fields- Default: Stream current running logs in real-time (`tail -f` mode); Ctrl+C to interrupt- `--history <n>`: View historical execution logs (`view` mode, `n` is the history index, 0 = most recent)+### `/auto-harness issue` (GitCode Issue Auto-Fix)++Manage GitCode issue auto-processing: scan issue matrix, create fix tasks, view status, clean up records.++Requires `git.user_name`, `git.user_email` and `gitcode.access_token` (or `GITCODE_ACCESS_TOKEN` env var) to be configured.++#### Subcommands++| Command | Description |+|---|---|+| `/auto-harness issue fix <issue_numbers>` | Create fix tasks for GitCode issues |+| `/auto-harness issue scan [--repo <repo>] [options]` | Scan repo issues |+| `/auto-harness issue status` | View issue processing status |+| `/auto-harness issue delete <issue_numbers>` | Delete issue processing records |++#### `/auto-harness issue fix` (Create Fix Task)++- Usage: `/auto-harness issue fix <issue_numbers>`+- Parameters:+ - `<issue_numbers>`: Issue number(s), comma-separated, e.g. `1272,1271,1270`+ - `--repo <repo>`: Target repository (`jiuwenswarm` / `agent_core`); interactively selected if not specified+- Issues with bound PRs (open or merged) are automatically skipped+- Examples:+ - `/auto-harness issue fix 1286`+ - `/auto-harness issue fix 1272,1271,1270`++#### `/auto-harness issue scan` (Scan Issue)++- Usage: `/auto-harness issue scan`+- Parameters:+ - `--repo <repo>`: Target repository; interactively selected if not specified+ - `--page <n>`: Page number, default 1+ - `--labels <labels>`: Label filter, comma-separated; defaults to bug type only+ - `--force-refresh`: Force refresh from GitCode API (uses cache by default)+- Displays: issue number, title, labels, difficulty, last updated+- Examples:+ - `/auto-harness issue scan`+ - `/auto-harness issue scan --repo jiuwenswarm --page 1`+ - `/auto-harness issue scan --repo agent_core --force-refresh`++#### `/auto-harness issue status` (View Status)++- Usage: `/auto-harness issue status` (no parameters)+- Lists all issue processing records in table format: number, status, stage, progress, details+- Example: `/auto-harness issue status`++#### `/auto-harness issue delete` (Delete Records)++- Usage: `/auto-harness issue delete <issue_numbers>`+- Parameters:+ - `<issue_numbers>`: Issue number(s) to delete+- Examples:+ - `/auto-harness issue delete 123`+ - `/auto-harness issue delete 123 456`+---## Planned Featuresdiff --git "a/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md" "b/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md"index f5500e73df..d348f6bc09 100644--- "a/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md"+++ "b/docs/zh/Slash\345\221\275\344\273\244\350\241\250.md"@@ -34,7 +34,7 @@| `/hooks` | 浏览已配置的 hooks(只读,见下文) || `/sandbox` | 设置沙箱模式(见下文) || `/agents` | 管理 Agent 配置(list, get, create, update, enable, disable, delete,见下文) |-| `/auto-harness` | Auto-Harness 任务管理(`run`/`schedule`,见下文) |+| `/auto-harness` | Auto-Harness 任务管理(`run`/`schedule`/`issue`,见下文) |> 说明:本页的 `/mode` 与 `/switch` 以 Gateway 受控通道行为为主。TUI 本地命令另支持 `/mode plan`、`/mode team.normal`,详见 [TUI 使用指南](TUI使用指南.md)。@@ -986,6 +986,10 @@ Pipeline 执行过程中,扩展包**默认自动激活生效**,无需用户| `/auto-harness schedule logs <task_id> [--history <n>]` | 查看任务执行日志 || `/auto-harness schedule cancel <task_id>` | 取消任务 || `/auto-harness schedule delete <task_id>` | 删除任务 |+| `/auto-harness issue fix <issue_numbers>` | 指定 GitCode issue 创建独立修复任务 |+| `/auto-harness issue scan [--repo <repo>] [--page <n>] [--labels <labels>] [--force-refresh]` | 扫描仓库 GitCode issue |+| `/auto-harness issue status` | 查看 GitCode issue 处理状态列表 |+| `/auto-harness issue delete <issue_numbers>` | 删除 issue 处理记录 |#### `/auto-harness run`(一次性执行)@@ -1022,6 +1026,61 @@ Pipeline 执行过程中,扩展包**默认自动激活生效**,无需用户- 默认:实时跟踪当前运行日志(`tail -f` 模式),支持 Ctrl+C 中断- `--history <n>`:查看历史执行日志(`view` 模式,`n` 为历史索引,0 为最近一次)+### `/auto-harness issue`(GitCode Issue 自动处理)++管理 GitCode issue 的自动处理:扫描 issue 矩阵、创建修复任务、查看处理状态、清理记录。++需要先配置 `git.user_name`、`git.user_email` 和 `gitcode.access_token`(或 `GITCODE_ACCESS_TOKEN` 环境变量)。++#### 子命令++| 命令 | 说明 |+|---|---|+| `/auto-harness issue fix <issue_numbers>` | 为指定 GitCode issue 创建修复任务 |+| `/auto-harness issue scan [--repo <repo>] [选项]` | 扫描仓库 GitCode issue |+| `/auto-harness issue status` | 查看 issue 处理状态 |+| `/auto-harness issue delete <issue_numbers>` | 删除 issue 处理记录 |++#### `/auto-harness issue fix`(创建修复任务)++- 用法:`/auto-harness issue fix <issue_numbers>`+- 参数:+ - `<issue_numbers>`:issue 编号,多个用逗号分隔,如 `1272,1271,1270`+ - `--repo <repo>`:目标仓库,支持 `jiuwenswarm` / `agent_core`,未指定时交互选择+- 已关联 PR(open 或 merged)的 issue 自动跳过,不会创建重复任务+- 示例:+ - `/auto-harness issue fix 1286`+ - `/auto-harness issue fix 1272,1271,1270`++#### `/auto-harness issue scan`(扫描 Issue )++- 用法:`/auto-harness issue scan`+- 参数:+ - `--repo <repo>`:目标仓库,未指定时交互选择+ - `--page <n>`:页码,默认 1+ - `--labels <labels>`:标签过滤,逗号分隔,默认只显示 bug 类型+ - `--force-refresh`:强制从 GitCode API 刷新数据(默认使用缓存)+- 展示内容:issue 编号、标题、标签、难度评估、更新时间+- 示例:+ - `/auto-harness issue scan`+ - `/auto-harness issue scan --repo jiuwenswarm --page 1`+ - `/auto-harness issue scan --repo agent_core --force-refresh`++#### `/auto-harness issue status`(查看处理状态)++- 用法:`/auto-harness issue status`(无参数)+- 以表格列出所有 issue 处理记录:编号、状态、阶段、进度、详情+- 示例:`/auto-harness issue status`++#### `/auto-harness issue delete`(删除记录)++- 用法:`/auto-harness issue delete <issue_numbers>`+- 参数:+ - `<issue_numbers>`:要删除的 issue 编号+- 示例:+ - `/auto-harness issue delete 123`+ - `/auto-harness issue delete 123 456`+---## 待开发diff --git a/jiuwenswarm/agents/harness/common/auto_harness/issue_fix/service.py b/jiuwenswarm/agents/harness/common/auto_harness/issue_fix/service.pyindex c3cc4afbc3..3fa40fe88d 100644--- a/jiuwenswarm/agents/harness/common/auto_harness/issue_fix/service.py+++ b/jiuwenswarm/agents/harness/common/auto_harness/issue_fix/service.py@@ -220,6 +220,8 @@ class IssueFixService:task_status = str(task.get("status") or "")enriched["task_status"] = task_statusenriched["progress"] = await self._task_store.summarize_task_progress(task)+ if enriched["progress"].get("pr_url"):+ enriched["pr_url"] = enriched["progress"]["pr_url"]# 轻量 reconcile:TaskStore 已是终态但 IssueState 仍显示进行中,# 同步 IssueState 反映真实状态(不检查 PR,留待 fix reconcile 处理)diff --git a/jiuwenswarm/agents/harness/common/auto_harness/task_store.py b/jiuwenswarm/agents/harness/common/auto_harness/task_store.pyindex f247db6d33..4fe70621b5 100644--- a/jiuwenswarm/agents/harness/common/auto_harness/task_store.py+++ b/jiuwenswarm/agents/harness/common/auto_harness/task_store.py@@ -155,22 +155,10 @@ class TaskStore:async def summarize_task_progress(self, task: dict[str, Any]) -> dict[str, Any]:"""Read the latest task log and return a compact progress summary.- 智能状态查询:- - 终态任务:不读取日志,直接返回状态- - 运行中任务:反向读取关键事件(stage_result)+ 对所有任务(含终态)都读取日志获取阶段数据。+ 终态任务读取完整日志(以运行 enrichers 提取 PR URL 等),+ 运行中任务反向读取关键事件以提升性能。"""- task_status = str(task.get("status") or "")-- # 终态任务:不读取日志- if task_status in TERMINAL_STATUSES:- return {- "summary": f"终态: {task_status}",- "stages": [],- "completed_stages": [],- "current_stage": "",- "failed_stage": "",- }-log_path = resolve_latest_task_log_path(task, self._runs_dir)if not log_path:return {@@ -189,14 +177,20 @@ class TaskStore:"failed_stage": "",}- # 运行中任务:反向读取关键事件- key_events = await asyncio.to_thread(read_key_events_reverse, log_path, 20)- if key_events:- progress = summarize_progress_from_key_events(key_events)- else:- # 关键事件为空,读取完整日志+ task_status = str(task.get("status") or "")+ if task_status in TERMINAL_STATUSES:+ # 终态任务:读取完整日志以运行 enrichers(如提取 PR URL)logs = await asyncio.to_thread(self.read_log, log_path, 0, -1)progress = self.summarize_progress_from_logs(logs)+ else:+ # 运行中任务:反向读取关键事件+ key_events = await asyncio.to_thread(read_key_events_reverse, log_path, 20)+ if key_events:+ progress = summarize_progress_from_key_events(key_events)+ else:+ # 关键事件为空,读取完整日志+ logs = await asyncio.to_thread(self.read_log, log_path, 0, -1)+ progress = self.summarize_progress_from_logs(logs)progress["log_path"] = str(log_path)return progressdiff --git a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness-issue-fix.ts b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness-issue-fix.tsindex e6a9fe539e..168a0519a9 100644--- a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness-issue-fix.ts+++ b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness-issue-fix.ts@@ -470,11 +470,11 @@ export function formatIssueTable(rows: IssueListRow[]): string {const COL_STATUS = 10; // "created "const COL_STAGE = 14; // "implement "const COL_PROGRESS = 30; // "██░░░░░░░░ "- const COL_DETAILS = 30; // Details column+ const COL_DETAILS = 50; // Details column// Headerlines.push(`┌${"─".repeat(COL_ISSUE)}┬${"─".repeat(COL_STATUS)}┬${"─".repeat(COL_STAGE)}┬${"─".repeat(COL_PROGRESS)}┬${"─".repeat(COL_DETAILS)}┐`);- lines.push(`│${matrixPadRight("Issue", COL_ISSUE)}│${matrixPadRight("Status", COL_STATUS)}│${matrixPadRight("Stage", COL_STAGE)}│${matrixPadRight("Progress", COL_PROGRESS)}│${matrixPadRight("DeTails", COL_DETAILS)}│`);+ lines.push(`│${matrixPadRight("Issue", COL_ISSUE)}│${matrixPadRight("Status", COL_STATUS)}│${matrixPadRight("Stage", COL_STAGE)}│${matrixPadRight("Progress", COL_PROGRESS)}│${matrixPadRight("Details", COL_DETAILS)}│`);lines.push(`├${"─".repeat(COL_ISSUE)}┼${"─".repeat(COL_STATUS)}┼${"─".repeat(COL_STAGE)}┼${"─".repeat(COL_PROGRESS)}┼${"─".repeat(COL_DETAILS)}┤`);// Rows with separators between each rowdiff --git a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.ts b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.tsindex c114e9877e..5cac5fd331 100644--- a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.ts+++ b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/auto-harness.ts@@ -772,6 +772,44 @@ interface LogEntry {tool_call_id?: string;}+// Drain remaining logs from completed execution history+async function drainHistoryLogs(+ ctx: CommandContext,+ task_id: string,+ offset: number,+ parseState: ParseState | undefined,+ setParseState: (state: ParseState | undefined) => void+): Promise<void> {+ let historyOffset = offset;+ let hasMoreHistory = true;+ while (hasMoreHistory) {+ const historyResult = await ctx.request<{+ error?: string;+ logs?: Array<LogEntry>;+ has_more?: boolean;+ }>("schedule.logs", {+ task_id,+ log_type: "history",+ history_index: 0,+ offset: historyOffset,+ limit: 3000,+ }, 120000);++ if (historyResult.error || !historyResult.logs || historyResult.logs.length === 0) break;++ const result = parseAndAggregateLogs(historyResult.logs, parseState);+ setParseState(result.state);+ for (const section of result.sections) {+ const formattedLine = formatLogSection(section);+ if (formattedLine) {+ ctx.addItem(addInfo(ctx.sessionId, formattedLine, "i"));+ }+ }+ historyOffset += historyResult.logs.length;+ hasMoreHistory = historyResult.has_more ?? false;+ }+}+// Stream logs for currently running task (tail -f style)async function streamCurrentLogs(ctx: CommandContext,@@ -859,8 +897,15 @@ async function streamCurrentLogs(// Check for error - likely means execution finishedif (result.error) {- // Execution finished - show completion message- if (result.error.includes("当前无正在执行的日志") || result.error.includes("不存在")) {+ if (result.error.includes("当前无正在执行的日志")) {+ // Task completed — pull remaining logs from execution history+ await drainHistoryLogs(ctx, task_id, offset, parseState,+ (updatedState) => { parseState = updatedState; });+ ctx.addItem(addInfo(ctx.sessionId, `\n✅ 任务执行完成\n`));+ return;+ }+ // Other errors (e.g. task doesn't exist) — show message directly+ if (result.error.includes("不存在")) {ctx.addItem(addInfo(ctx.sessionId, `\n✅ 任务执行完成\n`));return;}@@ -920,6 +965,9 @@ async function streamCurrentLogs(if (pollCount >= maxPolls) {ctx.addItem(addInfo(ctx.sessionId, `\n⏱️ 日志跟踪已超时退出 \n💡 任务仍在后台运行,可使用 /auto-harness schedule logs ${task_id} 继续查看\n`));} else {+ // Try to read remaining logs from completed execution history+ await drainHistoryLogs(ctx, task_id, offset, parseState,+ (updatedState) => { parseState = updatedState; });ctx.addItem(addInfo(ctx.sessionId, `\n✅ 任务执行完成\n执行ID: ${executionId}\n`));}}@@ -1049,6 +1097,8 @@ interface ParsedLogSection {extensions_by_name?: Record<string, ExtensionProgressInfo>;// Gap count for inline progress bar displaygap_count?: number;+ // Skipped stages (issue-fix skips assess/plan)+ skipped_stages?: string[];// Stage messages (for meta_evolve_pipeline CI fix tracking)stage_messages?: string[];ci_fix_count?: number;@@ -1328,6 +1378,18 @@ function formatAssistantContent(content: string): string {return formattedLines.join('\n');}+// Helper: extract PR URL from stage messages (publish stage)+function extractPrUrl(messages: string[]): string | undefined {+ const urlRegex = /https:\/\/gitcode\.com\/[^\s)>\"]+/;+ for (const msg of messages) {+ const match = msg.match(urlRegex);+ if (match && /(?:pulls|pull_requests|merge_requests)\/\d+/.test(match[0])) {+ return match[0];+ }+ }+ return undefined;+}+// Format log section for display (compact for streaming, detailed for history)function formatLogSection(section: ParsedLogSection, detailed: boolean = false): string | null {switch (section.type) {@@ -1369,7 +1431,7 @@ function formatLogSection(section: ParsedLogSection, detailed: boolean = false):}}- const progressBar = formatStageProgress(section.stages, effectiveCompleted, activeStage, section.gap_count, section.extension_order?.length, effectiveSuccessSet, effectiveResultSet);+ const progressBar = formatStageProgress(section.stages, effectiveCompleted, activeStage, section.gap_count, section.extension_order?.length, effectiveSuccessSet, effectiveResultSet, section.skipped_stages);const icon = section.status === "success" ? "✅" : section.status === "failed" ? "❌" : "⏸️";const color = section.status === "success" ? ANSI.green : section.status === "failed" ? ANSI.red : ANSI.yellow;const statusText = section.status === "success" ? "完成" : section.status === "failed" ? "失败" : section.status;@@ -1394,6 +1456,18 @@ function formatLogSection(section: ParsedLogSection, detailed: boolean = false):detailLines.push(` 🔄 修复循环: ${section.ci_fix_count} 次`);}}+ // publish 阶段:显示 PR 链接和任务总结+ if (section.stage === 'publish' && section.stage_messages) {+ const prUrl = extractPrUrl(section.stage_messages);+ if (prUrl) {+ detailLines.push(` 🔗 PR: ${prUrl}`);+ }+ const summaryMsg = section.stage_messages.find(m => m.includes('任务总结'));+ if (summaryMsg) {+ const trimmed = summaryMsg.length > 120 ? summaryMsg.substring(0, 120) + '…' : summaryMsg;+ detailLines.push(` 📋 ${trimmed}`);+ }+ }// Extension status matrix shown AFTER stage-specific content, only during build_verify// (activate stage shows merge/activation info lines instead, not the matrix)if (section.stage !== 'activate' && section.extension_order && section.extensions_by_name && section.extension_order.length > 0) {@@ -1416,7 +1490,8 @@ function formatLogSection(section: ParsedLogSection, detailed: boolean = false):section.gap_count,section.extension_order?.length,new Set(section.stages_with_success_result || []),- new Set(section.stages_with_result || [])+ new Set(section.stages_with_result || []),+ section.skipped_stages);const showContent = section.content && section.content !== stageDisplayName;const normalizedContent = (section.content || "").trim();@@ -1500,7 +1575,9 @@ function formatStageProgress(extensionCount?: number,// Track which stages succeeded vs failed (for warning icon display)stagesWithSuccessResult?: Set<string>,- stagesWithResult?: Set<string>+ stagesWithResult?: Set<string>,+ // Skipped stages (issue-fix: assess/plan are skipped, shown differently)+ skippedStages?: string[]): string {if (!stages || stages.length === 0) return "";@@ -1515,8 +1592,10 @@ function formatStageProgress(const bar = `${ANSI.green}${"█".repeat(filledLength)}${ANSI.reset}${ANSI.gray}${"░".repeat(barLength - filledLength)}${ANSI.reset}`;// Create stage status line with icons and names+ const skippedSet = new Set(skippedStages || []);const parts = stages.map((s) => {- const isCompleted = completedStages?.includes(s.slot);+ const isSkipped = skippedSet.has(s.slot);+ const isCompleted = !isSkipped && completedStages?.includes(s.slot);const isCurrent = currentStage === s.slot;const hasSuccess = stagesWithSuccessResult?.has(s.slot);const hasResult = stagesWithResult?.has(s.slot);@@ -1530,7 +1609,9 @@ function formatStageProgress(inlineCount = ` (${extensionCount})`;}- if (isCompleted) {+ if (isSkipped) {+ return `${ANSI.dimGray}⊘ ${s.display_name}${ANSI.reset}`;+ } else if (isCompleted) {// 成功→✓(绿);失败(hasResult无success)→⚠(黄)if (hasSuccess) {return `${ANSI.green}✓ ${s.display_name}${inlineCount}${ANSI.reset}`;@@ -1577,6 +1658,8 @@ interface ParseState {stagesWithResult: Set<string>;// 已出现过的阶段(任意status)stagesAppeared: Set<string>;+ // 已跳过的阶段(issue-fix 模式下 assess/plan)+ skippedStages: string[];}function parseAndAggregateLogs(@@ -1597,6 +1680,7 @@ function parseAndAggregateLogs(const stagesWithSuccessResult: Set<string> = initialState?.stagesWithSuccessResult ?? new Set<string>();const stagesWithResult: Set<string> = initialState?.stagesWithResult ?? new Set<string>();const stagesAppeared: Set<string> = initialState?.stagesAppeared ?? new Set<string>();+ const skippedStages: string[] = initialState?.skippedStages ?? [];// Note: pipeline type is determined dynamically in the loop when pipelineInfo is set@@ -1621,7 +1705,8 @@ function parseAndAggregateLogs(case "chat.error":const errorMsg = log.error || content || "未知错误";- hasFailure = true; // Chat error indicates execution failure+ // chat.error 不表示任务失败(如 learnings 阶段的 chat.error 不影响 publish 成功),+ // 仅由 stage_result 的状态来判定任务成败。sections.push({ type: "error", content: errorMsg });break;@@ -1639,6 +1724,17 @@ function parseAndAggregateLogs(break;}+ // Detect issue-fix skip message and mark assess/plan as skipped+ if (content.includes("显式 GitCode issue 修复任务,跳过 assess/plan")) {+ for (const skipped of ["assess", "plan"]) {+ if (!completedStages.includes(skipped)) {+ completedStages.push(skipped);+ skippedStages.push(skipped);+ stagesWithResult.add(skipped);+ }+ }+ }+// Regular stage messageconst stage = log.stage || "";if (currentStage !== stage) {@@ -1652,6 +1748,7 @@ function parseAndAggregateLogs(stages: pipelineInfo?.stages,pipeline: pipelineInfo?.pipeline,completed_stages: [...completedStages],+ skipped_stages: [...skippedStages],});break;@@ -1757,6 +1854,7 @@ function parseAndAggregateLogs(extension_order: [...extensionOrder],extensions_by_name: extensionsSnapshot,gap_count: gapCount,+ skipped_stages: [...skippedStages],});break;}@@ -1852,6 +1950,7 @@ function parseAndAggregateLogs(gap_count: gapCount,stage_messages: stageMessages.length > 0 ? stageMessages : undefined,ci_fix_count: ciFixCount,+ skipped_stages: [...skippedStages],});break;@@ -1872,15 +1971,17 @@ function parseAndAggregateLogs(finalStatus = hasBuildVerifyAppeared && hasActivateSuccess ? "success" : "failed";} else if (pipelineType === "meta_evolve_pipeline") {// Rule: every stage must have harness.stage_result with success status- // Get all expected stages from pipelineInfo+ // (issue-fix 模式下跳过的阶段视为成功)const expectedStages = pipelineInfo?.stages?.map(s => s.slot) || [];- // Check if all expected stages have reported success+ const skippedSet = new Set(skippedStages);const allStagesSuccessful = expectedStages.length > 0 &&- expectedStages.every(stage => stagesWithSuccessResult.has(stage));+ expectedStages.every(stage =>+ stagesWithSuccessResult.has(stage) || skippedSet.has(stage)+ );finalStatus = allStagesSuccessful ? "success" : "failed";} else {- // For other pipelines: any failure means task failed- finalStatus = hasFailure ? "failed" : (log.status || "success");+ // 仅根据 stage_result 判断任务成败,chat.error 不影响最终状态+ finalStatus = hasFailure ? "failed" : "success";}sections.push({@@ -1939,7 +2040,7 @@ function parseAndAggregateLogs(}}- return { sections, state: { pipelineInfo, completedStages, currentStage, extensionOrder, extensionsByName, gapCount, ciFixCount, hasFailure, stagesWithSuccessResult, stagesWithResult, stagesAppeared } };+ return { sections, state: { pipelineInfo, completedStages, currentStage, extensionOrder, extensionsByName, gapCount, ciFixCount, hasFailure, stagesWithSuccessResult, stagesWithResult, stagesAppeared, skippedStages } };}// Format log section for history display (detailed with colors)@@ -2441,8 +2542,8 @@ const issueStatusCommand: SlashCommand = {: (issue.status || "unknown"));// 终态任务进度显示100%或0%- const terminalStatuses = new Set(["success", "failed", "pr_created", "completed", "skipped", "needs_human"]);- const finalProgress = terminalStatuses.has(effectiveStatus) ? (effectiveStatus === "success" || effectiveStatus === "pr_created" ? 100 : 0) : progressPercent;+ const terminalStatuses = new Set(["success", "failed", "pr_created", "completed", "completed_without_pr", "complete", "skipped", "needs_human"]);+ const finalProgress = terminalStatuses.has(effectiveStatus) ? (effectiveStatus === "success" || effectiveStatus === "pr_created" || effectiveStatus === "completed" || effectiveStatus === "completed_without_pr" || effectiveStatus === "complete" ? 100 : 0) : progressPercent;let details = "";if (issue.pr_url) {diff --git a/jiuwenswarm/gateway/channel_manager/web/app_web_handlers.py b/jiuwenswarm/gateway/channel_manager/web/app_web_handlers.pyindex 688b8b5b9a..d6b8591c1a 100644--- a/jiuwenswarm/gateway/channel_manager/web/app_web_handlers.py+++ b/jiuwenswarm/gateway/channel_manager/web/app_web_handlers.py@@ -2859,7 +2859,6 @@ def _register_web_handlers(bind: WebHandlersBindParams) -> None:"download_token": download_info["download_token"],"filename": download_info["name"],"file_size": download_info["size"],- "expires_at": download_info["expires_at"],"message": "Package exported successfully",})# No cleanup here - file will be served via HTTP download endpoint