You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a "title-vs-combatants" heuristic that rejects uploads whose
encounter title doesn't match any enemy combatant in the fight —
the only signal we have that a user has manually renamed the
encounter in ACT (right-click → Rename Encounter), since ACT preserves
no original-title shadow, no rename flag, no audit trail of any kind
(confirmed empirically via a reflection sweep over EncounterData).
Without this gate, a user can rename a trash encounter to a boss name
and either auto-upload it (if uploads-enabled is on) or manually
right-click → "Upload to EQ2 Lexicon" — and pollute the boss
leaderboards on the site with what amounts to forged data. The
server-side enforcement (a follow-up PR in EQ2Lexicon-raids) is the
real defense; this client-side check is the friendly UX layer that
catches the casual case and tells the user why nothing uploaded.
Core
- EncounterTitle.MatchesAnEnemy(title, enemyNames) — case-insensitive,
trims whitespace, permissive in both substring directions to
handle EQ2's "Boss the Epithet" naming (ACT sometimes uses the
short name; a user might append a note like "Pawbuster - take 2"
to a legitimate name). Returns false on null/empty title or empty
enemy list, so the gate fails CLOSED.
- 14 new tests covering exact match, both substring directions,
multi-enemy fights, case-insensitivity, whitespace trim, the exact
"TESTING" rename observed in the diagnostic session, empty input
short-circuits, and null-element tolerance in the enemy list.
UI
- EncounterCapture.ProcessEncounter (auto path): runs the check after
CaptureSnapshot. Failure → MarkProcessedNoCapture + OnSkipped with
message "title '<X>' doesn't match any enemy — was this fight
renamed in ACT?".
- Plugin.OnManualUploadRequested (manual right-click path): same
check, same message phrasing scoped to "manual upload skipped".
- New EncounterCapture.EnumerateEnemyNames helper extracts the
non-ally combatant names from a snapshot — single source of truth
for both call sites.
Investigation residue
- All TEMPORARY DEBUG INSTRUMENTATION from the diagnostic-sweep
iteration is removed. The reflection-based dump on every settled
encounter, the "Dump diagnostic to event log" right-click item,
and the OnDiag event are gone.
Full suite: 248 passing (was 234, +14). ruff … wait, this is the .NET
plugin: dotnet format clean, dotnet build clean, dotnet test clean,
no vulnerable packages.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments