feat(browser): add download denial and disable Optimization Hints - #289
feat(browser): add download denial and disable Optimization Hints#2890thernet wants to merge 6 commits into
Conversation
|
The approved CI run was cancelled while the Nix build, clippy, unit-test, and browser-test jobs were still running. The format and npm-package jobs had passed, and the PR head remains unchanged at 2fba62c. Could a maintainer rerun the workflow when convenient? |
# Conflicts: # lib/bombadil-browser-integration-tests/tests/integration_tests.rs
|
The contributor branch is now current at exact head |
|
Merged current upstream The download policy now uses upstream's synchronous CDP driver, and the OptimizationHints flag uses its new Chromium launcher. The default allowed-download behavior, fail-closed denial, URL-free denial error, and artifact observations remain intact. The lockfile also includes the four newly vendored CDP workspace crates at the existing proposed version. Fresh validation passed:
The full CLI/Nix matrix was not run locally because Nix and Trunk are unavailable. Upstream CI remains authoritative for those checks. |
Summary
--download-behavior denypolicy while preservingallow-and-nameas the defaultWhy
Strict browser consumers need a fail-closed way to prevent page-initiated downloads. Managed Chrome can also initiate unrelated Optimization Guide model delivery even when generic background networking and component updates are disabled. Together, those behaviors can introduce unowned CRX or model files into a supposedly bounded run.
Validation
cargo fmt --all -- --check: passcargo metadata --format-version 1 --no-deps: passcargo test -p bombadil-browser: 38 passedtest_file_downloadandtest_file_download_deny: 2 passedtest_managed_chrome_avoids_background_optimization_hints_download: passed after 60.52sgit diff --check: passThe combined local browser plus CLI command reached host setup boundaries outside this patch:
trunkis not installed and local Zig 0.16.0 is newer than the Ghostty dependency requirement of 0.15.2. The browser crate and relevant real-Chrome paths above passed; repository CI remains authoritative for the Nix and CLI matrix.