history: a portable, hashed manifest of the old-pr tips and the old issue index (#563) #1207

Merged
leonida/mandy
robot00f merged 1 commit from docs/history-manifest into main 2026-11-28 07:46:56 +00:00

Pull request successfully merged and closed

robot00f commented 2026-11-24 20:17:12 +00:00

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143232751 (ID HISTORY-RADICLE-MANIFEST; for #563)

#563 asks for the original repository's history to be preserved somewhere other than one host. Right now the surviving parts are 251 old-pr/* branches (#17) and the 135-title issue index (#18) -- both still only on GitHub. This makes the record portable and checkable without it.

What

  • docs/history/old-pr.tsv: the 251 branch tips as number, tip, author_date, author, subject, sorted numerically, with old-pr.tsv.sha256 beside it.
  • docs/history/issues.tsv: the same for the 135 indexed issues (number, title, author, labels) with its own hash.
  • docs/history/README.md: the format, why the fields are hashes and commit dates rather than a generation timestamp, what a different hash means, what is not recoverable (discussions, reviews, issue text), and the Radicle steps (rad patch open per branch / rad issue open per row, citing the file hash).
  • scripts/export_old_pr_manifest.py: regenerates either file from git for-each-ref or the #18 table; rejects a ref whose SHA or number is malformed, a duplicated number and an input with no rows, so a broken export cannot pass silently.
  • tests/test_export_old_pr_manifest.py: five synthetic tests in a throwaway repo (numeric order beats ref order, a tab in a subject stays a field, the sha256 line matches the bytes, repeated runs are byte-identical, both no-input cases fail).

The bug the tests caught

My first version split each ref line on every tab, so a subject containing one was truncated at it. The test that writes a tab in the subject found it, and the split is now limited to the four fixed fields.

Tested

  • python -I tests/test_export_old_pr_manifest.py -> OK (5 tests); compileall -> 0.
  • check_no_game_data.py over every new file -> exit 0; tests/test_docs_links.py and tests/test_docs_table_rows.py -> OK.
  • Both manifests regenerated from the real refs and the real #18 table: 251 and 135 rows, and a second run gives the same hashes.

Docs and one standard-library script; nothing of the game, no network at test time.

GPUs tested: n/a

AI-assisted: yes (OpenCode, DeepSeek V4.1 Flash)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption (CONTRIBUTING.md).
  • A new translator rule is in the contract table of docs/design.md. (No translator change.)
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143232751 (ID `HISTORY-RADICLE-MANIFEST`; for #563) #563 asks for the original repository's history to be preserved somewhere other than one host. Right now the surviving parts are 251 `old-pr/*` branches (#17) and the 135-title issue index (#18) -- both still only on GitHub. This makes the record portable and checkable without it. ### What - `docs/history/old-pr.tsv`: the 251 branch tips as `number`, `tip`, `author_date`, `author`, `subject`, sorted numerically, with `old-pr.tsv.sha256` beside it. - `docs/history/issues.tsv`: the same for the 135 indexed issues (`number`, `title`, `author`, `labels`) with its own hash. - `docs/history/README.md`: the format, why the fields are hashes and commit dates rather than a generation timestamp, what a different hash means, what is *not* recoverable (discussions, reviews, issue text), and the Radicle steps (`rad patch open` per branch / `rad issue open` per row, citing the file hash). - `scripts/export_old_pr_manifest.py`: regenerates either file from `git for-each-ref` or the #18 table; rejects a ref whose SHA or number is malformed, a duplicated number and an input with no rows, so a broken export cannot pass silently. - `tests/test_export_old_pr_manifest.py`: five synthetic tests in a throwaway repo (numeric order beats ref order, a tab in a subject stays a field, the sha256 line matches the bytes, repeated runs are byte-identical, both no-input cases fail). ### The bug the tests caught My first version split each ref line on every tab, so a subject containing one was truncated at it. The test that writes a tab in the subject found it, and the split is now limited to the four fixed fields. ### Tested - `python -I tests/test_export_old_pr_manifest.py` -> OK (5 tests); `compileall` -> 0. - `check_no_game_data.py` over every new file -> exit 0; `tests/test_docs_links.py` and `tests/test_docs_table_rows.py` -> OK. - Both manifests regenerated from the real refs and the real #18 table: 251 and 135 rows, and a second run gives the same hashes. Docs and one standard-library script; nothing of the game, no network at test time. GPUs tested: n/a AI-assisted: yes (OpenCode, DeepSeek V4.1 Flash) ### Checklist - [x] Based on current main and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption (CONTRIBUTING.md). - [ ] A new translator rule is in the contract table of docs/design.md. (No translator change.)
xel1uz reviewed 2026-11-24 20:31:24 +00:00
xel1uz left a comment
No description provided.
I ran this PR's exporter on the UTF-8 text of [issue #18](https://github.com/ubiquitarianism/leonida/issues/18) and compared all 135 rows by old issue number. Seven titles differed. Reading their UTF-8 bytes as CP850 reproduced each difference exactly (for example, the arrow in old issue 313). Applying the suggestions below made both files byte-for-byte identical to the fresh export. All five exporter tests passed. Please apply the seven title suggestions and the SHA-256 update in one batch so the checksum matches the TSV.
MoonEyes commented 2026-11-28 07:46:52 +00:00

Red/green: 5 failures on main, 5 passed with this PR.
Full suite with this PR merged together with seven others in one batch matches main (pytest, translator suite, ctest without the game) on Windows 11 with an RTX 4060, except xmem_write_watch, a test that depends on free host memory and has also failed on plain main.
AI-assisted (Claude Code, Claude Opus 5.5). Thank you!

Red/green: 5 failures on main, 5 passed with this PR. Full suite with this PR merged together with seven others in one batch matches main (pytest, translator suite, ctest without the game) on Windows 11 with an RTX 4060, except xmem_write_watch, a test that depends on free host memory and has also failed on plain main. AI-assisted (Claude Code, Claude Opus 5.5). Thank you!
Sign in to join this conversation.
No description provided.