progress_dashboard: reject non-JUnit XML reports (DASH-JUNIT-ROOT) #2625

Merged
bimo0o merged 1 commit from upstream-pr/2625 into main 2026-11-30 10:04:22 +00:00
bimo0o commented 2026-11-29 18:55:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by bimo0o on 2026-11-29T18:55:45Z.


Claimed in the coordination issue as: DASH-JUNIT-ROOT. Resubmission of #2619 on main at 7c330c7.

What and why

Mark non-JUnit XML passed to --junit as invalid. Previously, a foreign XML root could be accepted as an empty report or contribute test cases from nested elements. Empty reports with a testsuite or testsuites root remain valid.

Tested

  • Windows, Python 3.12: all 67 dashboard tests and both encoding tests passed. The independent review on #2619 confirmed the regression test failed on its baseline.
  • The focused interpolation suite still reports two failures also seen in #2619 CI. This patch changes only the dashboard and its tests.
  • Changed-file game-data check and git diff whitespace check passed.

GPUs tested: n/a

AI-assisted: yes, OpenAI Codex (GPT-6).

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract update: n/a.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5553988380 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2625). Originally posted by [bimo0o](https://github.com/bimo0o) on 2026-11-29T18:55:45Z. --- Claimed in the coordination issue as: [DASH-JUNIT-ROOT](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7202561061). Resubmission of #2619 on main at `7c330c7`. ### What and why Mark non-JUnit XML passed to `--junit` as invalid. Previously, a foreign XML root could be accepted as an empty report or contribute test cases from nested elements. Empty reports with a `testsuite` or `testsuites` root remain valid. ### Tested - Windows, Python 3.12: all 67 dashboard tests and both encoding tests passed. The independent review on #2619 confirmed the regression test failed on its baseline. - The focused interpolation suite still reports two failures also seen in #2619 CI. This patch changes only the dashboard and its tests. - Changed-file game-data check and git diff whitespace check passed. GPUs tested: n/a AI-assisted: yes, OpenAI Codex (GPT-6). ### Checklist - [x] Based on current main. - [x] One topic. - [x] No game data, keys or decryption. - Translator contract update: n/a.
merzleckeier commented 2026-11-29 19:56:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T19:56:37Z.


Independent CLI A/B for 2a4b8783 on 0e8737f2 (tree bda8211a), CachyOS / Python 3.14.10, CTest 4.4.5 and pytest 9.2.0. I generated real JUnit reports with those tools from synthetic passing, failing, skipped and setup-error cases, then ran tools/progress_dashboard.py and read the output JSON and HTML.

  • Main accepts both an empty foreign XML root and one containing a nested suite, adding a spurious verified test from the latter. The PR marks both sources invalid and the spurious row disappears from both outputs.
  • The three CTest and four pytest records still appear once each. Empty <testsuite/> and <testsuites/> reports remain ok with zero records. Malformed XML remains invalid and missing files remain missing. The strict CTest option also still rejects a foreign root.
  • All 67 dashboard tests passed on the merge. The PR still merges cleanly onto 8085eab2.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261681490 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2625#issuecomment-7261681490). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T19:56:37Z. --- Independent CLI A/B for `2a4b8783` on `0e8737f2` (tree `bda8211a`), CachyOS / Python 3.14.10, CTest 4.4.5 and pytest 9.2.0. I generated real JUnit reports with those tools from synthetic passing, failing, skipped and setup-error cases, then ran `tools/progress_dashboard.py` and read the output JSON and HTML. - Main accepts both an empty foreign XML root and one containing a nested suite, adding a spurious verified test from the latter. The PR marks both sources `invalid` and the spurious row disappears from both outputs. - The three CTest and four pytest records still appear once each. Empty `<testsuite/>` and `<testsuites/>` reports remain `ok` with zero records. Malformed XML remains `invalid` and missing files remain `missing`. The strict CTest option also still rejects a foreign root. - All **67** dashboard tests passed on the merge. The PR still merges cleanly onto `8085eab2`. AI-assisted with OpenAI Codex.
aegish-zagi commented 2026-11-29 20:25:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-11-29T20:25:22Z.


VERIFY-2625 (independent verification, aegish-zagi)

  • PR: #2625 | head 2a4b87835 | merge state vs main: clean merge onto main c2a726196 in a scratch branch
  • Tests run: python3 -I tests/test_progress_dashboard.py
  • Results: red-on-main vs green-on-PR — the PR's test file against plain main code: 67 tests, 1 failure (the new non-JUnit-root case returns entries instead of rejecting). With the PR merged: 67 tests, OK. Plain main's own file: 66 tests, OK.
  • Diff audit: 2 files, +19 lines — tools/progress_dashboard.py rejects a parsed XML report whose root is not the JUnit root before reading entries; one test added. No game data.
  • Platform: Linux, Python 3.12.3, no GPU (Profile Z)
  • AI-assisted: yes

Verdict: holds up — the new test fails without the fix and passes with it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7262067219 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2625#issuecomment-7262067219). Originally posted by [aegish-zagi](https://github.com/aegish-zagi) on 2026-11-29T20:25:22Z. --- VERIFY-2625 (independent verification, aegish-zagi) - PR: #2625 | head `2a4b87835` | merge state vs main: clean merge onto `main` `c2a726196` in a scratch branch - Tests run: `python3 -I tests/test_progress_dashboard.py` - Results: red-on-main vs green-on-PR — the PR's test file against plain `main` code: 67 tests, 1 failure (the new non-JUnit-root case returns entries instead of rejecting). With the PR merged: 67 tests, OK. Plain `main`'s own file: 66 tests, OK. - Diff audit: 2 files, +19 lines — `tools/progress_dashboard.py` rejects a parsed XML report whose root is not the JUnit root before reading entries; one test added. No game data. - Platform: Linux, Python 3.12.3, no GPU (Profile Z) - AI-assisted: yes Verdict: holds up — the new test fails without the fix and passes with it.
fiestorra commented 2026-11-30 05:35:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T05:35:23Z.


Independent verification on this machine (Windows 11, Python 3.13.14), and the negative control bites.

1. It applies. merge-tree clean; 2a4b87835 cherry-picks onto main 1d22590b9 without a conflict. Two files, 19 insertions(+): tools/progress_dashboard.py and its test.

2. Its tests pass:

python3 -m pytest tests/test_progress_dashboard.py -q   -> 67 passed, 38 subtests

3. The negative control fails on main's tool - the PR's test against the reverted tools/progress_dashboard.py:

-> 1 failed, 66 passed, 38 subtests
   FAILED Tests::test_junit_rejects_unrelated_xml_but_accepts_empty_report

So the acceptance rule the commit adds - an unrelated XML file is refused while an empty-but-valid JUnit report is still accepted - is absent on main and present with the change. One test, and it is the one that matters.

What I did not test: a real dashboard run against a directory of CI reports. The test builds the XML it needs, so what is proved is the accept/reject predicate, not what the page shows when a repository has a mix of report shapes.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269811313 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2625#issuecomment-7269811313). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T05:35:23Z. --- Independent verification on this machine (Windows 11, Python 3.13.14), and **the negative control bites**. **1. It applies.** `merge-tree` clean; `2a4b87835` cherry-picks onto `main` `1d22590b9` without a conflict. Two files, `19 insertions(+)`: `tools/progress_dashboard.py` and its test. **2. Its tests pass:** ``` python3 -m pytest tests/test_progress_dashboard.py -q -> 67 passed, 38 subtests ``` **3. The negative control fails on `main`'s tool** - the PR's test against the reverted `tools/progress_dashboard.py`: ``` -> 1 failed, 66 passed, 38 subtests FAILED Tests::test_junit_rejects_unrelated_xml_but_accepts_empty_report ``` So the acceptance rule the commit adds - an unrelated XML file is refused while an empty-but-valid JUnit report is still accepted - is **absent on `main`** and present with the change. One test, and it is the one that matters. **What I did not test:** a real dashboard run against a directory of CI reports. The test builds the XML it needs, so what is proved is the accept/reject predicate, not what the page shows when a repository has a mix of report shapes. Written with an AI assistant.
MoonEyes commented 2026-11-30 10:04:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T10:04:19Z.


Merging. Head 2a4b87835 merges cleanly with main 4014af7fe and does not force a rebase of #2566. Red/green from aegish-zagi and fiestorra (above), redone on Windows 11: the new test fails without the fix (1 of 67) and passes with it, its neighbour passes. The branch's older red CI jobs were not traced one by one; the changed files' tests pass on current main. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7275075548 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2625#issuecomment-7275075548). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T10:04:19Z. --- Merging. Head `2a4b87835` merges cleanly with `main` `4014af7fe` and does not force a rebase of #2566. Red/green from aegish-zagi and fiestorra (above), redone on Windows 11: the new test fails without the fix (1 of 67) and passes with it, its neighbour passes. The branch's older red CI jobs were not traced one by one; the changed files' tests pass on current main. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2625
No description provided.