Skip to content

fix: flag unreachable upgraded locomotor sets - #39

Merged
ViTeXFTW merged 1 commit into
devfrom
issue-19
Jul 16, 2026
Merged

fix: flag unreachable upgraded locomotor sets#39
ViTeXFTW merged 1 commit into
devfrom
issue-19

Conversation

@ViTeXFTW

Copy link
Copy Markdown
Owner

Summary

  • warn on SET_NORMAL_UPGRADED locomotor fields when the object has no LocomotorSetUpgrade module
  • reuse the existing unreachable-set diagnostic
  • keep module-backed and map override definitions silent

Root cause

The engine only selects SET_NORMAL_UPGRADED after LocomotorSetUpgrade calls setLocomotorUpgrade(true). Without that module, normal locomotor selection never redirects to the upgraded set.

Impact

Dead upgraded locomotor definitions are now highlighted in the editor instead of silently appearing usable.

Validation

  • cargo test
  • spec coverage for dead, reachable, and partial override cases

Closes #19

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown

Greptile Summary

This PR extends the existing dead-code diagnostic for unreachable upgraded locomotor sets. The main changes are:

  • Warns on SET_NORMAL_UPGRADED locomotor fields when the object has no LocomotorSetUpgrade module.
  • Reuses the existing unreachable-set diagnostic code.
  • Keeps module-backed definitions and map override patches silent.
  • Adds spec coverage for unreachable, reachable, and override locomotor cases.

Confidence Score: 5/5

Safe to merge with minimal risk.

The change is narrowly scoped, follows the existing block-local reachability pattern, preserves override suppression, and includes targeted spec coverage.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • I reviewed the focused proof log to verify the exact command, working directory, and that the test run completed with EXIT_CODE: 0.
  • I reviewed the full crate proof log to verify the command, working directory, and the successful test summaries across the analysis crate with EXIT_CODE: 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
crates/analysis/src/diagnostics.rs Extends block-local set reachability diagnostics to warn on SET_NORMAL_UPGRADED locomotor fields when no LocomotorSetUpgrade module is present, while preserving override handling.
crates/analysis/tests/spec/DeadCodeTest.ini Adds dead, reachable, and override locomotor fixture objects plus referenced locomotor definitions for the new diagnostic behavior.
crates/analysis/tests/spec/DeadCodeTest.spec.toml Adds expected diagnostics proving only the unreachable upgraded locomotor fixture is warned and module-backed or override definitions remain silent.

Reviews (1): Last reviewed commit: "fix: flag unreachable upgraded locomotor..." | Re-trigger Greptile

@ViTeXFTW
ViTeXFTW marked this pull request as ready for review July 14, 2026 20:12
@ViTeXFTW
ViTeXFTW merged commit 3a7aa91 into dev Jul 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Unused LocomotorSetUpgrade doesn't get flagged

1 participant