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

Merged
aslan2142 merged 2 commits from upstream-pr/774 into main 2026-11-24 16:38:52 +00:00
aslan2142 commented 2026-11-24 13:40:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-24T13:40:09Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5473252419 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/774). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-24T13:40:09Z. --- 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).
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!774
No description provided.