progress_dashboard: keep distinct same-second snapshots (DASH-SNAPSHOT-COLLISION) #970

Manually merged
github merged 1 commit from gh-pr/970/head into gh-pr/970/base 2026-11-26 09:31:04 +00:00
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 16:03 UTC · original
TheGeogeo:fix/dashboard-snapshot-collision → main · +19 −2 · 2 files · 1 commits · merged 2026-11-24 20:04 UTC

Claimed in the coordination issue as: DASH-SNAPSHOT-COLLISION

What and why

Two different dashboard snapshots written in the same UTC second shared an archive path. Use the existing full content hash alongside the UTC stamp in new archive names. This preserves both snapshots and keeps consecutive unchanged snapshots deduplicated. The history and snapshot JSON retain their current schema.

Thanks to xel1uz for the report.

Tested

  • Windows, Python 3.12.4. The fixed-timestamp regression failed on 1504c1af because the first archive was replaced.
  • python -I -B tests/test_progress_dashboard.py: 51 passed.
  • python -I -B tests/test_text_write_line_endings.py: 3 passed.
  • Isolated merge with #625 (3c2ad30d) had no conflicts. The combined dashboard suite passed all 56 tests.
  • git diff --check and python -I -B scripts/check_no_game_data.py tools/progress_dashboard.py tests/test_progress_dashboard.py: passed.

GPUs tested: n/a. CPU-only synthetic snapshots.

AI-assisted: Yes, Codex.

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys, or decryption.
  • Translator contract entry: not applicable.
