[PR #774] [MERGED] OLD-7698: restore old upstream PR 7698 - docs/world_census: rejected count, what a rejected candidate is, census_exact, --jobs default (ASSET-379) #811

Closed
opened 2026-11-26 20:19:07 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/774
Author: @aslan2142
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: docs-sweep-world_census


📝 Commits (2)

  • 08e2c36 docs/world_census: rejected count, what a rejected candidate is, census_exact, --jobs default (ASSET-379)
  • a8fc8a5 docs/world_census: which streams are rejected, incomplete or invalid (review on old upstream PR 7698)

📊 Changes

1 file changed (+10 additions, -5 deletions)

View changed files

📝 docs/world_census.md (+10 -5)

📄 Description

Claimed in the coordination issue as: OLD-7698 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133102735

Restoration of my original pull request, old upstream PR 7698 in ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at 3bb46d658b; the two commits apply unchanged and all four corrections still hold against the current tool (its only change since, a resume-cache type check, does not touch these lines). The old PR number in the second commit's title is now plain text.

What and why

docs/world_census.md disagreed with tools/world_census.py in four places:

  • Rejected count. Coverage said "906 rejected candidates", but the Result table in the same doc (docs/world_census.md:21) says 840. That is the count re-measured after the warm-up fix, which was updated in the table only. Coverage now says 840.
  • What a rejected candidate is. A candidate is rejected when assemble raises zlib.error, struct.error or IndexError, or returns None because the stream does not end inside the archive (tools/world_census.py:395-402, None at :258-259).
    • A stream whose inflated bytes 0x10..0x15 are not 0DRPz (:185) is accepted as payload.
    • A 0DRPz stream that is truncated, does not parse or is still short of a page counts as incomplete (:305-306, :421-423).
    • invalid is a second parse check behind that (:424-426).
    • Neither is counted as rejected. The doc used to describe all of these as "rejected".
  • census_exact. The condition checks maps_exact == maps (tools/world_census.py:766), not entities_exact == entities separately. That one follows from it, because entities_exact sums the exact rows (:749-750).
  • --jobs default. The default is half the logical CPUs, capped at 12 (tools/world_census.py:801). The doc left out the cap.

Tested

  • python -I tests/test_docs_*.py (all 12): pass.
  • python -I tests/test_world_census.py: pass.
  • git diff --check: clean.
  • python -I scripts/check_no_game_data.py docs/world_census.md: clean.

Docs only; no game files needed.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs 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)

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


🔄 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/774 **Author:** [@aslan2142](https://github.com/aslan2142) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `docs-sweep-world_census` --- ### 📝 Commits (2) - [`08e2c36`](https://github.com/ubiquitarianism/leonida/commit/08e2c36fd9249e221a00399c899dde6f10601a45) docs/world_census: rejected count, what a rejected candidate is, census_exact, --jobs default (ASSET-379) - [`a8fc8a5`](https://github.com/ubiquitarianism/leonida/commit/a8fc8a50b31577f72e49d219583c9e27d3cade56) docs/world_census: which streams are rejected, incomplete or invalid (review on old upstream PR 7698) ### 📊 Changes **1 file changed** (+10 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/world_census.md` (+10 -5) </details> ### 📄 Description Claimed in the coordination issue as: OLD-7698 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133102735 Restoration of my original pull request, old upstream PR 7698 in `ItsNotRexed/Leonida`, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at 3bb46d658b0c1c81a79091f6de933fba08d1af8a; the two commits apply unchanged and all four corrections still hold against the current tool (its only change since, a resume-cache type check, does not touch these lines). The old PR number in the second commit's title is now plain text. ### What and why `docs/world_census.md` disagreed with `tools/world_census.py` in four places: - **Rejected count.** Coverage said "906 rejected candidates", but the Result table in the same doc (`docs/world_census.md:21`) says 840. That is the count re-measured after the warm-up fix, which was updated in the table only. Coverage now says 840. - **What a rejected candidate is.** A candidate is rejected when `assemble` raises `zlib.error`, `struct.error` or `IndexError`, or returns `None` because the stream does not end inside the archive (`tools/world_census.py:395-402`, `None` at `:258-259`). - A stream whose inflated bytes 0x10..0x15 are not `0DRPz` (`:185`) is accepted as payload. - A `0DRPz` stream that is truncated, does not parse or is still short of a page counts as `incomplete` (`:305-306`, `:421-423`). - `invalid` is a second parse check behind that (`:424-426`). - Neither is counted as rejected. The doc used to describe all of these as "rejected". - **`census_exact`.** The condition checks `maps_exact == maps` (`tools/world_census.py:766`), not `entities_exact == entities` separately. That one follows from it, because `entities_exact` sums the exact rows (`:749-750`). - **`--jobs` default.** The default is half the logical CPUs, capped at 12 (`tools/world_census.py:801`). The doc left out the cap. ### Tested - `python -I tests/test_docs_*.py` (all 12): pass. - `python -I tests/test_world_census.py`: pass. - `git diff --check`: clean. - `python -I scripts/check_no_game_data.py docs/world_census.md`: clean. Docs only; no game files needed. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs 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) AI-assisted (Claude Code, Claude Opus 5.5). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:07 +01:00
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#811
No description provided.