tests/test_first_look_rebuild.py: stub the three report tools first_look.ps1 runs, and check they are called (TEST-1421) (OLD-9942) #669

Merged
LouisRiverstone merged 2 commits from upstream-pr/669 into main 2026-11-28 18:52:20 +00:00
LouisRiverstone commented 2026-11-24 11:18:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by LouisRiverstone on 2026-11-24T11:18:59Z.


Claimed in the coordination issue as: OLD-9942 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129925439)

Replaces the carried-over draft #209. I'm the original author of old upstream PR 9942.

What and why

TEST-1421. The rebuild test stubs gdk_runtime_calls.py, find_hash_lookup.py and exe_checklist.py, the three report tools scripts/first_look.ps1 runs after pe_inspect. On main, two of those stubs do nothing at all, so the test can't tell whether the script ran them. Now all three use one stub. It records its name in tools_called.txt and writes the file its --json/--out names, using newline="\n" (pointed out by tikD1337 on the old PR). The test then asserts that the script called the three tools, in order. This tightens an existing test; it doesn't fix a failure.

The old branch's final diff, applied on current main (21625bca8) as one commit. It applied cleanly.

Tested

The test is Windows-only (skipUnless(os.name == "nt")). On Linux it reports 5 skipped. I ran it with Windows Python 3.11 and Windows PowerShell 5.1 (Windows 11, from WSL) on an export of tests/, scripts/ and tools/:

  • main: 5 tests OK
  • this branch: 5 tests OK, including the new assertion that the three tools were called

GPUs tested: n/a

AI-assisted: yes (Claude Code)

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: test only)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5471137325 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/669). Originally posted by [LouisRiverstone](https://github.com/LouisRiverstone) on 2026-11-24T11:18:59Z. --- Claimed in the coordination issue as: OLD-9942 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129925439) Replaces the carried-over draft #209. I'm the original author of old upstream PR 9942. ### What and why TEST-1421. The rebuild test stubs `gdk_runtime_calls.py`, `find_hash_lookup.py` and `exe_checklist.py`, the three report tools `scripts/first_look.ps1` runs after `pe_inspect`. On `main`, two of those stubs do nothing at all, so the test can't tell whether the script ran them. Now all three use one stub. It records its name in `tools_called.txt` and writes the file its `--json`/`--out` names, using `newline="\n"` (pointed out by tikD1337 on the old PR). The test then asserts that the script called the three tools, in order. This tightens an existing test; it doesn't fix a failure. The old branch's final diff, applied on current `main` (21625bca8) as one commit. It applied cleanly. ### Tested The test is Windows-only (`skipUnless(os.name == "nt")`). On Linux it reports 5 skipped. I ran it with Windows Python 3.11 and Windows PowerShell 5.1 (Windows 11, from WSL) on an export of `tests/`, `scripts/` and `tools/`: - `main`: 5 tests OK - this branch: 5 tests OK, including the new assertion that the three tools were called GPUs tested: n/a AI-assisted: yes (Claude Code) ### 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: test only)
lixonik commented 2026-11-24 11:27:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-24T11:27:37Z.

Review: COMMENTED


Independent verification at fbde4721 with Windows PowerShell 5.1: python -I tests/test_first_look_rebuild.py -v passed all five tests on both the base and the PR head. In synthetic controls, removing each of the three report-tool calls individually failed the new assertion, and swapping the first two report calls also failed it. The original test passed with the hash-lookup call omitted.

AI-assisted testing.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6038377335 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/669#pullrequestreview-6038377335). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-24T11:27:37Z. **Review:** COMMENTED --- Independent verification at `fbde4721` with Windows PowerShell 5.1: `python -I tests/test_first_look_rebuild.py -v` passed all five tests on both the base and the PR head. In synthetic controls, removing each of the three report-tool calls individually failed the new assertion, and swapping the first two report calls also failed it. The original test passed with the hash-lookup call omitted. AI-assisted testing.
MoonEyes commented 2026-11-28 18:52:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T18:52:17Z.


Red/green: No red test; this tests-only PR's tests/test_first_look_rebuild.py passes 5/5 on main and with the PR, natively on Windows (skipped on GitHub Actions Linux, which has no powershell.exe).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244116156 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/669#issuecomment-7244116156). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T18:52:17Z. --- Red/green: No red test; this tests-only PR's tests/test_first_look_rebuild.py passes 5/5 on main and with the PR, natively on Windows (skipped on GitHub Actions Linux, which has no powershell.exe). Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure. 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!669
No description provided.