**@⁠TheGeogeo** on GitHub · 2026-11-24 16:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/970) `TheGeogeo:fix/dashboard-snapshot-collision` → `main` · +19 −2 · 2 files · 1 commits · merged 2026-11-24 20:04 UTC Claimed in the coordination issue as: [DASH-SNAPSHOT-COLLISION](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Two different dashboard snapshots written in the same UTC second shared an archive path. Use the existing full content hash alongside the UTC stamp in new archive names. This preserves both snapshots and keeps consecutive unchanged snapshots deduplicated. The history and snapshot JSON retain their current schema. Thanks to [xel1uz for the report](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14). ### Tested - Windows, Python 3.12.4. The fixed-timestamp regression failed on `1504c1af` because the first archive was replaced. - `python -I -B tests/test_progress_dashboard.py`: 51 passed. - `python -I -B tests/test_text_write_line_endings.py`: 3 passed. - Isolated merge with #625 (`3c2ad30d`) had no conflicts. The combined dashboard suite passed all 56 tests. - `git diff --check` and `python -I -B scripts/check_no_game_data.py tools/progress_dashboard.py tests/test_progress_dashboard.py`: passed. GPUs tested: n/a. CPU-only synthetic snapshots. AI-assisted: Yes, Codex. ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys, or decryption. - Translator contract entry: not applicable.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:31:02 +00:00
github manually merged commit 814381969c into gh-pr/970/base 2026-11-26 09:31:04 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 16:06 UTC · original · approved these changes

Verified submitted head 814381969c12ef11bfe5f9e36c5d963e5fc7e401. The dashboard regression suite passed 51/51 and newline checks 3/3. It confirms distinct snapshots at the same generated timestamp are both archived, while the next snapshot with identical content is deduplicated; history ordering remains correct. check_no_game_data.py and git diff --check passed. Synthetic data only; no GPU/game data.

**@⁠KernelSmoker** on GitHub · 2026-11-24 16:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/970#pullrequestreview-6042900793) · **approved these changes** Verified submitted head `814381969c12ef11bfe5f9e36c5d963e5fc7e401`. The dashboard regression suite passed 51/51 and newline checks 3/3. It confirms distinct snapshots at the same generated timestamp are both archived, while the next snapshot with identical content is deduplicated; history ordering remains correct. `check_no_game_data.py` and `git diff --check` passed. Synthetic data only; no GPU/game data.
Author
Owner

@⁠kawaii-shakal on GitHub · 2026-11-24 16:14 UTC · original

Independent test of #970 (DASH-SNAPSHOT-COLLISION)

Head tested: 814381969c (merge base 1504c1af). Environment: Windows 11, native Python 3.13.13, no GPU.

Commands and results:

  • python -I -B tests/test_progress_dashboard.py: Ran 51 tests, OK.
  • python -I -B tests/test_text_write_line_endings.py: OK.
  • Same test file with tools/progress_dashboard.py from the merge base: test_different_snapshots_in_the_same_second_are_preserved FAILS (the second snapshot replaces the first). So the test exercises the change.
  • git merge-tree --write-tree origin/main <head> (origin/main 0af7753c): clean, no conflicts.
  • python -I scripts/check_no_game_data.py on the two changed files: exit 0. git diff --check: clean.

Findings:

  • tools/progress_dashboard.py:1028: the fix is minimal and correct. Dedup is still decided by history[-1]["content_hash"] (line 1025), so an unchanged snapshot is still not rewritten (the test's third write_outputs call returning False covers this).
  • Nothing else in the repository parses snapshots/progress_<utc>.json names (only the test globs progress_*.json), so old archives without the hash suffix keep working next to the new ones.
  • Nit, optional: the file name carries the full 64-hex SHA-256, while history.json stores the first 16 characters (line 999). Using [:16] would keep the name shorter (useful under Windows MAX_PATH with a deep --out) and match the history entry. Not blocking.

Verdict: looks good.

AI-assisted.

**@⁠kawaii-shakal** on GitHub · 2026-11-24 16:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/970#issuecomment-7137331151) Independent test of #970 (DASH-SNAPSHOT-COLLISION) Head tested: 814381969c12ef11bfe5f9e36c5d963e5fc7e401 (merge base 1504c1af). Environment: Windows 11, native Python 3.13.13, no GPU. Commands and results: - `python -I -B tests/test_progress_dashboard.py`: Ran 51 tests, OK. - `python -I -B tests/test_text_write_line_endings.py`: OK. - Same test file with `tools/progress_dashboard.py` from the merge base: `test_different_snapshots_in_the_same_second_are_preserved` FAILS (the second snapshot replaces the first). So the test exercises the change. - `git merge-tree --write-tree origin/main <head>` (origin/main 0af7753c): clean, no conflicts. - `python -I scripts/check_no_game_data.py` on the two changed files: exit 0. `git diff --check`: clean. Findings: - tools/progress_dashboard.py:1028: the fix is minimal and correct. Dedup is still decided by `history[-1]["content_hash"]` (line 1025), so an unchanged snapshot is still not rewritten (the test's third `write_outputs` call returning False covers this). - Nothing else in the repository parses `snapshots/progress_<utc>.json` names (only the test globs `progress_*.json`), so old archives without the hash suffix keep working next to the new ones. - Nit, optional: the file name carries the full 64-hex SHA-256, while `history.json` stores the first 16 characters (line 999). Using `[:16]` would keep the name shorter (useful under Windows MAX_PATH with a deep `--out`) and match the history entry. Not blocking. Verdict: looks good. AI-assisted.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 20:04 UTC · original

Merging.

Why merged: DASH-SNAPSHOT-COLLISION: progress_dashboard puts the content hash in the snapshot filename, so two different snapshots taken in the same second are both kept instead of one overwriting the other. kawaii-shakal checked it (51 OK) and KernelSmoker approved it.

Why it's good: test_progress_dashboard and the line-ending test: 54 passed.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 6293c1c4f. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 571 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. Security read of the three-dot diff: no binaries, game data, downloads, network calls, new env vars or build/CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠QemmHD** on GitHub · 2026-11-24 20:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/970#issuecomment-7142999816) Merging. **Why merged:** DASH-SNAPSHOT-COLLISION: progress_dashboard puts the content hash in the snapshot filename, so two different snapshots taken in the same second are both kept instead of one overwriting the other. kawaii-shakal checked it (51 OK) and KernelSmoker approved it. **Why it's good:** test_progress_dashboard and the line-ending test: 54 passed. Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 6293c1c4f. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 571 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. Security read of the three-dot diff: no binaries, game data, downloads, network calls, new env vars or build/CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 21:26 UTC · original

thegeogeo

**@⁠TheGeogeo** on GitHub · 2026-11-24 21:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/970#issuecomment-7144928931) thegeogeo
This discussion has been locked. Commenting is limited to contributors.
No description provided.