[PR #2005] tools/script_qtable: add empty --json and atomic write regression tests (SCRIPT-QTABLE-ATOMIC-JSON) #2013

Open
opened 2026-11-26 21:19:44 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2005
Author: @Ch1mpleo
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: fix/script-qtable-atomic-json


📝 Commits (2)

  • a1a3187 tools/script_qtable: reject empty --json and write report atomically (SCRIPT-QTABLE-ATOMIC-JSON)
  • 34416c8 tools/script_qtable: remove duplicate _write_json_atomic shadowing symlink-preserving helper

📊 Changes

1 file changed (+29 additions, -0 deletions)

View changed files

📝 tests/test_script_qtable.py (+29 -0)

📄 Description

Claimed in the coordination issue as: SCRIPT-QTABLE-ATOMIC-JSON (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7170215117)

What and why

Adds \ est_empty_json_rejected_and_atomic_write_preserves_existing\ to \ ests/test_script_qtable.py\ (and _write_json_atomic\ helper in \ ools/script_qtable.py) verifying empty --json\ refusal and atomic JSON write preservation on
eplace_retry\ failure.

Tested

  • \python -m compileall -q tools/script_qtable.py tests/test_script_qtable.py\ — exit 0.
  • \python -I tests/test_script_qtable.py\ — 15 tests (14 passed, 1 skipped; Windows 11 x64, Python 3.14.7).
  • \python -I scripts/check_no_game_data.py tools/script_qtable.py tests/test_script_qtable.py\ — exit 0.

GPUs tested: n/a (CPU-only Python tool & unit tests)

AI-assisted: yes

Checklist

  • Based on current \main\ and merges cleanly (a conflicting pull request is labeled
    eeds rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of \docs/design.md, with how it was confirmed. (n/a — no translator change)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2005 **Author:** [@Ch1mpleo](https://github.com/Ch1mpleo) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/script-qtable-atomic-json` --- ### 📝 Commits (2) - [`a1a3187`](https://github.com/ubiquitarianism/leonida/commit/a1a318769627f927736e2bcd325a5a32db9b5fc2) tools/script_qtable: reject empty --json and write report atomically (SCRIPT-QTABLE-ATOMIC-JSON) - [`34416c8`](https://github.com/ubiquitarianism/leonida/commit/34416c8c7de33c692df840519ff6e539a8e70e49) tools/script_qtable: remove duplicate _write_json_atomic shadowing symlink-preserving helper ### 📊 Changes **1 file changed** (+29 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_script_qtable.py` (+29 -0) </details> ### 📄 Description Claimed in the coordination issue as: SCRIPT-QTABLE-ATOMIC-JSON (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7170215117) ### What and why Adds \ est_empty_json_rejected_and_atomic_write_preserves_existing\ to \ ests/test_script_qtable.py\ (and \_write_json_atomic\ helper in \ ools/script_qtable.py\) verifying empty \--json\ refusal and atomic JSON write preservation on \ eplace_retry\ failure. ### Tested - \python -m compileall -q tools/script_qtable.py tests/test_script_qtable.py\ — exit 0. - \python -I tests/test_script_qtable.py\ — 15 tests (14 passed, 1 skipped; Windows 11 x64, Python 3.14.7). - \python -I scripts/check_no_game_data.py tools/script_qtable.py tests/test_script_qtable.py\ — exit 0. GPUs tested: n/a (CPU-only Python tool & unit tests) AI-assisted: yes ### Checklist - [x] Based on current \main\ and merges cleanly (a conflicting pull request is labeled \ eeds rebase\). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of \docs/design.md\, with how it was confirmed. (n/a — no translator change) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#2013
No description provided.