TOOL-BOOT-MATRIX: tools/boot_matrix.py, how far the retail boot gets for each set of pull requests #569
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/569"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by CLHelper on 2026-11-24T08:34:44Z.
Claimed in the coordination issue as: TOOL-BOOT-MATRIX (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7126297344)
What and why
Boot work is spread over many open pull requests at once (the slot 73
CreateCommandListXIID, the window class, thenext device slots), and the stop someone reports depends on which of them were merged, in which order, onto which
main, and whether their shader library came from the same translator. This tool makes that explicit, one row pernamed set:
mergecombines each set onto a base withgit merge-tree --write-treeandgit commit-tree: no checkout, nohooks, nothing from a pull request runs. A PR that
scripts/merge_check.pyfinds already on the base is skipped;one that conflicts is skipped with its files listed, saying whether it conflicts with the base or with an earlier PR
in the set. Each set becomes the branch
boot-matrix/<set>; an empty set (main=) is the base alone.runbuildsruntime/in a set's tree (exported where you build PR code) or takes--gta6rt, runs--run --trace --trace-d3d12withLEONIDA_D3D12=vulkan, stops the process tree at--timeout, and writesresult.json(the stop, the D3D12 call count and last call, and whether the shader library'stranslation_sources.sha256matches the tree). Each run gets a fresh overlay and save folder.reportprints a Markdown table of the newest run of each set's current head, ready to paste into an issue. Tracesstay on your machine; failed file paths and debug strings are left out of the report.
docs/boot.mdgets a section on it. Standard library only; git 2.38 or newer formerge-tree --write-tree.It was written and reviewed in the original repository before that went private; this is the same code on current
main, with the examples naming pull requests of this repository.Tested
python -I tests/test_boot_matrix.py: 21 tests pass on Windows 11 (Python 3.13, git 2.53), on this branch'smain. They build throwaway repositories with git and fakegta6rtruns; no game files.python -I -m compileallover the tool and the test;python -I tools/boot_matrix.py --help.runagainst the retail executable was not part of this test.GPUs tested: n/a (no GPU code;
runuses whatevergta6rtthe set builds)AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T08:40:50Z.
Independent Windows check of
f241156with Python 3.12 and Git 2.39.1. The 21 stock tests passed. A throwaway repository and two CMake-built stand-ins for the runtime reproduced two reporting issues.run --set with-pr --buildbuilt and ran the base, then filed the result under the merged head as if its PR had been tested. The translator digest was identical for both commits because the PR changed only the runtime. A build after checking out the merged branch returned the other, expected exit class. Passing the base executable via--gta6rtwhile on the merged checkout reproduced the misattribution. Please verify the source HEAD for checkout builds and mark exports and prebuilt binaries as unverified unless their provenance can be checked.All probes used synthetic inputs. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by CLHelper on 2026-11-25T08:27:51Z.
@sodove thanks, both points were right; fixed in
589b52dbb, and the branch is rebased onto currentmain(3f81d46ac).runnow checks the tree before it builds anything:mergewrites the blob id of every file of the set's head to<matrix>/<set>/files.json, and a tree (checkout or export) that lacks one of those files or holds other content stops the run with exit 2, naming the files. CRLF line ends count as the same file; files the head does not have (a build folder) are ignored. A--gta6rtbinary is recorded and reported asprebuilt (unverified).report, Markdown and--json, now passes on only a fixed list of fields: the stop's kind, exception code, module+RVA and access kind, the counts, and the last D3D12 call as number, method and result. The access address, the loader's message and the call's arguments stay in each run's localresult.json. The "ready to paste" wording is gone;docs/boot.mdsays the same.New tests: a checkout at another commit, a locally edited file and an export missing a file are refused; a CRLF export with a build folder runs; a report has no address and no call arguments; a loader message stays out of the table. 27/27 pass locally, and each new check fails when the code it covers is removed. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-25T08:38:24Z.
Retested
589b52dbbon native Windows with Python 3.12. All 27 stock tests passed. The wrong-checkout case now stops before launch, and the report tests pass for the loader message, access address, and D3D12 call arguments.One case remains in both report formats. When the instruction pointer falls outside every known module,
shims::module_offsetreturns a bare absolute address (runtime/shims/registry.cpp:389). The exception trace uses that value forat, andshareable()forwards it unchanged. I changed only the synthetic fixture's exception location from module+RVA to a made-up bare address. After a run through the fixture, bothreportandreport --jsonprinted that address (2/2). Neither printed the D3D12 call arguments (0/2).Could the shared report render this case as
unmappedand keep the original location in localresult.json? A regression test covering both report commands would catch it while preserving module-relative locations.Synthetic inputs only, CPU only. AI-assisted: yes.
Imported from ubiquitarianism/leonida. Originally posted by CLHelper on 2026-11-25T08:41:32Z.
For the developer role on the project Discord: my Discord username is
clhelper.Imported from ubiquitarianism/leonida. Originally posted by CLHelper on 2026-11-25T13:13:28Z.
@sodove thanks, right again; fixed in
011a62a05. A shared location is now module+RVA as the trace names it (alsohost:<dll>+0x.., and only a file name, never a path) orunmapped; anything else, such as the bare addressshims::module_offsetgives outside every known module, is shown asunmappedin bothreportandreport --json, andresult.jsonkeeps the original. New tests: a synthetic crash at a bare address through both report commands (the address is absent,unmappedpresent,result.jsonunchanged), and the site rule itself (module, host module, bare address, empty, path-like). 29/29 pass; with the rule removed the new report test fails. Also rewrapped two docstring lines of mine that were over 120 columns. AI-assisted.Imported from ubiquitarianism/leonida. Originally posted by CLHelper on 2026-11-25T14:07:42Z.
Before another round I had the tool read cold against its own claims, and fixed what that turned up (
55fbc0249,7d8742398):other), an exception code hex or an exit code a number, the access kind read/write/execute (elseother). A label of the runtime's shape (ID3D12Device::CreateFence,Xbox CreatePlacedResourceX (device slot 133)) is shown whole; that one was being cut toXboxbefore, I had assumed labels carry arguments and checked it against 43 real labels since. A label with free text after its name (PipelineStream::Refused <reason>) keeps the name; anything else is(other).report --jsonevery PR row whole (N:REFcan name a local branch, plus verdicts and conflicted file names). The base is now its commit only and a PR row is number, status and skip reason; the rest stays inmatrix.json.run --buildreusedruntime/build; an export of another set unpacked over the same tree keeps the base's commit date in every file, older than the built objects, so the earlier set'sgta6rt.execould be recorded as built for this head. Builds now go toruntime/build-boot-matrix-<head>.con,nul, ...) are refused as set names. A PR merged and then reverted on the base staysalready-merged(git merges an ancestor as a no-op); documented, with the way to test it (revert the revert, give it asN:REF).--envnames, timeout, whether--overlaywas given, configuration); the shared report showsLEONIDA_*names and counts others. Docs and docstring now match the code (the overlay is fresh only without--overlay; exit 1 on a failed build).Kept on purpose:
host:<dll>+0x..locations show the DLL's file name (which driver or system DLL faulted), never a path.36/36 pass; each fix has a test that fails when the fix is removed (checked by removing each). AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-25T16:09:54Z.
Retested
7d8742398on native Windows 11 with Python 3.12.10.python -I tests/test_boot_matrix.py -vpassed all 36 tests. The synthetic unmapped crash now showsunmappedin both the Markdown and JSON reports (2/2), and the localresult.jsonretains the original location. The wrong-checkout and head-specific build-directory tests also passed. That resolves my earlier review comment.AI-assisted (OpenAI Codex, GPT-6). Synthetic inputs only.
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:02:19Z.
Merged into
main(merge commit68595f4a7), approved by DadaCap (maintainer). Thanks!Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (
7d8742398).AI-assisted (Claude Code), posted for DadaCap.