fix(mods): mods added before nightly 1007 are listed once again #410

Merged
HumanBean merged 4 commits from llun/LongshotLauncher:fix/mods-listed-twice into main 2026-12-03 14:40:05 +00:00
Member

Players see their mods twice on the Mods page, and the mods' ExeFS patches are no longer built into the game.

What was wrong

Before nightly 1007 this launcher labelled a mod it added with a mod.json, and listed it in profile.json. Since MagicBeanDev/Longshot#2822 the game and the builder read mod.toml only. Nothing converted the old labels, so mod installed lists one folder twice: by its folder's name, and as the profile's entry with its files "missing".

  • The switch on the folder's row fails ("not installed").
  • Remove on the "missing" row deletes the only copy.
  • The folder's ExeFS patches are left out of the build, so building again does not help.
  • A mod the player had switched off is on again.

Seen by two players with mods added before nightly 1007. Mods brought over from stable 3.2.0 get it too: that import still writes only a mod.json.

What this changes

At each start, after the import from stable, the launcher writes a mod.toml beside its own mod.json, with the same id, name and version (src/mods/old_format.rs). It does the same after an import for a builder without mod tools.

  • Only for a folder the profile lists, with a mod.json exactly as this launcher wrote it. Anything else is left alone: other people's mods, a folder with sites.toml or other folders in it, an id another mod.toml has (read as TOML).
  • Nothing is deleted. Older versions still read the mod.json.
  • No code is accepted: a mod with ExeFS patches asks the player, as any mod does.
  • A folder listed under both names keeps one entry. It is off if either one was off (a mod with cheats only was always listed off by this launcher, so its folder-name entry decides).
  • The list is written first, so a failed write is done at the next start with the choices kept.
  • Part folders in another spelling (RomFS) are renamed to lower case, as the builder reads them.
  • A mod with cheats and no ExeFS patches keeps its folder's name and gets no mod.toml, so its cheats still run.
  • A mod with both gets a mod.toml: its patches can be built again, but its cheats no longer run (the builder's own import does the same). The cheat files stay.
  • It waits while the profile is in use. The next start tries again.

A folder that has a mod.toml already is no longer given a mod.json by the import for older builders.

Not covered: an entry whose folder is gone stays listed as missing, so the player can remove it.

Tested

Windows 11, Rust 1.99.1 gnullvm with llvm-mingw.

  • Nine tests in old_format.rs. Undoing each of seven key lines of the review's fixes makes one fail, as undoing the key lines of the first version did.
  • cargo fmt, Clippy with -D warnings and the whole cargo test --locked pass on this head. tests/test_launcher_core.py passed on afbbfe4, the Tooling release suite on the first commit.
  • In the game, on afbbfe4: Windows 11, RTX 5080, driver 621.47, headless, from the repository save kokiri-start, the game built from Longshot main @ b4d56f526 plus one menu fix (b1b433ee9). On a throwaway profile this code had repaired, it reached play, loaded each mod that was on once, left the one that was off alone, and its log had no errors. Before the repair, the builder listed such a mod twice.

Not tested: clicking through the real launcher, building an ExeFS mod into the game, and Linux (CI runs its tests). No screenshots: no view changes, the page only gets fewer rows.

🤖 Generated with Claude Code

Players see their mods twice on the Mods page, and the mods' ExeFS patches are no longer built into the game. ## What was wrong Before nightly 1007 this launcher labelled a mod it added with a `mod.json`, and listed it in `profile.json`. Since https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2822 the game and the builder read `mod.toml` only. Nothing converted the old labels, so `mod installed` lists one folder twice: by its folder's name, and as the profile's entry with its files "missing". - The switch on the folder's row fails ("not installed"). - Remove on the "missing" row deletes the only copy. - The folder's ExeFS patches are left out of the build, so building again does not help. - A mod the player had switched off is on again. Seen by two players with mods added before nightly 1007. Mods brought over from stable 3.2.0 get it too: that import still writes only a `mod.json`. ## What this changes At each start, after the import from stable, the launcher writes a `mod.toml` beside its own `mod.json`, with the same id, name and version (`src/mods/old_format.rs`). It does the same after an import for a builder without mod tools. - Only for a folder the profile lists, with a `mod.json` exactly as this launcher wrote it. Anything else is left alone: other people's mods, a folder with `sites.toml` or other folders in it, an id another `mod.toml` has (read as TOML). - Nothing is deleted. Older versions still read the `mod.json`. - No code is accepted: a mod with ExeFS patches asks the player, as any mod does. - A folder listed under both names keeps one entry. It is off if either one was off (a mod with cheats only was always listed off by this launcher, so its folder-name entry decides). - The list is written first, so a failed write is done at the next start with the choices kept. - Part folders in another spelling (`RomFS`) are renamed to lower case, as the builder reads them. - A mod with cheats and no ExeFS patches keeps its folder's name and gets no `mod.toml`, so its cheats still run. - A mod with both gets a `mod.toml`: its patches can be built again, but its cheats no longer run (the builder's own import does the same). The cheat files stay. - It waits while the profile is in use. The next start tries again. A folder that has a `mod.toml` already is no longer given a `mod.json` by the import for older builders. Not covered: an entry whose folder is gone stays listed as missing, so the player can remove it. ## Tested Windows 11, Rust 1.99.1 gnullvm with llvm-mingw. - Nine tests in `old_format.rs`. Undoing each of seven key lines of the review's fixes makes one fail, as undoing the key lines of the first version did. - `cargo fmt`, Clippy with `-D warnings` and the whole `cargo test --locked` pass on this head. `tests/test_launcher_core.py` passed on afbbfe4, the Tooling release suite on the first commit. - In the game, on afbbfe4: Windows 11, RTX 5080, driver 621.47, headless, from the repository save `kokiri-start`, the game built from Longshot `main` @ b4d56f526 plus one menu fix (b1b433ee9). On a throwaway profile this code had repaired, it reached play, loaded each mod that was on once, left the one that was off alone, and its log had no errors. Before the repair, the builder listed such a mod twice. Not tested: clicking through the real launcher, building an ExeFS mod into the game, and Linux (CI runs its tests). No screenshots: no view changes, the page only gets fewer rows. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(mods): mods added before nightly 1007 are listed once again
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
255c1a817a
This launcher labelled a mod with a mod.json. Longshot now reads mod.toml alone, so the builder listed the folder by
its name and the profile's entry as missing, and left its ExeFS patches out. Each start writes the mod.toml beside the
launcher's own mod.json.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • issue #378 Launcher: Mods page shows incorrect mod names/order and count — Mods list may share the incorrect-count symptom; PR addresses legacy duplicate entries
Possibly related, for context: - issue #378 Launcher: Mods page shows incorrect mod names/order and count — Mods list may share the incorrect-count symptom; PR addresses legacy duplicate entries
Author
Member
@review
BeanBot requested changes 2026-12-03 12:23:23 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The migration can leave a disabled mod enabled after a partial failure, and it can create a duplicate manifest ID. It also skips some folders the launcher itself imported.

