mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-07-09 12:41:05 +02:00
## ℹ️ Description - Link to the related issue(s): Issue #1120 - Classifies Kleinanzeigen IP-range block pages explicitly when Auth0 post-submit verification remains on the password URL. - This makes the failure actionable without changing login/captcha behavior or attempting to bypass the block. ## 📋 Changes Summary - Add `IP_RANGE_BLOCKED` to post-submit Auth0 state classification when the password-page DOM contains the Kleinanzeigen IP-range block heading. - Keep existing classification facts such as `STILL_ON_PASSWORD_PAGE`, so combined states remain visible. - Keep detection scoped to the Auth0 password page and best-effort. - Add focused unit tests for detection, gating, resilience, and coexistence with Auth0 inline errors. - No new dependencies, configuration changes, schema changes, or translation updates. ### ⚙️ Type of Change Select the type(s) of change(s) included in this pull request: - [x] 🐞 Bug fix (non-breaking change which fixes an issue) - [ ] ✨ New feature (adds new functionality without breaking existing usage) - [ ] 💥 Breaking change (changes that might break existing user setups, scripts, or configurations) ## ✅ Checklist Before requesting a review, confirm the following: - [x] I have reviewed my changes to ensure they meet the project's standards. - [x] I have tested my changes and ensured that all tests pass (`pdm run test tests/unit/test_login_flow.py tests/unit/test_translations.py`). - [x] I have formatted the code (`pdm run format`). - [x] I have verified that linting passes (`pdm run lint`). - [x] I have updated documentation where necessary. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved sign-in diagnostics to detect when login is stalled on the password step due to an IP-range restriction. * Added support for preserving existing login-state facts when the IP-block page probe fails, and for correctly combining IP-block signals with inline error states. <!-- end of auto-generated comment: release notes by coderabbit.ai -->