Skip to content

fix: comprehensive bug fixes across all services — round 16#256

Merged
SimplicityGuy merged 1 commit intomainfrom
fix/round-16-bug-fixes
Apr 1, 2026
Merged

fix: comprehensive bug fixes across all services — round 16#256
SimplicityGuy merged 1 commit intomainfrom
fix/round-16-bug-fixes

Conversation

@SimplicityGuy
Copy link
Copy Markdown
Owner

Summary

  • Docker service names: Fix "extractor""extractor-discogs" + "extractor-musicbrainz" in api/metrics_collector.py and utilities/system_monitor.py (fix-one-fix-all — round 14 fixed check_errors.py but missed these two files)
  • System monitor robustness: Add missing TimeoutExpired catch in get_service_logs; use env vars for PostgreSQL credentials instead of hardcoded values
  • Lock scope discipline: state_marker.py should_process(), pending_files(), and complete_download() now read shared state under the lock
  • Consumer recovery: Add active_connection = None / active_channel = None reset in tableinator and graphinator _recover_consumers error handlers (brainz* services already had this fix — fix-one-fix-all violation)
  • Rust extractor resume: start_processing() no longer resets files_processed/records_extracted counters when resuming an InProgress extraction
  • Insights coroutine safety: Use lambda factories in run_all_computations to defer coroutine creation, preventing RuntimeWarning: coroutine was never awaited on CancelledError

Test plan

  • uv run ruff check — all modified files pass
  • uv run mypy — all modified files pass
  • cargo check — Rust compilation clean
  • cargo test — 14 passed
  • uv run pytest tests/common/test_state_marker.py tests/insights/test_computations.py — 64 passed
  • uv run pytest tests/graphinator/ tests/tableinator/ — 348 passed
  • uv run pytest tests/api/ tests/brainzgraphinator/ tests/brainztableinator/ — 1576 passed
  • All pre-commit hooks pass

🤖 Generated with Claude Code

Docker service names (fix-one-fix-all):
- api/metrics_collector.py: "extractor" → "extractor-discogs" + "extractor-musicbrainz"
- utilities/system_monitor.py: same fix in services list

System monitor robustness:
- get_service_logs: catch TimeoutExpired alongside CalledProcessError
- check_postgres_status: use POSTGRES_USERNAME/DATABASE env vars instead of hardcoded values

Lock scope discipline (state_marker.py):
- should_process(): snapshot shared state under lock before branching
- pending_files(): read progress_by_file under lock
- complete_download(): capture log values inside lock before release

Consumer recovery state reset (fix-one-fix-all):
- tableinator _recover_consumers: reset active_connection/channel to None on error
- graphinator _recover_consumers: same fix (brainz* services already had it)

Rust extractor resume safety:
- process_discogs_data: guard start_processing on Pending only; InProgress resumes
  without zeroing counters
- process_musicbrainz_data: same fix

Insights coroutine safety:
- run_all_computations: use lambda factories to defer coroutine creation, preventing
  unawaited-coroutine warnings on CancelledError

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (webkit)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (chromium)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (firefox)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (webkit - iPhone 15)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

E2E Coverage (webkit - iPad Pro 11)

Totals Coverage
Statements: 41.11% ( 1080 / 2627 )
Lines: 41.11% ( 1080 / 2627 )

StandWithUkraine

@SimplicityGuy SimplicityGuy merged commit 071b958 into main Apr 1, 2026
57 checks passed
@SimplicityGuy SimplicityGuy deleted the fix/round-16-bug-fixes branch April 1, 2026 23:26
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