Skip to content

Refactor Comms for Mattermost & Abstract Client Factory - #12

Merged
Alrobbertz merged 1 commit into
swxsoc:mainfrom
Alrobbertz:comms-refactor
Aug 18, 2026
Merged

Refactor Comms for Mattermost & Abstract Client Factory#12
Alrobbertz merged 1 commit into
swxsoc:mainfrom
Alrobbertz:comms-refactor

Conversation

@Alrobbertz

Copy link
Copy Markdown
Member

Integrates swxsoc/swxsoc#109

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Lambda file-sorting workflow to use the new swxsoc.comm abstraction (to support platforms like Mattermost) instead of direct Slack helpers, and adjusts the test harness/documentation accordingly.

Changes:

  • Replaced Slack-specific client initialization + notification calls with get_comms_client() and comms_client.send_notification(...).
  • Updated pytest fixtures to stub the new comms client factory during unit tests.
  • Added/adjusted environment setup for comms platform selection in tests (and made a small doc edit).

Reviewed changes

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

File Description
lambda_function/src/file_sorter/file_sorter.py Refactors notification wiring from Slack helpers to the comms client factory + send_notification.
lambda_function/tests/conftest.py Updates autouse fixture to monkeypatch get_comms_client instead of Slack helpers.
lambda_function/tests/test_file_sorter.py Sets COMMS_PLATFORM during environment setup for test runs.
AGENTS.md Minor edit in the testing guidance snippet (currently needs updating to match the new comms approach).

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

Comment thread lambda_function/src/file_sorter/file_sorter.py
Comment thread lambda_function/src/file_sorter/file_sorter.py
Comment thread AGENTS.md
@Alrobbertz Alrobbertz closed this Aug 18, 2026
@Alrobbertz Alrobbertz reopened this Aug 18, 2026
@Alrobbertz
Alrobbertz merged commit 2f3935b into swxsoc:main Aug 18, 2026
3 of 4 checks passed
@Alrobbertz
Alrobbertz deleted the comms-refactor branch August 18, 2026 16:32
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@19911d3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
lambda_function/src/file_sorter/file_sorter.py 66.66% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage        ?   79.81%           
=======================================
  Files           ?        2           
  Lines           ?      109           
  Branches        ?        0           
=======================================
  Hits            ?       87           
  Misses          ?       22           
  Partials        ?        0           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants