Skip to content

Fix VendorAmmo & VendorReagent over-propagation in ClassifyVendorFlags#777

Merged
Xian55 merged 1 commit intodevfrom
fix/764
Feb 14, 2026
Merged

Fix VendorAmmo & VendorReagent over-propagation in ClassifyVendorFlags#777
Xian55 merged 1 commit intodevfrom
fix/764

Conversation

@Xian55
Copy link
Owner

@Xian55 Xian55 commented Feb 14, 2026

Summary

  • Fix Phase 1/2/3 overwriting Phase DB ground truth for SoM/TBC vendors whose flags were correctly set from vendoritems.json
  • Track all vendors present in vendoritems.json in a HashSet<(string, int)> — Phase 1 (ApplyFlags), Phase 2 (ApplyFlagsBySubName), and Phase 3 (ApplyKeywordClassification) now skip these vendors
  • Only the flag application step needs guarding — Phase DB already corrected NpcFlag values in-memory before Phase 1 collects them

Before fix (audit - mismatches = incorrect flags on ground-truth vendors)

-VendorAmmo -VendorReagent
SoM 81 121
TBC 102 235

After fix

-VendorAmmo -VendorReagent
SoM 0 0
TBC 0 0

Test plan

  • dotnet build Utilities/ClassifyVendorFlags — builds successfully
  • dotnet run --project Utilities/ClassifyVendorFlags -- --audit-VendorAmmo and -VendorReagent counts drop to zero for SoM/TBC

🤖 Generated with Claude Code

Phase DB classifies vendor sub-type flags (VendorAmmo, VendorReagent, etc.)
from vendoritems.json ground truth for SoM and TBC. However, Phase 1
cross-references by Entry ID across all three expansions (SoM, TBC, Wrath),
and Wrath has no vendoritems.json — its NpcFlags come from DBC data which
may be incorrect. Phase 1 unions all flags and propagates them back,
overwriting Phase DB ground truth for SoM/TBC vendors.

Before fix (audit mismatches):
  SoM: -VendorAmmo: 81, -VendorReagent: 121
  TBC: -VendorAmmo: 102, -VendorReagent: 235

Fix: Track all vendors present in vendoritems.json in a HashSet regardless
of whether Phase DB changed their flags (since "no VendorAmmo" is ground
truth too). Phase 1 (ApplyFlags), Phase 2 (ApplyFlagsBySubName), and
Phase 3 (ApplyKeywordClassification) now skip these vendors — their flags
are already correct from ground truth.

Only the application step needs guarding because Phase DB already corrected
the NpcFlag values in-memory before Phase 1 runs. The contamination only
happens when Phase 1 applies unioned flags back to ground-truth vendors.

After fix (audit mismatches):
  SoM: -VendorAmmo: 0, -VendorReagent: 0
  TBC: -VendorAmmo: 0, -VendorReagent: 0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Xian55 Xian55 merged commit 6f2ccf7 into dev Feb 14, 2026
1 check passed
@Xian55 Xian55 deleted the fix/764 branch February 14, 2026 18:54
@Xian55 Xian55 added bugfix This pull request fixes an issue. enhancement This pull request implements a new feature. labels Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This pull request fixes an issue. enhancement This pull request implements a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant