[PR #5756] [MERGED] Fix launcher checks for same-bundle native crate dependencies #6480

Closed
opened 2026-11-03 06:21:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5756
Author: @finalpantasy
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/native-sibling-lock-dependencies


📝 Commits (3)

  • 5515c06 Fix launcher validation of bundled sibling crate dependencies
  • 18a272e Merge main into #5756
  • 6529810 Native crates: read dev_dependencies and build_dependencies too

📊 Changes

1 file changed (+411 additions, -15 deletions)

View changed files

📝 launcher/src/native_mods/crates.rs (+411 -15)

📄 Description

🤖 Opened by finalpantasy's AI agent (OpenAI Codex; GPT-6 Luna implementation and GPT-6.1 Sol review), not by finalpantasy personally.

What and why

Fixes #5724.

With same-bundle crate support, a native bundle can stage a library dependency such as industrial-sim = { path = "../industrial_sim", package = "gtnh-lv-compressor-eval-industrial-sim" }. The launcher currently treats it as a registry dependency and rejects it because the package is absent from Horizon's downloaded lock entries.

Validate explicit direct sibling paths against regular manifests in the same staged mod, including package aliases, before excluding them from the registry requests. Keep registry requests with identical package names subject to the original checks. Reject malformed paths, source-selector conflicts, links and Windows junctions. Discovery errors keep the caller's validation gate enabled. The downloaded source/version/checksum comparison and cargo fetch --locked are unchanged.

Five added tests cover dependency-table variants, aliases, registry-name collisions, malformed sources, and the discovery gate with real filesystem links. Earlier tests remain intact.

Kind

  • parity
  • bug: a crash or a breakage
  • perf
  • feature
  • extra
  • tooling
  • docs

Vanilla reference

None; launcher dependency validation.

Other projects' code

Read the horizon-mixins staging implementation at 3ac63df, licensed MIT, to trace its sibling-path format. No code copied from it. The SDK contribution is separate: horizon-rust/horizon-mixins#18.

Self-check

tools/pr_ready.py --quick --base upstream/main, Windows, Rust 1.96.0, base 81b0cd084, one compiler job/two CPUs:

Check Result
Scope 1 file, +400 / -13
Cargo.lock unchanged
Public tree pass
Python tests 511 passed
Launcher rustfmt pass
Launcher Clippy, all targets, warnings denied pass
Launcher library tests 356 passed; 5 ignored
Exact dependency-module probe 8 passed, including an actual Windows junction
Untouched baseline library tests 351 passed; 5 ignored
Parity not run (--quick; no gameplay change)

The self-check exited 0. Its owned runner cleaned surviving child processes after tool exit, also observed on untouched main; cleanup was confirmed. Rust 1.99 and Unix checks were not run locally. The exact module probe substitutes only unrelated process-launch helpers and is additional evidence, not a replacement for the full launcher tests.

The normal Windows launcher build/install now passes with this patch and the pinned SDK revision. The installed executable matches its compiled output, and four fresh offscreen save/reopen sessions using normal content-mod discovery passed with four natural exits, zero decode errors, and no output duplication. Independent review checked the raw logs, command journals, 38 full NBT/menu observations, and final disk NBT; the player retained all three produced sandstone. Tests used fixture power, two CPU cores, BelowNormal priority, and a verified 30-FPS cap; both bounded invocations finished within ten minutes. The public source package and scoped verification metadata are in gtnh-native-rust dce6efc. The earlier 1,204-row reference comparison was not rerun against this installed executable. Unmodified stock SDK/launcher support and upstream merges are not claimed.

🤖 Generated with OpenAI Codex


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5756 **Author:** [@finalpantasy](https://github.com/finalpantasy) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/native-sibling-lock-dependencies` --- ### 📝 Commits (3) - [`5515c06`](https://github.com/horizon-rust/horizon/commit/5515c06762a0634f037e643bd021dd0f7f1bb800) Fix launcher validation of bundled sibling crate dependencies - [`18a272e`](https://github.com/horizon-rust/horizon/commit/18a272eb7d0aba54f103712c7758fc50ec8b6190) Merge main into #5756 - [`6529810`](https://github.com/horizon-rust/horizon/commit/652981076f1fbf35b6824b40f3b7d3286b8439f0) Native crates: read dev_dependencies and build_dependencies too ### 📊 Changes **1 file changed** (+411 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/native_mods/crates.rs` (+411 -15) </details> ### 📄 Description > 🤖 Opened by finalpantasy's AI agent (OpenAI Codex; GPT-6 Luna implementation and GPT-6.1 Sol review), not by finalpantasy personally. ## What and why Fixes #5724. With same-bundle crate support, a native bundle can stage a library dependency such as `industrial-sim = { path = "../industrial_sim", package = "gtnh-lv-compressor-eval-industrial-sim" }`. The launcher currently treats it as a registry dependency and rejects it because the package is absent from Horizon's downloaded lock entries. Validate explicit direct sibling paths against regular manifests in the same staged mod, including package aliases, before excluding them from the registry requests. Keep registry requests with identical package names subject to the original checks. Reject malformed paths, source-selector conflicts, links and Windows junctions. Discovery errors keep the caller's validation gate enabled. The downloaded source/version/checksum comparison and `cargo fetch --locked` are unchanged. Five added tests cover dependency-table variants, aliases, registry-name collisions, malformed sources, and the discovery gate with real filesystem links. Earlier tests remain intact. ## Kind - [ ] parity - [x] bug: a crash or a breakage - [ ] perf - [ ] feature - [ ] extra - [ ] tooling - [ ] docs ## Vanilla reference None; launcher dependency validation. ## Other projects' code Read the [horizon-mixins staging implementation at 3ac63df](https://github.com/horizon-rust/horizon-mixins/tree/3ac63df26d332bc344ba645d5d23497b7d4ad985), licensed MIT, to trace its sibling-path format. No code copied from it. The SDK contribution is separate: horizon-rust/horizon-mixins#18. ## Self-check `tools/pr_ready.py --quick --base upstream/main`, Windows, Rust 1.96.0, base `81b0cd084`, one compiler job/two CPUs: | Check | Result | | --- | --- | | Scope | 1 file, +400 / -13 | | Cargo.lock | unchanged | | Public tree | pass | | Python tests | 511 passed | | Launcher rustfmt | pass | | Launcher Clippy, all targets, warnings denied | pass | | Launcher library tests | 356 passed; 5 ignored | | Exact dependency-module probe | 8 passed, including an actual Windows junction | | Untouched baseline library tests | 351 passed; 5 ignored | | Parity | not run (`--quick`; no gameplay change) | The self-check exited 0. Its owned runner cleaned surviving child processes after tool exit, also observed on untouched main; cleanup was confirmed. Rust 1.99 and Unix checks were not run locally. The exact module probe substitutes only unrelated process-launch helpers and is additional evidence, not a replacement for the full launcher tests. The normal Windows launcher build/install now passes with this patch and the pinned SDK revision. The installed executable matches its compiled output, and four fresh offscreen save/reopen sessions using normal content-mod discovery passed with four natural exits, zero decode errors, and no output duplication. Independent review checked the raw logs, command journals, 38 full NBT/menu observations, and final disk NBT; the player retained all three produced sandstone. Tests used fixture power, two CPU cores, BelowNormal priority, and a verified 30-FPS cap; both bounded invocations finished within ten minutes. The public source package and scoped verification metadata are in [gtnh-native-rust dce6efc](https://github.com/finalpantasy/gtnh-native-rust/commit/dce6efcdc902c6b4b7c327b9e8cd2fd894c4bb06). The earlier 1,204-row reference comparison was not rerun against this installed executable. Unmodified stock SDK/launcher support and upstream merges are not claimed. 🤖 Generated with [OpenAI Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:21:19 +07:00
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6480
No description provided.