Skip to content

Implement escalation tie-breaker using severity ordering (#263)#273

Merged
vcarl merged 1 commit intomainfrom
auto/263-escalation-tie-breaker
Feb 6, 2026
Merged

Implement escalation tie-breaker using severity ordering (#263)#273
vcarl merged 1 commit intomainfrom
auto/263-escalation-tie-breaker

Conversation

@vcarl
Copy link
Member

@vcarl vcarl commented Feb 6, 2026

Closes #263

Summary

Successfully implemented escalation tie-breaker using severity ordering. When votes are tied in an escalation, the most severe resolution is now selected instead of defaulting to "track". This ensures that more serious moderation actions are prioritized in ambiguous situations.

Changes

  • Added getMostSevereResolution helper function to app/helpers/modResponse.ts that returns the most severe resolution from a set of options based on severity ordering (note > warn > timeout > ban > track)
  • Updated escalationResolver.ts to use the tie-breaker logic when votes are equal, instead of defaulting to "track"
  • Created comprehensive unit tests for getMostSevereResolution in app/helpers/modResponse.test.ts (5 test cases)
  • Added integration tests for tie scenarios in app/commands/escalate/voting.test.ts to verify correct behavior

All 75 tests pass, TypeScript compilation succeeds, and ESLint passes.


This PR was created autonomously by the improve.sh pipeline. Human review is required before merging.

- Add getMostSevereResolution helper to modResponse.ts
- Update escalationResolver to use tiebreaker instead of defaulting to track
- Add comprehensive unit tests for getMostSevereResolution
- Add integration tests for tie scenarios in voting.test.ts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Smoke Test Results

Metric Value
Image Size unknown
Startup Time 87s

Tested commit: 5887010

@vcarl vcarl merged commit 2befe85 into main Feb 6, 2026
5 checks passed
@vcarl vcarl deleted the auto/263-escalation-tie-breaker branch February 6, 2026 20:53
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.

Escalations currently resolve with no action in the event of a tie

1 participant