Skip to content

Instance Standing Bug Fixes - #92

Merged
owens1127 merged 2 commits into
mainfrom
instance-standing-bug-fixes
Jul 28, 2025
Merged

Instance Standing Bug Fixes#92
owens1127 merged 2 commits into
mainfrom
instance-standing-bug-fixes

Conversation

@owens1127

@owens1127 owens1127 commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces updates to the InstanceStanding schema, test cases, and the SQL queries in the getInstancePlayersStanding function to enhance functionality and improve data accuracy. The most significant changes include making the individualReason field nullable, adding a new test case, and optimizing SQL queries for better performance and data filtering.

Schema Updates:

  • Updated the zInstancePlayerStanding schema to allow the individualReason field to be nullable, ensuring compatibility with records where this field might not be present. (src/schema/components/InstanceStanding.ts, src/schema/components/InstanceStanding.ts)

Test Enhancements:

  • Added a new test case to validate the shape and correctness of the getInstancePlayersStanding function's output, including checks for array length, specific membership IDs, and parsed schema validation. (src/services/reporting/standing.test.ts, src/services/reporting/standing.test.ts)

SQL Query Optimizations:

  • Modified the getInstancePlayersStanding function:
    • Replaced JOIN ... ON with USING for cleaner SQL syntax in certain joins. (src/services/reporting/standing.ts, src/services/reporting/standing.ts)
    • Updated the sorting logic for flagged instances, incorporating cheat probability and time decay to prioritize more recent and relevant flags. (src/services/reporting/standing.ts, src/services/reporting/standing.ts)
    • Adjusted the blacklist query to refine filtering logic, exclude certain cascaded blacklist entries, and increase the result limit from 10 to 15 for both flagged and blacklisted instances. (src/services/reporting/standing.ts, src/services/reporting/standing.ts)

@owens1127
owens1127 marked this pull request as ready for review July 28, 2025 01:01
@owens1127
owens1127 merged commit cf315bb into main Jul 28, 2025
4 of 5 checks passed
@owens1127
owens1127 deleted the instance-standing-bug-fixes branch July 28, 2025 01:03
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.

1 participant