Skip to content

Conversation

@alexei-led
Copy link
Owner

Summary

  • Move startup checks out of import time - run_startup_checks() now called from main() instead of module import, improving testability and enabling library reuse
  • Consolidate region metadata - Single REGION_METADATA dict replaces duplicate region definitions, preventing maintenance drift
  • Remove redundant test docstrings - Cleaned ~120 docstrings that just restated test function names
  • Suppress AsyncMock warning - Added pytest filterwarnings for false-positive coroutine warning

Test plan

  • All 220 tests pass
  • Linting clean
  • No runtime warnings

Removes side effects from module import by moving run_startup_checks()
call to main(). Also removes duplicate logging config from server.py.
Improves testability and enables library reuse scenarios.
Creates unified REGION_METADATA dict combining region descriptions
and geographic locations. Eliminates maintenance drift from having
the same 22 regions defined in multiple places.
Removes ~120 docstrings that simply restated test function names.
Test names are descriptive enough to convey intent.
Adds filterwarnings to ignore false-positive RuntimeWarning from
AsyncMock's internal coroutine machinery during garbage collection.
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (bd0011b) to head (cc7df4f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   90.40%   90.44%   +0.03%     
==========================================
  Files           8        8              
  Lines         813      816       +3     
==========================================
+ Hits          735      738       +3     
  Misses         78       78              
Files with missing lines Coverage Δ
src/aws_mcp_server/resources.py 89.58% <100.00%> (+0.27%) ⬆️
src/aws_mcp_server/server.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexei-led alexei-led merged commit cc6e802 into main Dec 1, 2025
4 checks passed
@alexei-led alexei-led deleted the refactor/code-review-fixes branch December 1, 2025 08:55
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