Repository navigation
fix(gateway): harden embedded terminal policy - #100081
Conversation
|
Land-ready review completed for exact head Review blockers from #99918 are fixed:
Proof:
Known proof note: one local targeted lint invocation crashed inside upstream |
|
Codex review: needs real behavior proof before merge. Reviewed July 4, 2026, 4:30 PM ET / 20:30 UTC. Summary PR surface: Source +206, Tests +641, Docs +25. Total +872 across 36 files. Reproducibility: yes. Source inspection reproduces the failure: gateway.reload.mode=hot plus gateway.terminal.enabled true-to-false reaches the restart-only hot-mode return before onConfigChange can prepare terminal revocations. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the explicit opt-in and active-agent launch policy, but make restrictive terminal revocations reach the terminal policy/session owner before any hot-mode restart-only skip, with focused regression coverage and accepted upgrade semantics. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection reproduces the failure: gateway.reload.mode=hot plus gateway.terminal.enabled true-to-false reaches the restart-only hot-mode return before onConfigChange can prepare terminal revocations. Is this the best way to solve the issue? No. The centralized terminal launch-policy owner is the right shape, but the current PR is not the best mergeable fix until restrictive terminal changes are reconciled before the hot-mode skip. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7a0188cbd20d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +206, Tests +641, Docs +25. Total +872 across 36 files. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
* fix(gateway): harden operator terminal policy * test(gateway): complete terminal context coverage * test(gateway): narrow terminal policy mock * test(gateway): satisfy CSP header lint * docs: refresh terminal docs map * test: route terminal temp helper importer
What Problem This Solves
Follow-up to #99918. The embedded operator terminal reached
mainwhile review was still in progress, leaving three correctness and safety gaps:Closes #77362.
Why This Change Was Made
gateway.terminal.enabledexplicit opt-in and drive RPC, Control UI bootstrap, document metadata, and CSP from the same effective launch policy.User Impact
Operators must set
gateway.terminal.enabled: trueto expose the browser terminal. Terminal tabs now use the active agent's sandbox and workspace. Tightening terminal or agent sandbox policy closes affected live sessions, and failed or ignored reloads cannot accidentally re-enable access.Evidence
node scripts/run-vitest.mjs src/gateway/server-request-context.test.ts— 2 files, 8 tests passed.node scripts/run-vitest.mjs src/gateway/control-ui.http.test.ts— 4 files, 236 tests passed.tbx_01kwqb0hb0jwq50dwgnqkaex47— types, core/UI/package lint, import-cycle and architecture guards passed: https://github.com/openclaw/openclaw/actions/runs/28717780050tbx_01kwqbgr2hn3w4fn58f4avxj3p— core, runtime postbuild, plugin SDK export checks, and production Control UI build passed: https://github.com/openclaw/openclaw/actions/runs/28718008674git range-diff.