revert(safety): remove Emergency Stop for desktop automation (#4600)#5073
Conversation
…ansai#4600) Fully undoes PR tinyhumansai#4600 ("feat(safety): Emergency Stop for desktop automation (tinyhumansai#4255)"): the Emergency Stop button, the AutomationHalted banner, and all supporting halt/resume machinery. Removed: - Rust `emergency_stop` domain (types/state/ops/schemas/mod) + its controllers wired in `core/all.rs` and boot init in `core/jsonrpc.rs`. - `AutomationHalted` / `AutomationResumed` domain events and the `automation_halt` web-channel bridge subscriber (web_chat/event_bus). - Emergency-stop fail-closed guards in the cron scheduler, the tinyagents approval/security middleware, and screen-intelligence input actions. - Frontend: EmergencyStopButton, AutomationHaltedBanner, emergencyApi, hydrateEmergencyState, safetySlice, socket `automation_halt` handling, App.tsx wiring, and all related i18n keys + tests. - Design/plan docs under docs/superpowers/*emergency-stop*. Conflicts resolved for the post-tinyhumansai#4600 `channels::providers::web` → `web_chat` module rename. The unrelated cron `run_agent_job` full anyhow-chain (`{e:#}`) error-formatting improvement that shipped in the same PR is preserved (a later test depends on it).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request removes desktop automation emergency-stop functionality across the React shell, Redux store, socket events, Rust event and runtime paths, translations, web-channel bridges, and related tests. ChangesEmergency stop removal
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
…uite load `learning_subscriber_fires_with_no_channel_configured` (tinyhumansai#5003) published a single DocumentCanonicalized event through the process-wide global event bus and asserted its candidates landed in the shared, bounded `candidate::global()` ring. Under the full-suite coverage run — thousands of tests in one process, which this branch's coverage filter now triggers by editing `openhuman/mod.rs` — that bus is under heavy concurrent load: the single event can be dropped to tokio broadcast lag, or its candidates evicted from the 1024-entry ring before the poll reads them. The test passed in isolation but failed deterministically in busy CI (left: 0, right: 4). Re-publish the event on every poll tick until this test's uniquely-tagged candidates land. The subscriber is idempotent per event and the assertion filters by a unique source_id, so this only ever proves the subscriber *fires* — a never-registered subscriber still yields 0 forever and fails. Pre-existing flake unrelated to the Emergency Stop removal; surfaced here because this is the first PR since tinyhumansai#5025 to widen the coverage filter to the whole `openhuman` suite.
CI note — coverage failure is a pre-existing, unrelated flake (#5076)The only red check, Rust Core Coverage (cargo-llvm-cov), fails on Why it shows up here: this PR edits I attempted two minimal in-test mitigations (re-publish-until-seen; only-cache-successful-registration) and neither cleared it in CI — a reliable fix needs the subscriber to run on an injectable/isolated bus+buffer, which is out of scope for an Emergency-Stop revert. Those attempts have been dropped; this branch is now a pure revert. Everything actually about the change is green: clippy/fmt, frontend checks, i18n, the |
Summary
Fully undoes #4600 (feat(safety): Emergency Stop for desktop automation (#4255)) — removes the Emergency Stop button, the AutomationHalted banner, and all supporting halt/resume machinery, per product decision to drop the feature.
Removed
src/openhuman/emergency_stop/domain (types/state/ops/schemas/mod), its controller registration incore/all.rs, and boot init incore/jsonrpc.rs.AutomationHalted/AutomationResumeddomain events and theautomation_haltweb-channel bridge subscriber (web_chat/event_bus.rs).EmergencyStopButton,AutomationHaltedBanner,emergencyApi,hydrateEmergencyState,safetySlice, socketautomation_halthandling,App.tsxwiring, and all related i18n keys + tests.docs/superpowers/*emergency-stop*.Notes for reviewers
channels::providers::webwas renamed toweb_chat. Three revert conflicts (jsonrpc.rs,channels/runtime/startup.rs,web_chat/event_bus.rs) were resolved keeping the current rename and dropping only the emergency-stop bits.run_agent_jobfull anyhow-chain ({e:#}) error-formatting fix shipped in the same PR is kept — a later test (cron_agent_job_short_loopback_send_error_stays_retryable) depends on it. It is unrelated to Emergency Stop.Validation
cargo check(core) ✓ ·tsctypecheck ✓i18n:check/i18n:english:check✓json_rpc_e2eintegration test compiles ✓Note: the pre-existing
cron_agent_job_short_loopback_send_error_stays_retryabletest overflows the default debug thread stack locally (unrelated to this change — the code path is byte-identical tomainand it passes withRUST_MIN_STACKraised).Summary by CodeRabbit