feat(captcha): add automatic solver cascade (MAT-141)
Merged
MP
4mo ago+3550+3550+0123456789012345678901234567890123456789-184-184-012345678901234567890123456789
Summary
Adds the MAT-141 automatic CAPTCHA solver cascade: local OCR, AntiCaptcha, and an assisted browser window, with configurable ordering and a manual fallback.
Changes
- add a configurable OCR → AntiCaptcha → browser cascade and persist every solver attempt and outcome in
captcha_log - add a typed, bounded Tesseract broker with trusted system paths, fixed arguments, timeout/process-group cleanup, and no generic subprocess access
- keep the AntiCaptcha API key exclusively in the OS keyring and redact secrets/solutions from persisted state and debug output
- add the dedicated Tauri CAPTCHA browser window, solver controls/status in the CAPTCHA settings, and EN/FR copy
- publish and register
vortex-mod-captcha-ocr,vortex-mod-captcha-anticaptcha, andvortex-mod-captcha-browserv1.0.0 using releaseSHA256SUMS - add plugin CI ABI smoke coverage for the three solver contracts
Security notes
- Tesseract execution is restricted to trusted absolute paths and an exact official-plugin provenance grant.
- Plugin input/output, image data, subprocess output, API keys, and persisted solver metadata are bounded or redacted.
- AntiCaptcha credentials are never written to TOML or SQLite.
Verification
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace— 1,783 unit tests and 4 integration tests passed; 5 environment/format-dependent tests ignorednpm run lintnpm run typechecknpm test— 741 tests passednpm run build- full pre-commit and pre-push gates, including cargo-deny and knip
- all three plugin main/tag workflows green; downloaded release bundles pass
sha256sum --check SHA256SUMS
Plugin releases
- https://github.com/mpiton/vortex-mod-captcha-ocr/releases/tag/v1.0.0
- https://github.com/mpiton/vortex-mod-captcha-anticaptcha/releases/tag/v1.0.0
- https://github.com/mpiton/vortex-mod-captcha-browser/releases/tag/v1.0.0
Related Issues
Linear: MAT-141
Type of Change
- Bug fix (non-breaking change that fixes an issue)
- New feature (non-breaking change that adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)
- Documentation update
- CI/CD or tooling changes
Checklist
- My code follows the project's style guidelines
- I have performed a self-review of my code
-
cargo fmtandoxlintpass -
cargo clippy -- -D warningsis clean - Tests pass (
cargo test+npm test) - I have added tests that prove my fix/feature works
- I have updated
CHANGELOG.mdunder[Unreleased]
Screenshots (if applicable)
Not included: the feature is covered by component tests and the generated Tauri capability schema.
Summary by cubic
Adds the MAT-141 automatic CAPTCHA solver cascade (OCR → AntiCaptcha → assisted browser) with a manual fallback, capability‑scoped windows, and per‑solver attempt history to reduce interruptions while keeping subprocess access locked down.
-
New Features
- Configurable OCR →
vortex-mod-captcha-anticaptcha→vortex-mod-captcha-browsercascade viacaptcha_solver_order; per‑solver attempts (outcome, timing) persisted tocaptcha_logand shown in the CAPTCHA view. - Typed Tesseract host broker for
vortex-mod-captcha-ocr: trusted absolute paths, fixed args, strict caps/limits; capability only for the verified OCR plugin. - Dedicated assisted browser window with the minimal
captcha-browsercapability and per‑window command ACL; Tauri permissions split intomain-window-commandsandcaptcha-browser-commands. - AntiCaptcha API key stored only in the OS keyring with set/delete/status commands in Settings.
- CI/registry: ABI checks for required exports (including
get_balanceforvortex-mod-captcha-anticaptcha), plugins registered with releaseSHA256SUMS, and a Windows Tesseract regression that must run exactly once.
- Configurable OCR →
-
Bug Fixes
- Fixed Windows Tesseract broker fixture to exit successfully after emitting its simulated OCR solution; CI now enforces it runs once.
- Assisted CAPTCHA windows close directly from terminal command flows.
- Further tightened solver boundaries with capped IPC/WASM payloads and cleared inherited Tesseract paths.
Summary by CodeRabbit
- New Features
- Added an automatic CAPTCHA solver cascade with configurable OCR → AntiCaptcha → browser ordering.
- Added per-solver attempt tracking and display in CAPTCHA details.
- Added AntiCaptcha API key status, save/delete, and persisted configuration.
- Added a dedicated human-assisted CAPTCHA browser window flow and solver ordering UI.
- Added new official CAPTCHA solver plugins to the registry.
- Bug Fixes
- Hardened CAPTCHA solving with bounded IO/payloads and safer solver cascade cancellation while preserving full solver audit.
- Improved CAPTCHA browser window closing and tightened plugin capability/export validation.
- Documentation
- Updated unreleased changelog and updated CAPTCHA UI translations for cascade, outcomes, solver attempts, and AntiCaptcha key management.