Skip to content

feat: fail cleaner in bracket building on error - #8073

Open
Rathoz wants to merge 1 commit into
mainfrom
m2-fail-cleaner-in-bracket
Open

feat: fail cleaner in bracket building on error#8073
Rathoz wants to merge 1 commit into
mainfrom
m2-fail-cleaner-in-bracket

Conversation

@Rathoz

@Rathoz Rathoz commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

How did you test this change?

Copilot AI lite review requested due to automatic review settings September 9, 2026 11:02
@Rathoz
Rathoz requested review from a team as code owners September 9, 2026 11:02

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.

🟢 Approval recommended

The changes are localized and improve robustness by preventing known nil/empty-field failure modes without altering the normal successful processing path.

Pull request overview

This PR improves error resilience when building match-group brackets by ensuring bracket processing can continue even if individual match processing fails, and by making bracket ID rewriting tolerant of empty match-id fields from the commons bracket template.

Changes:

  • Provide a minimal fallback match object when _processMatch fails under Logic.wrapTryOrLog, preventing bracket building from crashing.
  • Make replaceBracketId return nil for empty match IDs and simplify callers to rely on that behavior (avoiding errors when fields are '').
File summaries
File Description
lua/wikis/commons/MatchGroup/Input.lua Adds safer fallback behavior during bracket reading and makes bracket-id rewriting robust to empty match-id fields.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

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.

5 participants