Skip to content

fix(debug): 补充调试上下文 Mock 输出回显 - #845

Merged
dengyh merged 1 commit into
TencentBlueKing:developfrom
dengyh:ai/expose-debug-mock-outputs
Jul 30, 2026
Merged

fix(debug): 补充调试上下文 Mock 输出回显#845
dengyh merged 1 commit into
TencentBlueKing:developfrom
dengyh:ai/expose-debug-mock-outputs

Conversation

@dengyh

@dengyh dengyh commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

变更说明

  • debug_contextnodes[] 新增 mock_outputs 字段。
  • 节点为成功 Mock 预设时返回已保存的输出,支持页面刷新后回填 Mock 编辑弹窗及底部结果区域。
  • 真实执行节点和失败 Mock 节点返回 null,避免误展示历史输出。

验证

  • 调试上下文定向用例:9 passed
  • 完整调试模块:81 passed
  • blackflake8、提交钩子及 git diff --check 均通过

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

✅ 变更简洁明确,逻辑正确。

  • mock_outputs 字段已在模型和迁移中存在,此 PR 仅将其暴露到 build_context_view 的返回结构中。
  • 条件逻辑与已有的 mock_error 完全对称(execution_mode == "mock" and mock_result == "success"),语义清晰。
  • 测试覆盖了正向(成功预设返回 outputs)和反向(失败预设返回 None、真实执行返回 None)两种场景。
  • 无 Critical 或 Important 级别的问题。

LGTM 🎉

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.60%. Comparing base (4da513d) to head (1e33a2d).
⚠️ Report is 13 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #845   +/-   ##
========================================
  Coverage    83.60%   83.60%           
========================================
  Files          324      324           
  Lines        20722    20726    +4     
========================================
+ Hits         17324    17328    +4     
  Misses        3398     3398           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dengyh
dengyh merged commit fa209d6 into TencentBlueKing:develop Jul 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants