[PR #1180] content_definitions: roll back failed input counts (CONTENT-COUNTS-ATOMIC) #1213

Open
opened 2026-11-26 20:20:28 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1180
Author: @Taffyyy-ops
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/content-counts-atomic


📝 Commits (1)

  • ba4eba8 content_definitions: roll back failed input counts (CONTENT-COUNTS-ATOMIC)

📊 Changes

2 files changed (+63 additions, -0 deletions)

View changed files

➕ tests/test_content_counts_atomic.py (+59 -0)
📝 tools/content_definitions.py (+4 -0)

📄 Description

Claimed in the coordination issue as: CONTENT-COUNTS-ATOMIC

What and why

When a directory yields valid documents and then fails, its partial counts are currently included despite the input being marked failed. Restore the pre-input counters on failure while preserving completed inputs and the existing error status.

Tested

  • python -I tests/test_content_counts_atomic.py: 2 tests passed; baseline reproduces three failure cases.
  • python -I tests/test_content_definitions.py: 12 tests passed.
  • python -I tests/test_text_write_line_endings.py: 3 tests passed.
  • python -I scripts/check_no_game_data.py and git diff --check: passed.
  • Synthetic inputs only; Windows 11, Python standard library. GPU not required.

AI-assisted: yes.


🔄 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/1180 **Author:** [@Taffyyy-ops](https://github.com/Taffyyy-ops) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/content-counts-atomic` --- ### 📝 Commits (1) - [`ba4eba8`](https://github.com/ubiquitarianism/leonida/commit/ba4eba84cfa4cc45916713bd6e56f6c5879dfd89) content_definitions: roll back failed input counts (CONTENT-COUNTS-ATOMIC) ### 📊 Changes **2 files changed** (+63 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/test_content_counts_atomic.py` (+59 -0) 📝 `tools/content_definitions.py` (+4 -0) </details> ### 📄 Description Claimed in the coordination issue as: CONTENT-COUNTS-ATOMIC ### What and why When a directory yields valid documents and then fails, its partial counts are currently included despite the input being marked failed. Restore the pre-input counters on failure while preserving completed inputs and the existing error status. ### Tested - python -I tests/test_content_counts_atomic.py: 2 tests passed; baseline reproduces three failure cases. - python -I tests/test_content_definitions.py: 12 tests passed. - python -I tests/test_text_write_line_endings.py: 3 tests passed. - python -I scripts/check_no_game_data.py and git diff --check: passed. - Synthetic inputs only; Windows 11, Python standard library. GPU not required. AI-assisted: yes. --- <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#1213
No description provided.