The change restores manifests for older local mods and preserves their files, but its recovery and identification logic can leave affected mods in the wrong state or prevent them from loading.

Blocking (3): must change before merging.

  1. L2 src/mods/old_format.rs:122: The claimed-ID check searches for a double-quoted string instead of reading the TOML ID. (more on the line) Do: Parse each manifest as TOML and compare its ID, handling unreadable or invalid manifests conservatively.
  2. L3 src/mods/old_format.rs:70: The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them. (more on the line) Do: Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names.
  3. L4 src/mods/old_format.rs:161: The cheat-folder branch discards the old row without preserving its off setting when a folder-name row exists. (more on the line) Do: Merge the two rows' on settings before removing the old row, keeping the mod off if either row is off.

Should fix (1): not blocking, but worth doing before merging.

  • L1 src/mods/old_format.rs:160: The manifest is published before the corresponding profile changes, and a failed later operation leaves it published permanently. (more on the line) Do: Make publication and profile repair recoverable together, including after a later mod or profile write fails; add a test that retries after such a failure.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The end-to-end repair has not been exercised through a real launcher build and game. When: A repaired ExeFS mod may list correctly in the synthetic builder run while its approval, build, or game behavior differs in the actual workflow. Do: On Windows and Linux, import or upgrade representative enabled and disabled mods, review an ExeFS patch, build, and verify the resulting game behavior.

