Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/task/HSR/tools/log_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ def select_failure_summary_lines(lines: list[str], limit: int = 8) -> list[str]:
ERROR 级别行时只保留它们和截图/回溯行,否则退回截尾。
"""

lines = [strip_ansi(line) for line in lines]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Commit a regression test for colored failure summaries

When an ANSI-colored ERROR is followed by more than eight ordinary log lines, the parent drops the actual error while this commit correctly retains it. However, the commit adds no regression test, and searching tests/ found no colored-summary case; the cited test_hsr_m7a_review.py exercises runner lifecycle rather than summary selection. Root AGENTS.md requires deterministic regression tests to accompany the implementation. Include a test asserting that this input retains the error without ANSI codes and that the assertion fails without the new normalization.

AGENTS.md reference: AGENTS.md:L29-L29

Useful? React with 👍 / 👎.


picked = [
line
for line in lines
Expand Down
2 changes: 2 additions & 0 deletions changelog.d/fix-2000-hsr-colored-summary.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
project: hsr
修复三月七彩色日志导致失败摘要遗漏具体错误的问题