Skip to content

Port sandbox web session reuse and cookie bridge to Rust - #1223

Open
PurpleCHOIms wants to merge 2 commits into
feat/sandbox-web-transportfrom
feat/sandbox-web-session-pool
Open

PurpleCHOIms wants to merge 2 commits into
feat/sandbox-web-transportfrom
feat/sandbox-web-session-pool

Conversation

@PurpleCHOIms

Copy link
Copy Markdown
Member

Why

Decepticon OSS needs the Python sandbox web session state in Rust before the Quantum Agent runtime can replace the active web engine.

What

  • Reuse one wreq client and cookie jar per host and browser profile.
  • Warm a deep URL's root once, then reuse the connection and cookies.
  • Transfer browser cookies and User-Agent into later requests. Preserve Python's default request headers and optional Referer.
  • Check URL policy and optional RoE before creating a request session. Restrict cookie domains and enforce Secure and host-only cookie prefixes.
  • Record source comparison and local checks in CHAGELOG.md and the verification note.

Scope and limits

Stacked on #1222, #1221 and #1220. The active Python sandbox and Docker image remain unchanged. The current browser envelope omits some cookie scope fields, so browser fallback must pass and preserve original path, Secure and host-only scope before this bridge is activated. The Rust fetch chain and command envelope are still separate work. No live target fingerprint or success-rate equivalence is claimed.

Local verification

  • Rust 1.100 format and git diff --check: pass.
  • Shared-slot cargo test --locked --offline --all-targets: 33 library, 5 learning, 4 session-pool and 9 transport tests passed. The session-pool tests include a real local HTTP warmup and sibling-path cookie exchange.
  • Shared-slot cargo clippy --locked --offline --all-targets -- -D warnings: pass.
  • Independent read-only review found two cookie-scope issues; both were corrected and a fresh reviewer confirmed no new regression. WSL used temporary libclang/LLVM files under /dev/shm for the BoringSSL build. GitHub Actions are unavailable due account billing; no hosted CI pass is claimed.

This branch has not been deployed

No deployments
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