Skip to content

feat(standings): exclusive/non-exclusive opponent filtering - #7957

Open
Rathoz wants to merge 2 commits into
standings-alias-supportfrom
standings-exclusive-opponents
Open

feat(standings): exclusive/non-exclusive opponent filtering#7957
Rathoz wants to merge 2 commits into
standings-alias-supportfrom
standings-exclusive-opponents

Conversation

@Rathoz

@Rathoz Rathoz commented Aug 14, 2026

Copy link
Copy Markdown
Member

Stacked on #7886 (standings-alias-support), retarget to main once that merges.

What

Adds |exclusive= to standings tables. When set, a match is only counted if every opponent of that match is part of the standings. The default (non-exclusive) is the previous behaviour, where a single opponent being part of the standings is enough.

An opponent is part of the standings when it is listed manually, or — when importopponents is on — when it would be imported, which is every non-literal opponent. Aliases are resolved before the check.

How it was tested

busted — new specs in standings_import_spec.lua cover non-exclusive counting a one-sided match, exclusive skipping it, alias resolution running first, imported opponents counting as part of the standings, and exclusive dropping a match against a literal opponent. Existing import specs updated for the new options argument.

🤖 Generated with Claude Code

@Rathoz
Rathoz requested review from a team as code owners August 14, 2026 13:41
Copilot AI lite review requested due to automatic review settings August 14, 2026 13:45
@mbergen

mbergen commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Is it intended that this inverses the same setting in current GTLs? (exclusive=true by default)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an exclusive option to standings import logic so match counting can be restricted to matches where all opponents belong to the standings set (vs the existing behavior where any one opponent is sufficient). This extends the standings table import/filtering behavior while keeping the prior default (non-exclusive) behavior intact, with new specs validating the option across aliasing and imported-opponent scenarios.

Changes:

  • Add |exclusive= handling to the standings table template and pass options into LPDB match import.
  • Implement exclusive/non-exclusive opponent-based match filtering in Standings/Parse/Lpdb.lua (including alias resolution before filtering).
  • Extend standings_import_spec.lua to cover exclusive vs non-exclusive counting, aliases, imported opponents, and literal opponents.

Reviewed changes

Copilot reviewed 3 out of 54 changed files in this pull request and generated 2 comments.

File Description
lua/wikis/commons/Standings/Table.lua Wires exclusive template arg into LPDB import options.
lua/wikis/commons/Standings/Parse/Lpdb.lua Adds alias application + exclusive/non-exclusive relevance filtering during match import.
lua/spec/standings_import_spec.lua Updates and adds specs to validate filtering behavior and new options.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lua/wikis/commons/Standings/Table.lua Outdated
Comment thread lua/wikis/commons/Standings/Parse/Lpdb.lua Outdated
@Rathoz

Rathoz commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

Is it intended that this inverses the same setting in current GTLs? (exclusive=true by default)

Yes

Rathoz and others added 2 commits August 14, 2026 16:36
Adds |exclusive= to standings tables. When set, a match is only counted
if every opponent of that match is part of the standings. The default
(non-exclusive) keeps the previous behaviour, where a single opponent
being part of the standings is enough.

Opponents count as part of the standings when they are listed manually,
or, when importopponents is on, when they would be imported (which is
every non-literal opponent). Aliases are resolved before the check, so
an aliased opponent counts as the opponent it maps to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Addresses review feedback: fix grammar in the exclusive option comment,
note that the inverted default vs legacy GroupTableLeague is intentional,
and correct the importOpponents field doc, which only decides standings
membership for the filter here rather than adding opponents itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Rathoz
Rathoz force-pushed the standings-exclusive-opponents branch from 44ddd4d to dd36775 Compare August 14, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants