Skip to content

fix(tests): update check_login_rate_limit import across 7 test files #752

Closed

Description

@vybe

Summary

7 test files import `check_login_rate_limit` from `routers.auth`, but this function was moved or renamed. As a result, 29 test collection errors are emitted on every test run, masking real failures and inflating the error count.

Context

Discovered via full test suite run on 2026-05-10. The import fails at collection time, so all tests in the affected files are silently skipped rather than executed.

Affected files:

  • `tests/test_ip_rate_limit_fix.py`
  • `tests/unit/test_login_rate_limit_split.py`
  • `tests/unit/test_webhook_rate_limit_inprocess.py`
  • `tests/unit/test_webhook_rate_limit_toctou.py`
  • `tests/unit/test_fleet_status_resilience.py`
  • `tests/unit/test_sync_health_service.py`
  • `tests/test_github_pat_propagation_unit.py`

Acceptance Criteria

  • Run `grep -r "check_login_rate_limit" src/` to locate the current function name/path
  • Update all 7 test files to import from the correct location
  • `python -m pytest tests/ --collect-only` reports 0 collection errors for these files
  • All previously-erroring tests either pass or have an explicit skip reason

Technical Notes

The function may have been renamed or inlined during a refactor of `routers/auth.py`. Start with:
```bash
grep -r "check_login_rate_limit|login_rate_limit" src/backend/routers/auth.py
```

Activity

  1. added
    priority-p1
    type-bug
    on May 10, 2026
  2. vybe commented on May 10, 2026

    @vybe
    ContributorAuthor

    /claim

  3. github-actions commented on May 10, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/752-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #752
  4. added
    status-in-progress
    on May 10, 2026
  5. added
    status-in-dev
    and removed
    status-in-progress
    on May 10, 2026
  6. vybe commented on May 10, 2026

    @vybe
    ContributorAuthor

    Fixed in PR #756 (c5ad320 on dev). sys.modules leaks in test_ip_rate_limit and test_sync_health_service resolved; 47 cross-file test errors eliminated.

  7. reopened this on May 10, 2026
  8. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  9. added
    theme-devex
    and removed
    status-in-dev
    on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority-p1theme-devextype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions