[PR #25] [MERGED] Fix backup on pre-1980 files, add record --pid #66

Closed
opened 2026-10-15 20:53:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rehan-remade/universal-modder/pull/25
Author: @landon4dr
Created: 10/3/2026
Status: ✅ Merged
Merged: 10/4/2026
Merged by: @rehan-remade

Base: main ← Head: fix/windows-backup-record-pid-kb-fork


📝 Commits (1)

  • 957ad44 Fix backup on pre-1980 files, add record --pid

📊 Changes

3 files changed (+22 additions, -6 deletions)

View changed files

📝 tests/test_um.py (+14 -1)
📝 um/backup.py (+2 -1)
📝 um/win.py (+6 -4)

📄 Description

What: three small tool fixes found while modding Minecraft (NeoForge 1.21.1) on Windows with the toolkit. The field note for that session is #24.

  1. um backup create crashed on pre-1980 timestamps. Snapshotting %APPDATA%\.minecraft failed with ValueError: ZIP does not support timestamps before 1980, caused by files in the launcher's webcache2/CertificateRevocation. It also left a half-written zip that broke um backup list. Fix: ZipFile(..., strict_timestamps=False), which clamps the dates to 1980. Adds test_backup_handles_pre_1980_timestamps, which fails without the fix and passes with it.
  2. um win record recorded no audio with --title or --hwnd. The audio PID only came from --exe, and --exe java.exe is ambiguous when another Java app is open. Adds --pid.
  3. um kb pr failed from a fork. gh pr create --head <branch> gives Head ref must be a branch for cross-repo PRs. It now passes <login>:<branch> when it pushed to the fork remote.

Not fixed, for a follow-up: um win setup installs ffmpeg to %LOCALAPPDATA%\universal-modder\ffmpeg\bin, but um video only looks for ffmpeg on PATH.

Checklist

  • pytest -q tests: 19 passed, 1 skipped. 3 failures (test_publish_check, test_repo_knowledge_is_valid, test_kb_new_check_search) also fail on unmodified main on this Windows machine (Python 3.14, no uv), so they're pre-existing and not caused by this PR.
  • no game files, extracted assets, decompiled code dumps or secrets
  • nothing that helps cheat in online games or bypass anti-cheat / DRM / ownership checks
  • verified: backup fix by test + a real .minecraft snapshot; --pid by a real recording with game audio; kb fork head by opening #24
  • authored by: Claude Code (claude-opus-5-5) with @landon4dr

🤖 Generated with Claude Code


🔄 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/rehan-remade/universal-modder/pull/25 **Author:** [@landon4dr](https://github.com/landon4dr) **Created:** 10/3/2026 **Status:** ✅ Merged **Merged:** 10/4/2026 **Merged by:** [@rehan-remade](https://github.com/rehan-remade) **Base:** `main` ← **Head:** `fix/windows-backup-record-pid-kb-fork` --- ### 📝 Commits (1) - [`957ad44`](https://github.com/rehan-remade/universal-modder/commit/957ad4486d69f26ae3e2bdf06278b1c33a2658e0) Fix backup on pre-1980 files, add record --pid ### 📊 Changes **3 files changed** (+22 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_um.py` (+14 -1) 📝 `um/backup.py` (+2 -1) 📝 `um/win.py` (+6 -4) </details> ### 📄 Description **What:** three small tool fixes found while modding Minecraft (NeoForge 1.21.1) on Windows with the toolkit. The field note for that session is #24. 1. **`um backup create` crashed on pre-1980 timestamps.** Snapshotting `%APPDATA%\.minecraft` failed with `ValueError: ZIP does not support timestamps before 1980`, caused by files in the launcher's `webcache2/CertificateRevocation`. It also left a half-written zip that broke `um backup list`. Fix: `ZipFile(..., strict_timestamps=False)`, which clamps the dates to 1980. Adds `test_backup_handles_pre_1980_timestamps`, which fails without the fix and passes with it. 2. **`um win record` recorded no audio with `--title` or `--hwnd`.** The audio PID only came from `--exe`, and `--exe java.exe` is ambiguous when another Java app is open. Adds `--pid`. 3. **`um kb pr` failed from a fork.** `gh pr create --head <branch>` gives `Head ref must be a branch` for cross-repo PRs. It now passes `<login>:<branch>` when it pushed to the fork remote. Not fixed, for a follow-up: `um win setup` installs ffmpeg to `%LOCALAPPDATA%\universal-modder\ffmpeg\bin`, but `um video` only looks for `ffmpeg` on PATH. **Checklist** - [x] `pytest -q tests`: 19 passed, 1 skipped. 3 failures (`test_publish_check`, `test_repo_knowledge_is_valid`, `test_kb_new_check_search`) also fail on unmodified `main` on this Windows machine (Python 3.14, no `uv`), so they're pre-existing and not caused by this PR. - [x] no game files, extracted assets, decompiled code dumps or secrets - [x] nothing that helps cheat in online games or bypass anti-cheat / DRM / ownership checks - [x] verified: backup fix by test + a real `.minecraft` snapshot; `--pid` by a real recording with game audio; kb fork head by opening #24 - [x] authored by: Claude Code (claude-opus-5-5) with @landon4dr 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 20:53:09 +00:00
Sign in to join this conversation.
No labels
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
rehan-remade/universal-modder#66
No description provided.