OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Bug]: Studio execution logs are synthesized from task status / 任务执行日志由状态拼接

Open viafcccy opened this issue 2 months ago • 0 comments

Issue Origin

Observed or reproduced in a real environment

Bug Description

The Task Center labels a section “Execution Trace Log”, but generateStepLogs() creates fixed messages from the current task status. These lines are not persisted execution events. Every line uses created_at, including completion and failure messages. Worker names, vector persistence, integrity checks and self-healing claims are inferred without corresponding events.

任务中心的“任务执行日志”由前端根据当前状态拼接,所有行使用创建时间。用户无法据此判断真实执行过程,部分组件、校验和自愈描述没有事件来源。

Steps to Reproduce

  1. Open Studio → Task Center on v0.4.17.1.
  2. Open an existing completed resource-import task whose updated time is later than its creation time.
  3. Compare the task timestamps with the execution-log lines: even the completion line uses creation time.
  4. Open a failed Session-commit task: it receives the same fixed Worker/ResourcePipeline narrative.

在本地真实任务上已观察到以上行为;无需制造大量任务或调用特定模型。

Expected Behavior

Show events actually recorded for the selected task, with backend recording timestamps. Persist recorded history across refresh/restart. Preserve task metadata, errors and results. Explicitly show when historical events are unavailable or truncated; do not invent missing history.

展示真实上报且归属于该任务的事件,时间语义准确,历史可回看;旧任务没有事件时明确说明。

Actual Behavior

generateStepLogs() in web-studio/src/routes/tasks/-components/task-detail-sheet.tsx generates status-dependent strings and discards previous-state lines after status changes. A running task always receives an EmbeddingService message; a completed task is described as having passed physical consistency checks and self-healed, without supporting event data.

真实错误文本被包成 Error Traceback,但它不一定是堆栈;固定 WorkerThread-01 也不是后端报告的执行者。

Minimal Reproducible Example


Error Logs


OpenViking Version

v0.4.17.1; source also checked at 3ae94afeea047bfedd5d9e25c3f2e6ae5f20be63

Python Version

3.13.15 (Docker server on macOS)

Operating System

macOS

Model Backend

No response

Additional Context

Proposed first increment / 首阶段方案:

  • Reuse TaskTracker ownership and PersistentTaskStore to save bounded task events with task snapshots.
  • Record existing lifecycle/stage/error changes, plus directly available process events; provide an internal explicit event-reporting entry point so events do not require a status change.
  • Add include_events=true to GET /api/v1/tasks/{task_id}; preserve existing default/list responses and identity boundaries.
  • Replace synthetic Studio output with recorded events and English/Chinese messages.
  • Missing historical events remain missing. Existing task metadata, public errors and results stay available.
  • Add further resource/Session process events in later focused PRs; full component logs and Python traceback collection are outside this increment.

Storage compatibility: main already preserves unknown persisted task fields (a5166386). Older releases predating that behavior may not read newly extended task files; rollback compatibility needs explicit validation.

I am willing to implement this. This Issue precedes implementation because the contribution guide requests discussion for public API/persistence changes. Related origin: #3828 introduced the current generator; it does not supply backend events.

viafcccy avatar Sep 09 '26 08:09 viafcccy