Skip to content

refactor(tests): migrate legacy redis_client imports to autobot_shared (#2047)#2171

Open
mrveiss wants to merge 1 commit intoDev_new_guifrom
fix/issue-2047
Open

refactor(tests): migrate legacy redis_client imports to autobot_shared (#2047)#2171
mrveiss wants to merge 1 commit intoDev_new_guifrom
fix/issue-2047

Conversation

@mrveiss
Copy link
Owner

@mrveiss mrveiss commented Mar 23, 2026

Summary

  • Replaces all from utils.redis_client imports in 5 backend test files with canonical from autobot_shared.redis_client
  • Files changed: async_baseline.performance_test.py, redis_listeners.e2e_test.py, redis_prometheus_metrics_test.py, redis_thread_safety_test.py, redis_consolidation_test.py
  • Leaves string literals in redis_optimizer_test.py untouched (they are test fixture code, not actual imports)
  • Closes Tech debt: Legacy utils.redis_client imports in test files #2047

Test plan

  • Verify no remaining from utils.redis_client in backend test files
  • Pre-commit hooks pass (flake8, isort, black)

🤖 Generated with Claude Code

#2047)

Replace all `from utils.redis_client` imports in backend test files with
the canonical `from autobot_shared.redis_client` pattern. Leaves string
literals in redis_optimizer_test.py untouched as they are test fixtures.
@github-actions
Copy link

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss
Copy link
Owner Author

mrveiss commented Mar 23, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

All 5 import migrations correctly follow CLAUDE.md Rule 2 canonical pattern (from autobot_shared.redis_client import get_redis_client). Import paths verified against autobot_shared/redis_client.py exports. No logic changes beyond import paths.

Minor observations (below reporting threshold, not blocking):

  • autobot-shared/redis_client.py docstring still documents from utils.redis_client import get_redis_client as "MANDATORY USAGE PATTERN" — stale, contradicts CLAUDE.md Rule 2. Pre-existing, not introduced by this PR.
  • redis_thread_safety_test.py:280 accesses redis_client_module.datetime which doesn't exist on either the old or new module — pre-existing broken test, not introduced by this PR.
  • autobot_shared/redis_client.py imports from utils.redis_management.* (backend-specific) — pre-existing architectural coupling, not in scope.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

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