build(victory): record locked runtime build provenance #543
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/543"
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 LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-27T19:28:48Z.
Change
OPT-SEC-002. Apply
--lockedto the launchers' source build command and add a release build command that verifies the checkout, both lockfiles, the TomBox gitlink, the vendored VIctory tree, and the pinned x64 toolchain. The release tool selects the exact executable reported by Cargo. It emits a schema 1 identity manifest for the launcher and a build record with the lock hashes and toolchain evidence. Launcher identity contractBase
3e3dd53e269f69f90ca77563fc23216d05ea913e. Tested implementation9491dc41f1b02280c552c90d8519dee42a09baf2.Verification
cargo test --locked --offline -j 6 -p anyxboxx --libfinished with 26 passed.cargo build --release --locked --offline -j 6 -p anyxboxxpassed.python -m pytest -q tests/test_build_victory_identity.pyfinished with 8 passed.python -m pytest -qfinished with 1540 passed and 437 skipped. The skipped tests require components outside the launcher build in this worktree.python -m ruff check --select W605,F,E9 PrototypeScarlett tests toolspassed.python tools/build_victory_identity.py --repo <clean-checkout> --target-dir <fresh-dir> --offlinetwice with source commitc5d78244b562cb17865e6e84704ad975bb0b026f, Rust 1.98.1, MSVC 14.44 and SDK 10.0.26100.0. Each executable was 12,172,288 bytes. The executables differed in 20 bytes across the COFF timestamp, three debug-directory timestamps, and the CodeView GUID. These fields account for every differing byte.Integration
Merge #540 first. It provides the launcher verifier that consumes the identity manifest emitted here.
The executable SHA-256 pins the exact bytes of one build. PE timestamps and the CodeView GUID can differ across builds with identical recorded inputs. Compare the recorded source, toolchain, and lockfile fields and pin each executable with its own manifest.
Every launcher source build uses Cargo's
--lockedflag. A change that requires updatingCargo.locknow fails until the lockfile is regenerated.The documentation follow-up in
829e8bd6passed all 40 build-identity and launcher integration cases and Ruff on the touched sources.Oracle and test data
Temporary Git checkouts and inert data cover gitlink drift, dirty locks, a toolchain mismatch, and Cargo's artifact selection. A minimal source fixture confirms Cargo rejects stale lock resolution with
--locked. Rebuild evidence comes from the vendored project source and the installed SDK.AI assistance was used to implement and verify the change.
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T19:46:26Z.
Thanks; no user names or absolute paths end up in the manifest or
build.json. Three points:executable_sha256is a per-build pin, not a reproducible one.docs/architecture-rust.mdsays to "compare the executable SHA-256 values across builds", which will always differ. Please say the pin is per build, or make builds reproducible (/Brepro).identity.jsonverifier from #540, which is not on main yet. Please state the dependency in the description, so they are merged in order.--locked(crates/anyxboxx/src/run/steps.rs) now applies to everyanyxboxx runsource build: a dependency edited without updatingCargo.locknow fails instead of resolving. That is probably what you want, but please call it out in the description.Imported from LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-27T20:06:05Z.
Thanks, @LooperSalty. The English and French guides in
829e8bd6describe the executable SHA-256 as a pin for one build and tell readers which recorded inputs to compare across rebuilds. The PR description now asks to merge #540 first and explains that source launches fail when--lockedrequires a lockfile update. The Windows build, all 40 build-identity and launcher cases, and Ruff passed.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.