Skip to content

Browser says how much space it needs; no engine text in open responses - #556

Merged
andersalm merged 20 commits into
developfrom
fix/201-browser-open-reason
Nov 6, 2026
Merged

andersalm merged 20 commits into
developfrom
fix/201-browser-open-reason

Conversation

@andersalm

Copy link
Copy Markdown
Contributor

Deepen notes

  1. Expert view: a person-actionable refusal (not enough free space) must reach the page as a typed reason with its numbers, while no engine text reaches any response body and every private diagnostic is logged exactly once.
  2. Raw material: Anders on the Jetson (5 Nov): the native owner refused with "Browser needs 8.6 GB free on this computer to open; 8.5 GB are free" but the page said only "Browser Engine failed to start cleanly"; browser-vz-engine-supervisor.rs, browser-vm-control-service.mjs, the engine adapter, gateway_browser.rs, browser-status.js.
  3. Methods: a closed set of typed refusal codes with validated byte counts carried hop by hop; every Browser open failure carries a private diagnostic and public fields, and the diagnostic is logged once at the single place a failure becomes a response; Runtime-authored refusals (expired sign-in, open already in flight, profile transfer, Exit host) keep their consumer-facing shape.
  4. Independent check: five Claude review rounds: round 1 FAIL (a new free-space refusal on the Mac path), round 2 FAIL (profile-transfer sentence lost; diagnostics dropped), round 3 FAIL (two paths dropped diagnostics; the design was changed to one logging boundary), round 4 PASS on that design but FAIL on two consumer regressions (expired sign-in, in-flight Close), round 5 FAIL (Runtime faults logged at debug without cause), fixed in 50f0306 and reviewed by Main. Merged with develop after Browser on Linux is turned on with elastos setup --browser, not by install.sh #551 (Browser opt-in): conflicts resolved in 81b77ff, Claude PASS on the resolution (both sides' tests kept, each diagnostic still logged once). Full Linux check PASS on 81b77ff and on 801cd98 (develop with Repair and gate three checks that stopped early (#527) #553).

Change

  • On Linux, when the computer lacks the free space a launch needs, Browser says how much it needs and how much is free. The Mac launch path is unchanged.
  • A refusal before the VM starts leaves the first-open profile usable for the next open.
  • No engine text, path or diagnostic reaches any Browser open response body; each failure's diagnostic chain is logged once (warn for faults, debug for expected refusals).
  • Expired sign-in still reopens Browser from Home; an open already in flight keeps its window, so Close does not lose it; the profile-transfer and Exit host messages stay specific.

Separate, pre-existing: #550 (front door answers an already-expired token with a generic 403).

Part of #90. Release issue #535.

Keep Browser Engine diagnostics private in the shared open-failure constructor, with a fixed public message and provider_error code. Preserve status classification and cleanup outcomes.

Exercise a private path through a malformed engine receipt and the provider constructor. Drive refusal envelopes through real supervisor stderr and the control service HTTP response, including invalid codes and counts.

Before/after: both Rust privacy assertions fail before and pass after. The transport tests fail on response assertions at 344284e (0/7 pass) and pass here (7/7).

Validation:
- cargo fmt --all -- --check; chain-provider cargo fmt -- --check
- cargo clippy -p elastos-server --all-targets -- -D warnings
- cargo test -p elastos-server --all-targets gateway_browser -- --nocapture: 228 pass
- Browser Node tests: 1280 pass across 72 files
- ./scripts/test-source-gate.sh: pass; 2 Linux pidfd checks skipped on macOS
- ./scripts/test-behaviour.sh: 2189 pass
- node --test scripts/check-product-data.test.mjs: 105 pass
- git diff --check
Keep Runtime profile-placement refusals typed through Engine selection so Browser receives the existing transfer instructions. Retain Engine open diagnostics in private warnings with their HTTP status.

Cover the foreign-placement route response, provider text that imitates transfer guidance, and log capture in an isolated test process. Preserve the existing Mac overlay boundary and error status classification.
Restore Runtime-authored sign-in errors and plain open-job admission conflicts. Keep fixed Exit reasons and viewer-ingress guidance, log request and Runtime admission rejections at debug, and preserve remote preparation error chains. Test the route bodies with the real Browser consumers, including sign-in expiry after gateway admission.
Restore full private Runtime diagnostic chains at the single failure projection. Warn for fallback faults and keep specific Runtime refusals at debug. Preserve fixed public copy for a selected Exit node host-policy refusal.

Regression evidence: 7 passed / 2 failed before; 9 passed after. Both pre-effect and post-cleanup audit failures log their cause exactly once at WARN.

Checks: workspace and chain-provider fmt; server all-targets Clippy with -D warnings; server lib (3297 passed, 27 ignored), bin (217), integration (1); Browser Node (1284); source gate and behaviour (2199); git diff --check. All Cargo and suites ran through elastos-heavy.
@andersalm andersalm added this to the 2.0.1 milestone Nov 6, 2026
@andersalm andersalm mentioned this pull request Nov 6, 2026
5 of 6 tasks
@andersalm

Copy link
Copy Markdown
Contributor Author

Bounded source PASS: the typed space refusal, public error projection and cleanup ownership changes preserve the reviewed Browser boundaries.
26 focused Node tests passed with zero skips; candidate checks and completed owner proof are recorded in the release acceptance record.
Main owns current reviews, integration and installed qualification; production signing remains with Anders.

@andersalm
andersalm merged commit c6adf60 into develop Nov 6, 2026
31 of 32 checks passed
@andersalm

Copy link
Copy Markdown
Contributor Author

Merged for 2.0.1 at 801cd98. Codex Root bounded SOURCE PASS on 801cd98 (comment 6690804276) after five Claude rounds and a Claude PASS on the #551 merge resolution (81b77ff). Full Linux check PASS on 801cd98. CI 15/15 after one rerun of source-home-macos, which GitHub never started (no macOS arm64 runner acquired).

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