@fix can do L1, L2, L3 and L4.

Checks: Still running: 5 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven. The reported synthetic builder run showed one row per repaired mod with its on/off choice, but no real launcher, build, or game run was reported.

Other systems: The migration affects profile files shared with the builder and game on Windows and Linux, including stable imports and older builders. The reported tests ran on Windows; Linux and a real build and game were not tested.

Switches: None.

Reviewed: 255c1a817a against 3898cb1bb0: Read the repository rules, commit and complete diff; read the new migration and stable-import code in full, and the changed portions and relevant callers of the other changed files. Skimmed related mod tests and documentation. The other changed files were not read in full; no recorded runs or generated files were supplied.; nothing run (a code review).

Checked and fine:

  • The commit has an AI co-author trailer.
  • The added test fixtures use synthetic data, and the diff does not add game-derived files.
  • The migration retains mod.json and does not write a trust grant.

Testing: No commands from the project or tests were run, as requested. The author reports Windows Rust tests, formatting, Clippy, and the Tooling release suite passing; the launcher core suite was unfinished and CI was still running.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The migration can leave a disabled mod enabled after a partial failure, and it can create a duplicate manifest ID. It also skips some folders the launcher itself imported. The change restores manifests for older local mods and preserves their files, but its recovery and identification logic can leave affected mods in the wrong state or prevent them from loading. **Blocking (3)**: must change before merging. 1. **L2** `src/mods/old_format.rs:122`: The claimed-ID check searches for a double-quoted string instead of reading the TOML ID. (more on the line) **Do:** Parse each manifest as TOML and compare its ID, handling unreadable or invalid manifests conservatively. 2. **L3** `src/mods/old_format.rs:70`: The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them. (more on the line) **Do:** Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names. 3. **L4** `src/mods/old_format.rs:161`: The cheat-folder branch discards the old row without preserving its off setting when a folder-name row exists. (more on the line) **Do:** Merge the two rows' on settings before removing the old row, keeping the mod off if either row is off. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `src/mods/old_format.rs:160`: The manifest is published before the corresponding profile changes, and a failed later operation leaves it published permanently. (more on the line) **Do:** Make publication and profile repair recoverable together, including after a later mod or profile write fails; add a test that retries after such a failure. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The end-to-end repair has not been exercised through a real launcher build and game. *When:* A repaired ExeFS mod may list correctly in the synthetic builder run while its approval, build, or game behavior differs in the actual workflow. **Do:** On Windows and Linux, import or upgrade representative enabled and disabled mods, review an ExeFS patch, build, and verify the resulting game behavior. `@fix` can do L1, L2, L3 and L4. **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. The reported synthetic builder run showed one row per repaired mod with its on/off choice, but no real launcher, build, or game run was reported. **Other systems:** The migration affects profile files shared with the builder and game on Windows and Linux, including stable imports and older builders. The reported tests ran on Windows; Linux and a real build and game were not tested. **Switches:** None. **Reviewed:** 255c1a817a29 against 3898cb1bb057: Read the repository rules, commit and complete diff; read the new migration and stable-import code in full, and the changed portions and relevant callers of the other changed files. Skimmed related mod tests and documentation. The other changed files were not read in full; no recorded runs or generated files were supplied.; nothing run (a code review). **Checked and fine:** - The commit has an AI co-author trailer. - The added test fixtures use synthetic data, and the diff does not add game-derived files. - The migration retains mod.json and does not write a trust grant. **Testing:** No commands from the project or tests were run, as requested. The author reports Windows Rust tests, formatting, Clippy, and the Tooling release suite passing; the launcher core suite was unfinished and CI was still running. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -0,0 +67,4 @@
}
if entry.path().is_dir() {
let part = PARTS.iter().position(|p| *p == name)?;
if !players::is_dir(&dir.join(PARTS[part])) {
Member

L3 (blocking): The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them.

When: On Linux, a mod imported in place with an ExeFS or RomFS directory receives this launcher's mod.json, but the lowercase path checked here does not exist. Every start skips it, leaving the duplicate row and its patches unbuilt.

Do: Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names.

**L3** (blocking): The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them. *When:* On Linux, a mod imported in place with an ExeFS or RomFS directory receives this launcher's mod.json, but the lowercase path checked here does not exist. Every start skips it, leaving the duplicate row and its patches unbuilt. **Do:** Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names.
@ -0,0 +119,4 @@
let quoted = format!("\"{id}\"");
for entry in fs::read_dir(profile.join("mods"))? {
let file = entry?.path().join("mod.toml");
if players::is_file(&file) && fs::read_to_string(&file)?.contains(&quoted) {
Member

L2 (blocking): The claimed-ID check searches for a double-quoted string instead of reading the TOML ID.

When: An existing valid manifest containing id = 'local/grass' is not detected. The migration then writes another manifest with that ID, so both folders claim it and neither loads.

Do: Parse each manifest as TOML and compare its ID, handling unreadable or invalid manifests conservatively.

**L2** (blocking): The claimed-ID check searches for a double-quoted string instead of reading the TOML ID. *When:* An existing valid manifest containing id = 'local/grass' is not detected. The migration then writes another manifest with that ID, so both folders claim it and neither loads. **Do:** Parse each manifest as TOML and compare its ID, handling unreadable or invalid manifests conservatively.
@ -0,0 +157,4 @@
let mut file = tempfile::NamedTempFile::new_in(&dir)?;
file.write_all(text.as_bytes())?;
file.as_file().sync_all()?;
file.persist_noclobber(dir.join("mod.toml"))?;
Member

L1 (should fix): The manifest is published before the corresponding profile changes, and a failed later operation leaves it published permanently.

When: If a duplicated mod has its folder-name row off and its old-ID row on, the manifest can be written successfully but a later mod's write or the profile write can fail. The profile still contains both original rows; on the next start, old() skips the already-written manifest, so the off choice is never merged into the surviving ID.

Do: Make publication and profile repair recoverable together, including after a later mod or profile write fails; add a test that retries after such a failure.

**L1** (should fix): The manifest is published before the corresponding profile changes, and a failed later operation leaves it published permanently. *When:* If a duplicated mod has its folder-name row off and its old-ID row on, the manifest can be written successfully but a later mod's write or the profile write can fail. The profile still contains both original rows; on the next start, old() skips the already-written manifest, so the off choice is never merged into the surviving ID. **Do:** Make publication and profile repair recoverable together, including after a later mod or profile write fails; add a test that retries after such a failure.
@ -0,0 +158,4 @@
file.write_all(text.as_bytes())?;
file.as_file().sync_all()?;
file.persist_noclobber(dir.join("mod.toml"))?;
} else if pins.iter().any(|p| p["id"] == by_name) {
Member

L4 (blocking): The cheat-folder branch discards the old row without preserving its off setting when a folder-name row exists.

When: For a romfs-and-cheats folder whose old-ID row is off and folder-name row is on, migration removes the off row and retains the on row. The mod is enabled despite the player's saved choice.

Do: Merge the two rows' on settings before removing the old row, keeping the mod off if either row is off.

**L4** (blocking): The cheat-folder branch discards the old row without preserving its off setting when a folder-name row exists. *When:* For a romfs-and-cheats folder whose old-ID row is off and folder-name row is on, migration removes the off row and retains the on row. The mod is enabled despite the player's saved choice. **Do:** Merge the two rows' on settings before removing the old row, keeping the mod off if either row is off.
fix(mods): the list is repaired before the labels, ids are read as TOML, parts in any case
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
afbbfe4987
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

All four are fixed in afbbfe4, each with a test that fails when its fix is taken out.

  • L1: the list in profile.json is written first, then each mod.toml. If writing one fails, the others are still written and the next start finishes the job. The off choice is already merged by then. Test: a_failed_write_is_done_at_the_next_start_with_the_choices_kept.
  • L2: each mod.toml is read as TOML and its id compared, in nested folders too. A file that cannot be read counts as having the id. One that is not valid TOML counts if it names the id. The toml crate was already in Cargo.lock at this version.
  • L3: RomFS, ExeFS and so on are renamed to lower case before the mod.toml is written. A folder that holds the same part in two spellings is left alone.
  • L4: both branches merge the on/off choice now: off if either entry is off. The one exception is a mod with cheats only, which this launcher always listed as off, so that is not the player's choice.
  • L5: in part. On Windows 11 with an RTX 5080 (driver 621.47), the game ran headless on a throwaway profile this code had repaired. It reached play, loaded each mod that was on once, left the one that was off alone, and its log had no errors. The game was built from Longshot main @ b4d56f526 plus one menu fix (b1b433ee9). Still not tested: clicking through the real launcher, building an ExeFS mod, and Linux beyond CI.
All four are fixed in afbbfe4, each with a test that fails when its fix is taken out. - **L1:** the list in `profile.json` is written first, then each `mod.toml`. If writing one fails, the others are still written and the next start finishes the job. The off choice is already merged by then. Test: `a_failed_write_is_done_at_the_next_start_with_the_choices_kept`. - **L2:** each `mod.toml` is read as TOML and its `id` compared, in nested folders too. A file that cannot be read counts as having the id. One that is not valid TOML counts if it names the id. The `toml` crate was already in `Cargo.lock` at this version. - **L3:** `RomFS`, `ExeFS` and so on are renamed to lower case before the `mod.toml` is written. A folder that holds the same part in two spellings is left alone. - **L4:** both branches merge the on/off choice now: off if either entry is off. The one exception is a mod with cheats only, which this launcher always listed as off, so that is not the player's choice. - **L5:** in part. On Windows 11 with an RTX 5080 (driver 621.47), the game ran headless on a throwaway profile this code had repaired. It reached play, loaded each mod that was on once, left the one that was off alone, and its log had no errors. The game was built from Longshot `main` @ b4d56f526 plus one menu fix (b1b433ee9). Still not tested: clicking through the real launcher, building an ExeFS mod, and Linux beyond CI.
Author
Member
@review
BeanBot requested changes 2026-12-03 12:41:35 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The migration still leaves differently capitalized part folders unchanged for mods kept without a manifest, so those parts can remain unavailable on case-sensitive filesystems.

The change repairs old launcher-labelled mods by merging duplicate profile entries and writing manifests. It preserves existing files and choices, but its case normalization does not cover the manifest-free cheat branch.

Blocking (1): must change before merging.

  1. L3 src/mods/old_format.rs:70: The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them. When: On Linux, a mod imported in place with an ExeFS or RomFS directory receives this launcher's mod.json, but the lowercase path checked here does not exist. Every start skips it, leaving the duplicate row and its patches unbuilt. Do: Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names.

@fix can do L3.

Since the last review (on 255c1a817a)
Resolved: L1 (The manifest is published before the corresponding profile changes, and a failed later ope…); L2 (The claimed-ID check searches for a double-quoted string instead of reading the TOML ID.); L4 (The cheat-folder branch discards the old row without preserving its off setting when a fol…); L5 (The end-to-end repair has not been exercised through a real launcher build and game.)
Still open: L3 (The migration rejects differently capitalized part folders even though the launcher's in-p…)

Checks: Still running: 5 checks.

Also noticed (1; not asked for, not blocking)
  • A real launcher build with an ExeFS mod and a Linux run remain useful to verify the complete repair workflow.
More: does it help, other systems, switches, what was read

Does it help: Unproven for the full repair workflow. A Windows headless game run loaded repaired enabled mods and left a disabled mod off; building an ExeFS mod through the launcher and Linux remain untested.

Other systems: The migration affects profile files and mod folders on Windows and Linux, including stable imports and older builders. Case-sensitive filesystems expose the remaining part-folder issue; the reported game run was on Windows.

Switches: None.

Reviewed: afbbfe4987 against 3898cb1bb0: Read AGENTS.md, CONTRIBUTING.md, Cargo.toml and src/mods/old_format.rs; inspected the diff, migration callers and importer. The larger changed files and Cargo.lock were skimmed. No review checklist or pull request template was present.; nothing run (a code review).

Checked and fine:

  • Manifest publication follows the profile write, and a failed publication can be retried.
  • The ID collision check handles TOML string quoting and nested folders.
  • The fix retains the migration rather than routing around it.

Testing: No commands that build or run the project were executed. The author reports Windows tests and a headless game run; CI is still running.

Overlaps and merge order: Not available from the supplied information.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The migration still leaves differently capitalized part folders unchanged for mods kept without a manifest, so those parts can remain unavailable on case-sensitive filesystems. The change repairs old launcher-labelled mods by merging duplicate profile entries and writing manifests. It preserves existing files and choices, but its case normalization does not cover the manifest-free cheat branch. **Blocking (1)**: must change before merging. 1. **L3** `src/mods/old_format.rs:70`: The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them. *When:* On Linux, a mod imported in place with an ExeFS or RomFS directory receives this launcher's mod.json, but the lowercase path checked here does not exist. Every start skips it, leaving the duplicate row and its patches unbuilt. **Do:** Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names. `@fix` can do L3. **Since the last review** (on 255c1a817a29) Resolved: L1 (The manifest is published before the corresponding profile changes, and a failed later ope…); L2 (The claimed-ID check searches for a double-quoted string instead of reading the TOML ID.); L4 (The cheat-folder branch discards the old row without preserving its off setting when a fol…); L5 (The end-to-end repair has not been exercised through a real launcher build and game.) Still open: L3 (The migration rejects differently capitalized part folders even though the launcher's in-p…) **Checks:** Still running: 5 checks. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - A real launcher build with an ExeFS mod and a Linux run remain useful to verify the complete repair workflow. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the full repair workflow. A Windows headless game run loaded repaired enabled mods and left a disabled mod off; building an ExeFS mod through the launcher and Linux remain untested. **Other systems:** The migration affects profile files and mod folders on Windows and Linux, including stable imports and older builders. Case-sensitive filesystems expose the remaining part-folder issue; the reported game run was on Windows. **Switches:** None. **Reviewed:** afbbfe49873f against 3898cb1bb057: Read AGENTS.md, CONTRIBUTING.md, Cargo.toml and src/mods/old_format.rs; inspected the diff, migration callers and importer. The larger changed files and Cargo.lock were skimmed. No review checklist or pull request template was present.; nothing run (a code review). **Checked and fine:** - Manifest publication follows the profile write, and a failed publication can be retried. - The ID collision check handles TOML string quoting and nested folders. - The fix retains the migration rather than routing around it. **Testing:** No commands that build or run the project were executed. The author reports Windows tests and a headless game run; CI is still running. **Overlaps and merge order:** Not available from the supplied information. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
fix(mods): a mod with cheats has its parts renamed too
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
a433dad7a1
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

L3 is fixed for mods kept without a manifest too, in a433dad: the part folders are renamed to lower case before the mod's entry changes, in both branches. If a rename fails, the entry stays as it is and the next start tries again. The test now covers a ROMFS and Cheats folder, and it fails with the rename taken out. Clippy and the whole cargo test pass on Windows.

L3 is fixed for mods kept without a manifest too, in a433dad: the part folders are renamed to lower case before the mod's entry changes, in both branches. If a rename fails, the entry stays as it is and the next start tries again. The test now covers a `ROMFS` and `Cheats` folder, and it fails with the rename taken out. Clippy and the whole cargo test pass on Windows.
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. The migration still leaves some previously imported mods with capitalized part folders, so the builder or game can miss their contents.

The change repairs old mod labels and profile entries so affected mods can be listed and built again. It adds migration and retry logic, but one eligible naming case still bypasses the part-folder repair.

Blocking (1): must change before merging.

  1. L3 src/mods/old_format.rs:70: The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them. When: On Linux, a mod imported in place with an ExeFS or RomFS directory receives this launcher's mod.json, but the lowercase path checked here does not exist. Every start skips it, leaving the duplicate row and its patches unbuilt. Do: Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names.

@fix can do L3.

Since the last review (on afbbfe4987)
Still open: L3 (The migration rejects differently capitalized part folders even though the launcher's in-p…)

Checks: Still running: 5 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven: the author reports that a repaired profile reached play and loaded enabled mods on Windows, but an ExeFS build and the real launcher flow have not been tested.

Other systems: The migration runs on Windows and Linux and affects the builder and game’s reading of mod folders. Windows gameplay was reported; Linux and an ExeFS build remain untested.

Switches: None.

Reviewed: a433dad7a1 against 3898cb1bb0: Read src/mods/old_format.rs and the repository rules in AGENTS.md and CONTRIBUTING.md in full. Read the changed hunks in Cargo.toml, src/main.rs, src/mods.rs, src/mods/local.rs and src/players/mod.rs; the other changed files were not read in full. The specified checklist and pull request template were absent.; nothing run (a code review).

Checked and fine:

  • For no-manifest mods whose slug differs from the folder name, part renames now run before the profile entry changes; a failed rename leaves that entry available for a later retry.

Testing: No commands from the project were run. The author reports Windows tests and a gameplay run; CI is still running. A real launcher flow, an ExeFS build and Linux remain untested.

Overlaps and merge order: Unknown; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The migration still leaves some previously imported mods with capitalized part folders, so the builder or game can miss their contents. The change repairs old mod labels and profile entries so affected mods can be listed and built again. It adds migration and retry logic, but one eligible naming case still bypasses the part-folder repair. **Blocking (1)**: must change before merging. 1. **L3** `src/mods/old_format.rs:70`: The migration rejects differently capitalized part folders even though the launcher's in-place importer accepts them. *When:* On Linux, a mod imported in place with an ExeFS or RomFS directory receives this launcher's mod.json, but the lowercase path checked here does not exist. Every start skips it, leaving the duplicate row and its patches unbuilt. **Do:** Handle the spelling accepted by the importer and ensure the resulting manifest points to parts the builder can use, for example by safely normalizing their names. `@fix` can do L3. **Since the last review** (on afbbfe49873f) Still open: L3 (The migration rejects differently capitalized part folders even though the launcher's in-p…) **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the author reports that a repaired profile reached play and loaded enabled mods on Windows, but an ExeFS build and the real launcher flow have not been tested. **Other systems:** The migration runs on Windows and Linux and affects the builder and game’s reading of mod folders. Windows gameplay was reported; Linux and an ExeFS build remain untested. **Switches:** None. **Reviewed:** a433dad7a1ba against 3898cb1bb057: Read src/mods/old_format.rs and the repository rules in AGENTS.md and CONTRIBUTING.md in full. Read the changed hunks in Cargo.toml, src/main.rs, src/mods.rs, src/mods/local.rs and src/players/mod.rs; the other changed files were not read in full. The specified checklist and pull request template were absent.; nothing run (a code review). **Checked and fine:** - For no-manifest mods whose slug differs from the folder name, part renames now run before the profile entry changes; a failed rename leaves that entry available for a later retry. **Testing:** No commands from the project were run. The author reports Windows tests and a gameplay run; CI is still running. A real launcher flow, an ExeFS build and Linux remain untested. **Overlaps and merge order:** Unknown; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
fix(mods): a mod listed by its folder's name has its parts renamed too
Some checks failed
CI / What the change needs (pull_request) Successful in 5s
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 11s
PR title / Conventional Commit title (pull_request) Successful in 5s
CI / Rust formatting, lint and tests (pull_request) Successful in 13m58s
CI / Release packages and stable upgrades (pull_request) Failing after 33m58s
68a448464b
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

The last case of L3 is fixed in 68a4484: a mod with cheats whose folder is named like its id already (mods/caps, local/caps) has its parts renamed too, and its entry and on/off choice stay as they were. The test covers it, and a mod with cheats alone. Taking out either new line makes it fail. On this head, Clippy with -D warnings and the whole cargo test --locked pass on Windows.

The last case of L3 is fixed in 68a4484: a mod with cheats whose folder is named like its id already (`mods/caps`, `local/caps`) has its parts renamed too, and its entry and on/off choice stay as they were. The test covers it, and a mod with cheats alone. Taking out either new line makes it fail. On this head, Clippy with `-D warnings` and the whole `cargo test --locked` pass on Windows.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The remaining migration case is fixed: capitalized part folders are now renamed even when a cheats mod is already listed by its folder name, while its existing choice is preserved. Recommend approval; not approved on the forge.

The launcher repairs older mod entries and labels so affected mods appear once and their ExeFS patches can be built again. The migration adds filesystem work at startup and preserves the documented tradeoff for mods containing both cheats and ExeFS patches.

Since the last review (on a433dad7a1)
Resolved: L3 (The migration rejects differently capitalized part folders even though the launcher's in-p…)

Checks: Still running: 5 checks.

Also noticed (2; not asked for, not blocking)
  • The cheats-only regression test checks the profile and absence of a manifest but does not directly assert that the Cheats folder was renamed.
  • The reported checks are still running in CI; the author reports Windows formatting, Clippy and locked tests passed.
More: does it help, other systems, switches, what was read

Does it help: Yes for the reported duplicate-listing and loading case: the author reports a repaired profile reached play and loaded enabled mods once on Windows. Building an ExeFS mod and using the real launcher were not tested.

Other systems: The migration runs on Windows and Linux and handles profiles under an edit lock after checking that their paths are idle. The reported game run was on Windows; Linux coverage is limited to the stated CI tests.

Switches: None.

Reviewed: 68a448464b against 3898cb1bb0: Read AGENTS.md, CONTRIBUTING.md, the full old-format migration and its tests, the change since the ledger head, and the pull request diff; other changed files and surrounding callers were skimmed. No review checklist or pull request template was present at the specified paths.; nothing run (a code review).

Checked and fine:

  • The changed merge guard preserves the existing on/off value when the folder-derived ID already matches.
  • The existing test directly checks renamed parts for a matching-ID RomFS-and-cheats folder.

Testing: No commands that execute project code were run. The author reports Windows tests and a game run; real launcher interaction, an ExeFS build and Linux gameplay remain untested.

Overlaps and merge order: None found in the supplied context.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The remaining migration case is fixed: capitalized part folders are now renamed even when a cheats mod is already listed by its folder name, while its existing choice is preserved. Recommend approval; not approved on the forge. The launcher repairs older mod entries and labels so affected mods appear once and their ExeFS patches can be built again. The migration adds filesystem work at startup and preserves the documented tradeoff for mods containing both cheats and ExeFS patches. **Since the last review** (on a433dad7a1ba) Resolved: L3 (The migration rejects differently capitalized part folders even though the launcher's in-p…) **Checks:** Still running: 5 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The cheats-only regression test checks the profile and absence of a manifest but does not directly assert that the Cheats folder was renamed. - The reported checks are still running in CI; the author reports Windows formatting, Clippy and locked tests passed. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported duplicate-listing and loading case: the author reports a repaired profile reached play and loaded enabled mods once on Windows. Building an ExeFS mod and using the real launcher were not tested. **Other systems:** The migration runs on Windows and Linux and handles profiles under an edit lock after checking that their paths are idle. The reported game run was on Windows; Linux coverage is limited to the stated CI tests. **Switches:** None. **Reviewed:** 68a448464b6b against 3898cb1bb057: Read AGENTS.md, CONTRIBUTING.md, the full old-format migration and its tests, the change since the ledger head, and the pull request diff; other changed files and surrounding callers were skimmed. No review checklist or pull request template was present at the specified paths.; nothing run (a code review). **Checked and fine:** - The changed merge guard preserves the existing on/off value when the folder-derived ID already matches. - The existing test directly checks renamed parts for a matching-ID RomFS-and-cheats folder. **Testing:** No commands that execute project code were run. The author reports Windows tests and a game run; real launcher interaction, an ExeFS build and Linux gameplay remain untested. **Overlaps and merge order:** None found in the supplied context. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/mods-listed-twice 2026-12-03 14:40:05 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
MagicBeanDev/LongshotLauncher!410
No description provided.