Skip to content

fix(services): create salon hair for empty equipment slots - #42

Merged
NickMesser merged 1 commit into
rust-rewritefrom
fix/salon-missing-hair
Oct 23, 2026
Merged

NickMesser merged 1 commit into
rust-rewritefrom
fix/salon-missing-hair

Conversation

@NickMesser

Copy link
Copy Markdown
Owner

A paid beauty-salon request for hair 24128 on a character with no Hair equipment skipped item creation, consumed Salon Certificate 30811, and returned hair 0. Compare the equipped template (0 for an empty slot) with the requested hairstyle so the existing economy bridge creates the missing hair item. Same-hair requests retain the existing item, and appearance receipts still report actual equipment to the owner and nearby players.

The original C# ApplyBeautySalon has the same null guard. This deliberately fixes that omission and documents the deviation. Settlement stays unchanged: hair-creation failure logs, applies the model, broadcasts actual hair, and consumes the certificate; certificate-consumption failure logs without rolling back the already broadcast appearance.

Validation:

  • Baseline: the new missing-hair flow failed; the other five salon tests passed.
  • cargo test -p aaemu-game --lib --locked beauty_salon -- --test-threads=2: 7 passed. Real economy/container operations cover absent/same/changed hair, no certificate, creation failure, consumption failure, owner/observer receipts and packet layout.
  • cargo fmt -p aaemu-game -- --check: passed.
  • cargo clippy -p aaemu-game --all-targets --locked -- -D warnings: passed.
  • Read-only compact DB confirms items 24127/24128 are model 10 body parts with hair slot type 24.

The shared live lane has not been updated or restarted. Paid apply/re-entry live verification remains for the orchestrator after an explicitly scheduled safe game-server update. Full workspace checks were intentionally left to CI under the task's focused-validation constraint.

Treat missing hair as template 0 when checking whether a salon hairstyle needs replacement. Keep receipts authoritative and preserve existing certificate settlement and failure behavior.

Co-Authored-By: Codex <[email protected]>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 39989054425

Warning

No base build found for commit 180b4fd on rust-rewrite.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 76.744%

Details

  • Patch coverage: 2 of 2 lines across 1 file are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 258993
Covered Lines: 198761
Line Coverage: 76.74%
Coverage Strength: 29383.4 hits per line

💛 - Coveralls

@NickMesser
NickMesser merged commit 1f6e8df into rust-rewrite Oct 23, 2026
11 of 12 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.

2 participants