feat(server): wire SensorNativeSolver into solve dispatcher - #15
Merged
Conversation
ADR-0024 v1.8.0 P1. Adds a `PX_NATIVE_PROFILES` env loader that parses `domain=path/to/profile.toml` pairs and decorates the existing per-domain solve handler with a `NativeFirstHandler` (native first, fall back to Camoufox/PerimeterxHandler on error or non-solved status). px-native: - `infrastructure/handler.rs` — `NativePxHandler` wraps a `SensorNativeSolver` as a `ChallengeHandler`. Default fingerprint embedded for now; real fingerprints flow in from the SolveContext once the synthetic-user pool is wired (v1.9+). - `infrastructure/native_first.rs` — `NativeFirstHandler` decorator. - `lib.rs` re-exports `SensorNativeSolver`. - Cargo: depends on `px-pipeline`; adds `tokio` as a dev-dep. px-server: - `bootstrap/native_routes.rs` — `parse_native_routes` + overlay. - `bootstrap/dispatchers.rs` — `build_dispatchers` takes a third arg `Vec<NativeRoute>` and applies the overlay regardless of CF route presence. - `application/routing.rs` — exposes `handler_for(domain)` and `default_handler()` so overlays can wrap the existing route. - `main.rs` reads `PX_NATIVE_PROFILES` at startup. Wiring is conservative — operator must opt-in via env. Camoufox path is untouched. 129 workspace tests pass; clippy clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v1.8.0 phase 1 (ADR-0024). Wires the existing native cipher core into
/v1/solvevia an opt-inPX_NATIVE_PROFILESenv flag and aNativeFirstHandlerdecorator.Wiring
PX_NATIVE_PROFILES=pedidosya.com.ar=px-native/profiles/eT15wiaE.tomlSensorNativeSolver.ChallengeHandlerviaNativePxHandler.NativeFirstHandler(native first, fall back to whatever was already wired — Camoufox or the PX default).If the env flag is unset, behaviour is unchanged from v1.7.0.
Tests
native_first, 1 new inhandler, 3 new innative_routes).cargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used -D clippy::panic -D clippy::dbg_macro -D clippy::todo -D clippy::unimplementedclean.handler.rssplit intohandler.rs+native_first.rs).What this does NOT prove
This PR ships only the wiring. No live
_px3has been issued by the native path yet, and we have no XHR-hook ground truth to calibratedefault_batchagainst. P2 (XHR hook in Camoufox) and P3 (field grammar calibration) follow.🤖 Generated with Claude Code