fix: launch the VIctory executable reported by Cargo #315

Open
github-bot wants to merge 3 commits from github-bot/gh-315 into main AGit
Owner

@⁠mauroalvare on GitHub · 2026-11-26 02:30 UTC · original
mauroalvare:codex/launcher-cargo-artifact → main · +106 −8 · 5 files · 3 commits · open

Change

A successful Cargo build can leave anyxboxx run looking for victory.exe in the wrong directory. CARGO_BUILD_TARGET_DIR changes the output root and CARGO_BUILD_TARGET adds a target-triple component.

Use the executable from Cargo's compiler-artifact message for warm, precompile, and run. The build must report exactly one VIctory binary, and the reported path must exist. Cargo diagnostics stay on stderr, and the launcher reads paths directly from UTF-8 JSON. Cargo artifact messages

Verification

Rebased on c41c224.

  • cargo build --locked --offline -j 5 --release -p anyxboxx passed.
  • python -m pytest -q -rs tests/test_lanceur_victory.py tests/test_anyxboxx_run.py passed all 31 tests with the release launcher. The fixture exercises paths containing spaces and accents, decoy library artifacts, and zero or multiple binary artifacts.
  • python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools passed.

For an end-to-end check with Cargo 1.98.1, anyxboxx run --warm built a temporary Rust crate named victory with CARGO_BUILD_TARGET=x86_64-pc-windows-msvc and a CARGO_BUILD_TARGET_DIR path containing spaces and an accent. Both warm and run reached the reported executable in release and diag, including Cargo cache hits. The inputs were synthetic.

Investigation, implementation and verification were assisted by OpenAI Codex.

**@⁠mauroalvare** on GitHub · 2026-11-26 02:30 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/315) `mauroalvare:codex/launcher-cargo-artifact` → `main` · +106 −8 · 5 files · 3 commits · open ## Change A successful Cargo build can leave `anyxboxx run` looking for `victory.exe` in the wrong directory. `CARGO_BUILD_TARGET_DIR` changes the output root and `CARGO_BUILD_TARGET` adds a target-triple component. Use the executable from Cargo's `compiler-artifact` message for warm, precompile, and run. The build must report exactly one VIctory binary, and the reported path must exist. Cargo diagnostics stay on stderr, and the launcher reads paths directly from UTF-8 JSON. [Cargo artifact messages](https://doc.rust-lang.org/cargo/reference/external-tools.html#artifact-messages) ## Verification Rebased on `c41c224`. - `cargo build --locked --offline -j 5 --release -p anyxboxx` passed. - `python -m pytest -q -rs tests/test_lanceur_victory.py tests/test_anyxboxx_run.py` passed all 31 tests with the release launcher. The fixture exercises paths containing spaces and accents, decoy library artifacts, and zero or multiple binary artifacts. - `python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools` passed. For an end-to-end check with Cargo 1.98.1, `anyxboxx run --warm` built a temporary Rust crate named `victory` with `CARGO_BUILD_TARGET=x86_64-pc-windows-msvc` and a `CARGO_BUILD_TARGET_DIR` path containing spaces and an accent. Both warm and run reached the reported executable in release and diag, including Cargo cache hits. The inputs were synthetic. Investigation, implementation and verification were assisted by OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:42:48 +00:00
Author
Owner

@⁠LooperSalty on GitHub · 2026-11-26 14:01 UTC · original

This PR now conflicts with main in tests/test_lanceur_victory.py (other launcher PRs changed the same test module). Please rebase on main, keep the tests of both sides, run python -m pytest tests/test_lanceur_victory.py and force-push your branch.

🤖 Generated with Claude Code

**@⁠LooperSalty** on GitHub · 2026-11-26 14:01 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/315#issuecomment-7194169955) This PR now conflicts with main in `tests/test_lanceur_victory.py` (other launcher PRs changed the same test module). Please rebase on main, keep the tests of both sides, run `python -m pytest tests/test_lanceur_victory.py` and force-push your branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot force-pushed github-bot/gh-315 from 042bcf1ded to 0f0fd50063 2026-11-26 18:10:42 +00:00 Compare
Author
Owner

@⁠mauroalvare on GitHub · 2026-11-26 18:25 UTC · original

I rebased and moved the fix to anyxboxx run. Warm and launch now use the single executable reported by Cargo, with a clear error if Cargo reports zero or multiple matches.

All 31 launcher tests passed. I also verified release and diag with real Cargo, a custom output directory containing a space and an accent, and an explicit target triple. Both cold builds and cache hits launched the synthetic executable.

The latest CI run passed.

**@⁠mauroalvare** on GitHub · 2026-11-26 18:25 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/315#issuecomment-7200442328) I rebased and moved the fix to `anyxboxx run`. Warm and launch now use the single executable reported by Cargo, with a clear error if Cargo reports zero or multiple matches. All 31 launcher tests passed. I also verified release and diag with real Cargo, a custom output directory containing a space and an accent, and an explicit target triple. Both cold builds and cache hits launched the synthetic executable. [The latest CI run passed](https://github.com/LooperSalty/AnyXboxX/actions/runs/45873041475).
github-bot force-pushed github-bot/gh-315 from 0f0fd50063 to 4e041b756e 2026-11-26 19:35:12 +00:00 Compare
github-bot force-pushed github-bot/gh-315 from 4e041b756e to 9c36f0fd2c 2026-11-27 00:36:34 +00:00 Compare
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/315/head:github-bot/gh-315'
git switch 'github-bot/gh-315'

Merge

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