Read AI summaries from results.xml

The log-detective module (gluetool-modules!1091 (merged)) writes its analysis into results.xml as ai-summary elements: one per failed testcase, or one on the plan when no testcase failed. results.html now renders them in place and stops requesting the api-ai.json and results-ai.xml prototype files.

  • Reads testcase > ai-summary and testsuite > ai-summary: explanation, solution, the no-issue-found attribute and snippets > snippet with optional source-file and line-number.
  • Renders model output as plain text through Lit escaping. The old code passed it to unsafeHTML.
  • Drops the request-level AI box. The Testing Farm API has no ai_summary field, so only api-ai.json ever filled it.
  • Keeps summaries opt-in. The toggle appears only when results.xml contains an ai-summary.
  • tmt-single-fail-ai now carries a testcase-level summary, including a snippet with <4> to check escaping. The new tmt-failed-prepare-ai scenario covers the plan-level case.

Live example from a run of gluetool-modules!1091 (merged): https://artifacts.dev.testing-farm.io/f2d12b90-2fed-4fb3-adbf-7dcb805fe1ee/

Generated-by: Claude Code

Edited by Miroslav Vadkerti

Merge request reports

Loading
Loading