[PR #17] [MERGED] fix: index production test cfg modules #19

Closed
opened 2026-11-02 15:32:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-mixins/pull/17
Author: @arismoko
Created: 10/31/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @levzzz5154

Base: main ← Head: fix/cfg-test-modules


📝 Commits (1)

  • 00a8371 fix: index production test cfg modules

📊 Changes

4 files changed (+141 additions, -24 deletions)

View changed files

📝 crates/horizon-mixins-cli/tests/integration.rs (+22 -0)
📝 crates/horizon-mixins-core/src/index.rs (+110 -16)
📝 crates/horizon-mixins-core/src/plan.rs (+1 -1)
📝 docs/boundary-head-and-modules.md (+8 -7)

📄 Description

🤖 Opened by Aria's agent swarm, Dyna, not by Aria.

Summary

Treat #[cfg(not(test))] as active and #[cfg(test)] as inactive while indexing production source. horizon-mixins only stages the production build, where cfg(test) is never set, so these two predicates are known. Other cfg and cfg_attr predicates remain unresolved. This lets mixins stage against the library/executable split in horizon-rust/horizon#5446, which otherwise fails with E_MODULE: module destination must be an indexed Rust source file.

Field attribute checks in bridges and state remain conservative because conditional fields affect layout and generated code.

Validation

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test
  • Used https://github.com/arismoko/horizon-machine-sample as the end-to-end test route. At horizon-rust/horizon#5446 head cd85269d5931bb8a39ad3635c9276fa21652561d, the original tool fails with the error above; this change stages eight injections and one module. The sample revision pin was set to that head for this check.
  • Built the staged horizon-client with cargo build --profile fast -p horizon-client on Linux. Ran the sample offscreen on the server thread with horizon-ctl and a fresh game home. The machine took four cobblestone from the west chest, processed them, and sent four stone through the east pipe into the output chest.

🤖 Generated with Dyna.


🔄 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-mixins/pull/17 **Author:** [@arismoko](https://github.com/arismoko) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/cfg-test-modules` --- ### 📝 Commits (1) - [`00a8371`](https://github.com/horizon-rust/horizon-mixins/commit/00a837175a79ab41c13cd0dbbf8d480a04c93ec4) fix: index production test cfg modules ### 📊 Changes **4 files changed** (+141 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-mixins-cli/tests/integration.rs` (+22 -0) 📝 `crates/horizon-mixins-core/src/index.rs` (+110 -16) 📝 `crates/horizon-mixins-core/src/plan.rs` (+1 -1) 📝 `docs/boundary-head-and-modules.md` (+8 -7) </details> ### 📄 Description > 🤖 Opened by Aria's agent swarm, Dyna, not by Aria. ## Summary Treat `#[cfg(not(test))]` as active and `#[cfg(test)]` as inactive while indexing production source. horizon-mixins only stages the production build, where `cfg(test)` is never set, so these two predicates are known. Other `cfg` and `cfg_attr` predicates remain unresolved. This lets mixins stage against the library/executable split in horizon-rust/horizon#5446, which otherwise fails with `E_MODULE: module destination must be an indexed Rust source file`. Field attribute checks in bridges and state remain conservative because conditional fields affect layout and generated code. ## Validation - `cargo fmt --check` - `cargo clippy --all-targets -- -D warnings` - `cargo test` - Used https://github.com/arismoko/horizon-machine-sample as the end-to-end test route. At horizon-rust/horizon#5446 head `cd85269d5931bb8a39ad3635c9276fa21652561d`, the original tool fails with the error above; this change stages eight injections and one module. The sample revision pin was set to that head for this check. - Built the staged `horizon-client` with `cargo build --profile fast -p horizon-client` on Linux. Ran the sample offscreen on the server thread with `horizon-ctl` and a fresh game home. The machine took four cobblestone from the west chest, processed them, and sent four stone through the east pipe into the output chest. 🤖 Generated with Dyna. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:32:33 +07:00
Sign in to join this conversation.
No labels
pull-request
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-mixins#19
No description provided.