Skip to content

Gate Web Terminal on host developer mode - #195

Merged
andersalm merged 6 commits into
developfrom
fix/169-web-terminal-mode
Oct 2, 2026
Merged

andersalm merged 6 commits into
developfrom
fix/169-web-terminal-mode

Conversation

@andersalm

@andersalm andersalm commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Web Terminal starts a host process only when the operator enables elastos config set developer_mode true and guest registration is closed. Runtime persists the setting; the default is off. Refused routes return 403 before body reads, and Home CLI gives a path back to Desktop.

Runtime rechecks policy after body parsing and at process creation. Revocation cancels pending input, kills the process group and releases the session. PTY masters use nonblocking, cancellable I/O; their descriptors retain close-on-exec. The output reader waits through backpressure and drains final output.

Two Linux CI runs exposed a blocked PTY write. An isolated, unprivileged Linux kernel probe reproduced a full master write remaining blocked after the slave owner exited. The async correction covers that case while retaining an idle master reader; a separate regression covers panic cleanup and output readiness.

Validation: eight terminal tests and four CLI setting tests pass locally. Server Clippy, Home CLI source smokes, formatting, entropy and five CI-policy tests pass. Both independent source review rounds passed; the focused corrections received direct source review. Current develop was integrated with a normal merge. CI 36947103433 passes all eight required jobs, including Linux workspace and all three source-home platforms. The PR is ready and irzhywau is requested.

Installed human UX proof remains open; this PR records source and fixture evidence. Part of #173. Closes #169.

Current integration candidate: 6e18a7622421bb66cdc7bcfff33a671989a38ab7, tree c6804426439b87a90c8c1c5475bda9d795a9b4ef. A normal merge resolves #167/#169 conflicts and includes current develop. Terminal policy remains outside front-door admission so preflight is gated; both strict configuration checks and refused-case fixtures remain. The resolved #169/#167 tree de541cdc7afa651c5719a74b1ea7b264b9d39ecd passes 8 terminal, 6 configuration, 5 front-door and 5 private hint-reader cases, plus Home CLI recovery and Browser entropy. Basic formatting/entropy gates also pass after the subsequent accepted model-baseline merge; fresh CI validates the full current candidate. The real-browser legacy-key case remains a CI fixture.

Fresh CI must pass on this integration candidate. The operator's previous adversarial PASS covered 6d7b499f; this changed candidate requires a new operator-posted adversarial PASS from a different model family before merge under Anders's 2 October rule. Irzhy reviews the merged security PR afterwards.

@andersalm

Copy link
Copy Markdown
Contributor Author

Independent adversarial review (Claude Opus, run by the operator for Anders, 2 October; different model family from the author).
VERDICT: PASS. The developer-mode check runs in the outer middleware, again after the body is read and right before spawn; errors refuse; tests cover guest, owner and the slow-body race.
Non-blocking: no role check, so a guest who registered while registration was open can start a host shell once developer mode is on (outside #169's Done means; belongs to the role rules in #176/#177). In managed child runtimes developer mode and registration are read from different data dirs (fails closed).

@andersalm

Copy link
Copy Markdown
Contributor Author

Independent adversarial review (Claude Opus, run by the operator for Anders, 2 October), head 6e18a76.
VERDICT: PENDING. The merge with develop changed security code (Terminal policy placement relative to the new front-door middleware, preflight handling, authority on permitted requests). The earlier PASS covered head 6d7b499 only. Do not merge until a new verdict for this head is posted here (within the hour).

@andersalm

Copy link
Copy Markdown
Contributor Author

Independent adversarial review (Claude, run by the operator for Anders, 2 October), head 6e18a76 (re-review of the merge with develop).
VERDICT: PASS. The terminal policy is the outermost layer, before front-door admission, so it covers all 7 terminal routes, OPTIONS preflight, the WebSocket upgrade and SSE; front-door admission still wraps every terminal route; the policy is still checked after body reads and right before spawn; no refused-case test was removed, and the preflight test got stronger.
Non-blocking: refusal tests check only the 403 status, not which layer refused.

@andersalm
andersalm merged commit 17132f0 into develop Oct 2, 2026
9 checks passed
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