Keep invalid durations out of dashboard test reports (DASH-TEST-DURATION-VALIDATION) #2033

Merged
alexandersato0830 merged 1 commit from upstream-pr/2033 into main 2026-11-28 10:49:22 +00:00
alexandersato0830 commented 2026-11-25 18:36:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by alexandersato0830 on 2026-11-25T18:36:17Z.


Claimed in the coordination issue as: DASH-TEST-DURATION-VALIDATION

What and why

A non-finite JUnit time value currently reaches the snapshot and the dashboard's embedded JSON, which JSON.parse rejects. A malformed Test time = 1..5 sec line in LastTest.log can also abort the import. Parse both sources through a single duration check. Keep the verdict and use an unknown duration for malformed, negative or non-finite values.

Tested

  • python -I tests/test_progress_dashboard.py passed all 53 tests on Windows 11 with Python 3.11.17. Both new regressions fail on b9320a118.
  • Ran the dashboard CLI with a synthetic JUnit file containing Infinity and 0.08. Node parsed both the written snapshot and the HTML's embedded JSON. Both verdicts survived and the valid duration remained 0.08.
  • git diff --check and the source-only check passed.

GPUs tested: n/a (synthetic reports)

AI-assisted: yes (Codex)

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5497015330 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2033). Originally posted by [alexandersato0830](https://github.com/alexandersato0830) on 2026-11-25T18:36:17Z. --- Claimed in the coordination issue as: [DASH-TEST-DURATION-VALIDATION](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171105542) ### What and why A non-finite JUnit `time` value currently reaches the snapshot and the dashboard's embedded JSON, which `JSON.parse` rejects. A malformed `Test time = 1..5 sec` line in `LastTest.log` can also abort the import. Parse both sources through a single duration check. Keep the verdict and use an unknown duration for malformed, negative or non-finite values. ### Tested - `python -I tests/test_progress_dashboard.py` passed all 53 tests on Windows 11 with Python 3.11.17. Both new regressions fail on `b9320a118`. - Ran the dashboard CLI with a synthetic JUnit file containing `Infinity` and `0.08`. Node parsed both the written snapshot and the HTML's embedded JSON. Both verdicts survived and the valid duration remained `0.08`. - `git diff --check` and the source-only check passed. GPUs tested: n/a (synthetic reports) AI-assisted: yes (Codex) ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption.
DeadlyChirp commented 2026-11-26 10:32:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-26T10:32:39Z.


Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_progress_dashboard.py: 53 passed, 20 subtests passed (main: 51 passed).

(AI-assisted test run; output checked by hand.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7189505771 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2033#issuecomment-7189505771). Originally posted by [DeadlyChirp](https://github.com/DeadlyChirp) on 2026-11-26T10:32:39Z. --- Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_progress_dashboard.py`: 53 passed, 20 subtests passed (main: 51 passed). (AI-assisted test run; output checked by hand.)
sodove commented 2026-11-28 10:11:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T10:11:51Z.


#2033 | head 1ba4839b707c12500826034975a06e7dd8f43f40 | python3 -I tests/test_progress_dashboard.py -v, python3 -I tests/test_progress_dashboard.py Tests.test_junit_omits_invalid_durations_without_losing_verdicts Tests.test_lasttest_retains_verdicts_after_an_invalid_duration -v | red: 53 run, 2 failures, 1 error in full file / both new tests fail | green: 53 run, 1 failure in full file / 2 new tests passed | Fix reproduced. Full file still red on baseline assertion

The two new duration tests failed on main and both passed after merge. The complete file still fails Github.test_default_repo_is_the_one_the_readme_clones, which checks the README clone URL against the dashboard default. The identical assertion also failed on untouched main (1 failure in 51 tests).

Pinned main 33db04a7010e81c40a7a6a15624525aa0c4a3a58, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Full suite: not run. AI-assisted: OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237736993 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2033#issuecomment-7237736993). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T10:11:51Z. --- #2033 | head `1ba4839b707c12500826034975a06e7dd8f43f40` | `python3 -I tests/test_progress_dashboard.py -v`, `python3 -I tests/test_progress_dashboard.py Tests.test_junit_omits_invalid_durations_without_losing_verdicts Tests.test_lasttest_retains_verdicts_after_an_invalid_duration -v` | red: 53 run, 2 failures, 1 error in full file / both new tests fail | green: 53 run, 1 failure in full file / 2 new tests passed | **Fix reproduced. Full file still red on baseline assertion** The two new duration tests failed on main and both passed after merge. The complete file still fails Github.test_default_repo_is_the_one_the_readme_clones, which checks the README clone URL against the dashboard default. The identical assertion also failed on untouched main (1 failure in 51 tests). Pinned main `33db04a7010e81c40a7a6a15624525aa0c4a3a58`, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Full suite: not run. AI-assisted: OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7237628300).
DadaCap commented 2026-11-28 10:49:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T10:49:24Z.


Merged, thank you @alexandersato0830!

What it does: Keep invalid durations out of dashboard test reports (DASH-TEST-DURATION-VALIDATION)

How it was checked: sodove tested this PR at head 1ba4839b7 on main 33db04a70: the PR's own test fails on main and passes with this PR merged in (his result is linked from the batch summary in #1608). We then re-ran the same test locally on Windows 11 and got the same verdict: on main, red (2 failures, 1 error); with the PR, still 1 failure in full file.

One other assertion in the same test file still fails after the merge, and it fails the same way on unchanged main (a known main failure, not caused by this PR); both new duration tests pass.

CI: the red jobs on this PR fail the same way on main, or on the older main it was built on (the cs_dpp_cmp.asm translator fixture, since fixed on main, and the Windows runner's Visual Studio setup), so none comes from this change.

Merged one by one with 20 other PRs of the same reviewed batch, pinned to the tested head.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238144911 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2033#issuecomment-7238144911). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T10:49:24Z. --- Merged, thank you @alexandersato0830! **What it does:** Keep invalid durations out of dashboard test reports (DASH-TEST-DURATION-VALIDATION) **How it was checked:** sodove tested this PR at head `1ba4839b7` on main `33db04a70`: the PR's own test fails on main and passes with this PR merged in (his result is linked from the batch summary in #1608). We then re-ran the same test locally on Windows 11 and got the same verdict: on main, red (2 failures, 1 error); with the PR, still 1 failure in full file. One other assertion in the same test file still fails after the merge, and it fails the same way on unchanged main (a known main failure, not caused by this PR); both new duration tests pass. **CI:** the red jobs on this PR fail the same way on main, or on the older main it was built on (the `cs_dpp_cmp.asm` translator fixture, since fixed on main, and the Windows runner's Visual Studio setup), so none comes from this change. Merged one by one with 20 other PRs of the same reviewed batch, pinned to the tested head. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
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!2033
No description provided.