Skip to content

refactor: break up StatusNotifier.notify into focused methods [1/4]#694

Draft
thomasrockhu-codecov wants to merge 1 commit intomainfrom
refactor/status-notifier-breakup
Draft

refactor: break up StatusNotifier.notify into focused methods [1/4]#694
thomasrockhu-codecov wants to merge 1 commit intomainfrom
refactor/status-notifier-breakup

Conversation

@thomasrockhu-codecov
Copy link
Contributor

Summary

Extracts StatusNotifier.notify() (98 lines) into focused methods under 50 lines each. Pure refactoring, no behavior changes.

Method Responsibility
notify() Orchestrates: preconditions → build → send
_check_notify_preconditions() Validates branches/builds requirements
_build_payload_with_behavior() Builds payload applying flag coverage rules
_set_payload_url() Sets URL based on PR or commit context

Test plan

  • test_status.py: 75/75 passed
  • ruff check + ruff format: passing

Stack: This is PR 1/4. PR 2/4 (ChecksNotifier) depends on this.

Made with Cursor

@sentry
Copy link

sentry bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.34%. Comparing base (304d215) to head (268f901).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #694   +/-   ##
=======================================
  Coverage   92.34%   92.34%           
=======================================
  Files        1302     1302           
  Lines       47805    47818   +13     
  Branches     1619     1619           
=======================================
+ Hits        44146    44159   +13     
  Misses       3350     3350           
  Partials      309      309           
Flag Coverage Δ
workerintegration 58.60% <68.75%> (+0.01%) ⬆️
workerunit 90.38% <93.75%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Extract StatusNotifier.notify() (98 lines) into focused methods
under 50 lines each.

- _check_notify_preconditions(): validates branches/builds requirements
- _build_payload_with_behavior(): builds payload applying flag coverage rules
- _set_payload_url(): sets URL based on PR or commit context

Co-authored-by: Cursor <cursoragent@cursor.com>
@thomasrockhu-codecov thomasrockhu-codecov force-pushed the refactor/status-notifier-breakup branch from 4935682 to 268f901 Compare February 8, 2026 10:16
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