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

Open
github-bot wants to merge 2 commits from github-bot/gh-669 into main AGit
Owner

@⁠LouisRiverstone on GitHub · 2026-11-24 11:18 UTC · original
LouisRiverstone:carry-old-9942 → main · +17 −15 · 1 files · 2 commits · open

Claimed in the coordination issue as: OLD-9942 (#14)

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)
**@⁠LouisRiverstone** on GitHub · 2026-11-24 11:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/669) `LouisRiverstone:carry-old-9942` → `main` · +17 −15 · 1 files · 2 commits · open Claimed in the coordination issue as: OLD-9942 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) 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)
- tests/test_first_look_rebuild.py: stub the three report tools first_look.ps1 now runs (TEST-1421)
- tests/test_first_look_rebuild.py: the stub writes its call log and outputs with newline="\n" (tikD1337 on old PR 9942)

Carried over from old-pr/9942 (old upstream PR 9942), rebased on main.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:15:13 +00:00
Author
Owner

@⁠lixonik on GitHub · 2026-11-24 11:27 UTC · original · reviewed

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.

**@⁠lixonik** on GitHub · 2026-11-24 11:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/669#pullrequestreview-6038377335) · **reviewed** 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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/669/head:github-bot/gh-669'
git switch 'github-bot/gh-669'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-669'
git switch 'github-bot/gh-669'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-669'
git switch 'github-bot/gh-669'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-669'
git switch 'main'
git merge --squash 'github-bot/gh-669'
git switch 'main'
git merge --ff-only 'github-bot/gh-669'
git switch 'main'
git merge 'github-bot/gh-669'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.