[modular] Remove basemgr_monitor. Most if not all product configurations
were disabling it anyways.

TESTED: built and paved
Change-Id: Id0bb9e59f5e307838342b1963e51f968441e5268
diff --git a/bin/basemgr/basemgr_impl.cc b/bin/basemgr/basemgr_impl.cc
index 2052c52..6dc2ebc 100644
--- a/bin/basemgr/basemgr_impl.cc
+++ b/bin/basemgr/basemgr_impl.cc
@@ -37,14 +37,12 @@
     const modular::BasemgrSettings& settings,
     const std::vector<SessionShellSettings>& session_shell_settings,
     fuchsia::sys::Launcher* const launcher,
-    fuchsia::modular::BasemgrMonitorPtr monitor,
     fuchsia::ui::policy::PresenterPtr presenter,
     fuchsia::devicesettings::DeviceSettingsManagerPtr device_settings_manager,
     std::function<void()> on_shutdown)
     : settings_(settings),
       session_shell_settings_(session_shell_settings),
       launcher_(launcher),
-      monitor_(std::move(monitor)),
       presenter_(std::move(presenter)),
       device_settings_manager_(std::move(device_settings_manager)),
       on_shutdown_(std::move(on_shutdown)),
@@ -60,25 +58,7 @@
                                     presentation_state_.presentation.get()),
                                 kPresentationService);
 
-  if (settings.ignore_monitor) {
-    Start();
-    return;
-  }
-
-  monitor_.set_error_handler([](zx_status_t status) {
-    FXL_LOG(ERROR) << "No basemgr monitor found.";
-    exit(1);
-  });
-
-  monitor_->GetConnectionCount([this](uint32_t count) {
-    if (count != 1) {
-      FXL_LOG(ERROR) << "Another basemgr is running."
-                     << " Please use that one, or shut it down first.";
-      exit(1);
-    }
-
-    Start();
-  });
+  Start();
 }
 
 BasemgrImpl::~BasemgrImpl() = default;
diff --git a/bin/basemgr/basemgr_impl.h b/bin/basemgr/basemgr_impl.h
index 4310ba0..64aa95b 100644
--- a/bin/basemgr/basemgr_impl.h
+++ b/bin/basemgr/basemgr_impl.h
@@ -51,7 +51,6 @@
   // |session_shell_settings| Settings relevant to session shells. Used to
   // configure session shells that are launched.
   // |launcher| Environment service for creating component instances.
-  // |monitor| Service that monitors how many basemgr instances are active.
   // |presenter| Service to initialize the presentation.
   // |device_settings_manager| Service to look-up whether device needs factory
   // reset.
@@ -60,7 +59,6 @@
       const modular::BasemgrSettings& settings,
       const std::vector<modular::SessionShellSettings>& session_shell_settings,
       fuchsia::sys::Launcher* const launcher,
-      fuchsia::modular::BasemgrMonitorPtr monitor,
       fuchsia::ui::policy::PresenterPtr presenter,
       fuchsia::devicesettings::DeviceSettingsManagerPtr device_settings_manager,
       std::function<void()> on_shutdown);
@@ -148,8 +146,6 @@
 
   // Used to launch component instances, such as the base shell.
   fuchsia::sys::Launcher* const launcher_;  // Not owned.
-  // Used to report this basemgr instance to the BasemgrMonitor.
-  fuchsia::modular::BasemgrMonitorPtr monitor_;
   // Used to initialize the presentation.
   fuchsia::ui::policy::PresenterPtr presenter_;
   // Used to look-up whether device needs a factory reset.
diff --git a/bin/basemgr/basemgr_settings.cc b/bin/basemgr/basemgr_settings.cc
index 93ebb25..9770a20 100644
--- a/bin/basemgr/basemgr_settings.cc
+++ b/bin/basemgr/basemgr_settings.cc
@@ -28,7 +28,6 @@
       "account_provider", "oauth_token_manager");
 
   disable_statistics = command_line.HasOption("disable_statistics");
-  ignore_monitor = command_line.HasOption("ignore_monitor");
   no_minfs = command_line.HasOption("no_minfs");
   test = command_line.HasOption("test");
   enable_presenter = command_line.HasOption("enable_presenter");
@@ -54,7 +53,6 @@
     session_shell.args.push_back("--test");
     test_name = FindTestName(session_shell.url, session_shell.args);
     disable_statistics = true;
-    ignore_monitor = true;
     no_minfs = true;
   }
 }
@@ -69,7 +67,6 @@
       --story_shell_args=SHELL_ARGS
       --account_provider=ACCOUNT_PROVIDER
       --disable_statistics
-      --ignore_monitor
       --no_minfs
       --test
       --enable_presenter
diff --git a/bin/basemgr/basemgr_settings.h b/bin/basemgr/basemgr_settings.h
index 2d004d0..b79249f 100644
--- a/bin/basemgr/basemgr_settings.h
+++ b/bin/basemgr/basemgr_settings.h
@@ -29,7 +29,6 @@
 
   std::string test_name;
   bool disable_statistics;
-  bool ignore_monitor;
   bool no_minfs;
   bool test;
   bool enable_presenter;
diff --git a/bin/basemgr/main.cc b/bin/basemgr/main.cc
index 161acfd..cf22c78 100644
--- a/bin/basemgr/main.cc
+++ b/bin/basemgr/main.cc
@@ -50,20 +50,18 @@
   fit::deferred_action<fit::closure> cobalt_cleanup =
       SetupCobalt(settings, std::move(loop.dispatcher()), context.get());
 
-  fuchsia::modular::BasemgrMonitorPtr monitor;
-  context->ConnectToEnvironmentService(monitor.NewRequest());
   fuchsia::ui::policy::PresenterPtr presenter;
   context->ConnectToEnvironmentService(presenter.NewRequest());
   fuchsia::devicesettings::DeviceSettingsManagerPtr device_settings_manager;
   context->ConnectToEnvironmentService(device_settings_manager.NewRequest());
 
-  modular::BasemgrImpl basemgr(
-      settings, session_shell_settings, context->launcher().get(),
-      std::move(monitor), std::move(presenter),
-      std::move(device_settings_manager), [&loop, &cobalt_cleanup] {
-        cobalt_cleanup.call();
-        loop.Quit();
-      });
+  modular::BasemgrImpl basemgr(settings, session_shell_settings,
+                               context->launcher().get(), std::move(presenter),
+                               std::move(device_settings_manager),
+                               [&loop, &cobalt_cleanup] {
+                                 cobalt_cleanup.call();
+                                 loop.Quit();
+                               });
   loop.Run();
 
   return 0;
diff --git a/bin/basemgr/meta/basemgr.cmx b/bin/basemgr/meta/basemgr.cmx
index 048fd31..445be71 100644
--- a/bin/basemgr/meta/basemgr.cmx
+++ b/bin/basemgr/meta/basemgr.cmx
@@ -9,7 +9,6 @@
         "services": [
             "fuchsia.cobalt.LoggerFactory",
             "fuchsia.devicesettings.DeviceSettingsManager",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.ui.policy.Presenter",
             "fuchsia.sys.Launcher",
             "fuchsia.tracelink.Registry"
diff --git a/bin/basemgr/meta/dev_base_shell.cmx b/bin/basemgr/meta/dev_base_shell.cmx
index d35dd89..3861977 100644
--- a/bin/basemgr/meta/dev_base_shell.cmx
+++ b/bin/basemgr/meta/dev_base_shell.cmx
@@ -8,7 +8,6 @@
         ],
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ComponentContext",
             "fuchsia.sys.Launcher",
             "fuchsia.testing.runner.TestRunner",
diff --git a/bin/basemgr_monitor/BUILD.gn b/bin/basemgr_monitor/BUILD.gn
deleted file mode 100644
index 9dff8e4..0000000
--- a/bin/basemgr_monitor/BUILD.gn
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2016 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//peridot/build/executable_package.gni")
-import("//third_party/flatbuffers/flatbuffer.gni")
-
-executable_package("basemgr_monitor") {
-  sources = [
-    "basemgr_monitor.cc",
-  ]
-
-  meta = [
-    {
-      path = rebase_path("meta/basemgr_monitor.cmx")
-      dest = "basemgr_monitor.cmx"
-    },
-  ]
-
-  deps = [
-    "//garnet/public/fidl/fuchsia.sys",
-    "//garnet/public/lib/component/cpp",
-    "//garnet/public/lib/fxl",
-    "//peridot/public/fidl/fuchsia.modular",
-    "//zircon/public/lib/async-loop-cpp",
-  ]
-}
diff --git a/bin/basemgr_monitor/basemgr_monitor.cc b/bin/basemgr_monitor/basemgr_monitor.cc
deleted file mode 100644
index 9eda6cb..0000000
--- a/bin/basemgr_monitor/basemgr_monitor.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2017 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <memory>
-
-#include <fuchsia/modular/cpp/fidl.h>
-#include <lib/async-loop/cpp/loop.h>
-#include <lib/component/cpp/startup_context.h>
-#include <lib/fidl/cpp/binding_set.h>
-#include <lib/fxl/logging.h>
-#include <lib/fxl/macros.h>
-
-namespace modular {
-
-class BasemgrMonitorApp : fuchsia::modular::BasemgrMonitor {
- public:
-  BasemgrMonitorApp()
-      : context_(component::StartupContext::CreateFromStartupInfoNotChecked()) {
-    context_->outgoing().AddPublicService<fuchsia::modular::BasemgrMonitor>(
-        [this](
-            fidl::InterfaceRequest<fuchsia::modular::BasemgrMonitor> request) {
-          bindings_.AddBinding(this, std::move(request));
-        });
-  }
-
- private:
-  // |fuchsia::modular::BasemgrMonitor|
-  void GetConnectionCount(GetConnectionCountCallback callback) override {
-    callback(bindings_.size());
-  }
-
-  std::unique_ptr<component::StartupContext> context_;
-  fidl::BindingSet<fuchsia::modular::BasemgrMonitor> bindings_;
-
-  FXL_DISALLOW_COPY_AND_ASSIGN(BasemgrMonitorApp);
-};
-
-}  // namespace modular
-
-int main(int /*argc*/, const char** /*argv*/) {
-  async::Loop loop(&kAsyncLoopConfigAttachToThread);
-  modular::BasemgrMonitorApp app;
-  loop.Run();
-  return 0;
-}
diff --git a/bin/basemgr_monitor/meta/basemgr_monitor.cmx b/bin/basemgr_monitor/meta/basemgr_monitor.cmx
deleted file mode 100644
index 1c5bfec..0000000
--- a/bin/basemgr_monitor/meta/basemgr_monitor.cmx
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-    "program": {
-        "binary": "bin/app"
-    },
-    "sandbox": {
-        "services": [
-            "fuchsia.sys.Environment"
-        ]
-    }
-}
diff --git a/bin/context_engine/meta/context_engine.cmx b/bin/context_engine/meta/context_engine.cmx
index dc2f0ff..46ad68e 100644
--- a/bin/context_engine/meta/context_engine.cmx
+++ b/bin/context_engine/meta/context_engine.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ComponentContext",
             "fuchsia.ui.policy.Presenter",
             "fuchsia.sys.Launcher",
diff --git a/bin/sessionmgr/meta/dev_session_shell.cmx b/bin/sessionmgr/meta/dev_session_shell.cmx
index 8def1f3..e5b01cb 100644
--- a/bin/sessionmgr/meta/dev_session_shell.cmx
+++ b/bin/sessionmgr/meta/dev_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
             "fuchsia.net.LegacySocketProvider",
diff --git a/bin/sessionmgr/story_runner/meta/dev_story_shell.cmx b/bin/sessionmgr/story_runner/meta/dev_story_shell.cmx
index 3245dd7..04707e9 100644
--- a/bin/sessionmgr/story_runner/meta/dev_story_shell.cmx
+++ b/bin/sessionmgr/story_runner/meta/dev_story_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.sys.Launcher",
             "fuchsia.tracelink.Registry",
             "fuchsia.ui.policy.Presenter",
diff --git a/bin/token_manager/meta/dev_token_manager.cmx b/bin/token_manager/meta/dev_token_manager.cmx
index adbd508..d93c963 100644
--- a/bin/token_manager/meta/dev_token_manager.cmx
+++ b/bin/token_manager/meta/dev_token_manager.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.net.LegacySocketProvider",
             "fuchsia.sys.Environment",
             "fuchsia.sys.Launcher",
diff --git a/packages/prod/all b/packages/prod/all
index 9fa6f72..3aab919 100644
--- a/packages/prod/all
+++ b/packages/prod/all
@@ -2,7 +2,6 @@
     "imports": [
         "peridot/packages/prod/clipboard_agent",
         "peridot/packages/prod/cloud_provider_firestore",
-        "peridot/packages/prod/basemgr_monitor",
         "peridot/packages/prod/integration_testing",
         "peridot/packages/prod/ledger",
         "peridot/packages/prod/maxwell",
diff --git a/packages/prod/basemgr_monitor b/packages/prod/basemgr_monitor
deleted file mode 100644
index 8536872..0000000
--- a/packages/prod/basemgr_monitor
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-    "packages": [
-        "//peridot/bin/basemgr_monitor"
-    ]
-}
diff --git a/packages/products/framework b/packages/products/framework
index 68afe9c..73f8fef 100644
--- a/packages/products/framework
+++ b/packages/products/framework
@@ -8,7 +8,6 @@
         "garnet/packages/prod/netconnector",
         "peridot/packages/prod/clipboard_agent",
         "peridot/packages/prod/cloud_provider_firestore",
-        "peridot/packages/prod/basemgr_monitor",
         "peridot/packages/prod/ledger",
         "peridot/packages/prod/maxwell",
         "peridot/packages/prod/modular",
diff --git a/public/fidl/fuchsia.modular/BUILD.gn b/public/fidl/fuchsia.modular/BUILD.gn
index 9979a0d..e2f1cb8 100644
--- a/public/fidl/fuchsia.modular/BUILD.gn
+++ b/public/fidl/fuchsia.modular/BUILD.gn
@@ -14,7 +14,6 @@
     "agent/agent_context.fidl",
     "agent/agent_controller/agent_controller.fidl",
     "agent/agent_provider.fidl",
-    "basemgr/basemgr_monitor.fidl",
     "basemgr/base_shell.fidl",
     "basemgr/user_provider.fidl",
     "clipboard/clipboard.fidl",
diff --git a/public/fidl/fuchsia.modular/basemgr/basemgr_monitor.fidl b/public/fidl/fuchsia.modular/basemgr/basemgr_monitor.fidl
deleted file mode 100644
index f43c68b..0000000
--- a/public/fidl/fuchsia.modular/basemgr/basemgr_monitor.fidl
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2017 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-library fuchsia.modular;
-
-// This service is provided to the boot environment by the
-// basemgr_monitor component. When basemgr starts it connects to
-// this service in its environment and asks it for the number of
-// connections it current has. If the number is not one, or the
-// connection cannot be made, basemgr exits.
-//
-// Later we can use this service to send basemgr remote control
-// commands from a terminal, such as asking it to change its user
-// shell. It could also be folded into appmgr or sysmgr. We play with
-// it a bit first.
-//
-// We use :: in the service name because it's more usual in
-// sysmgr/services.conf.
-[Discoverable]
-interface BasemgrMonitor {
-    // Returns the number of connection requests the service has
-    // received, including this one.
-    1: GetConnectionCount() -> (uint32 count);
-};
diff --git a/tests/benchmarks/story/meta/modular_benchmark_story_module.cmx b/tests/benchmarks/story/meta/modular_benchmark_story_module.cmx
index b920ef2..16f817c 100644
--- a/tests/benchmarks/story/meta/modular_benchmark_story_module.cmx
+++ b/tests/benchmarks/story/meta/modular_benchmark_story_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/benchmarks/story/meta/modular_benchmark_story_session_shell.cmx b/tests/benchmarks/story/meta/modular_benchmark_story_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/benchmarks/story/meta/modular_benchmark_story_session_shell.cmx
+++ b/tests/benchmarks/story/meta/modular_benchmark_story_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/chain/meta/chain_test_child_module.cmx b/tests/chain/meta/chain_test_child_module.cmx
index b920ef2..16f817c 100644
--- a/tests/chain/meta/chain_test_child_module.cmx
+++ b/tests/chain/meta/chain_test_child_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/chain/meta/chain_test_module.cmx b/tests/chain/meta/chain_test_module.cmx
index b920ef2..16f817c 100644
--- a/tests/chain/meta/chain_test_module.cmx
+++ b/tests/chain/meta/chain_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/chain/meta/chain_test_session_shell.cmx b/tests/chain/meta/chain_test_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/chain/meta/chain_test_session_shell.cmx
+++ b/tests/chain/meta/chain_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/clipboard/meta/clipboard_test_module.cmx b/tests/clipboard/meta/clipboard_test_module.cmx
index b920ef2..16f817c 100644
--- a/tests/clipboard/meta/clipboard_test_module.cmx
+++ b/tests/clipboard/meta/clipboard_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/component_context/meta/component_context_test_module.cmx b/tests/component_context/meta/component_context_test_module.cmx
index b920ef2..16f817c 100644
--- a/tests/component_context/meta/component_context_test_module.cmx
+++ b/tests/component_context/meta/component_context_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/component_context/meta/component_context_test_one_agent.cmx b/tests/component_context/meta/component_context_test_one_agent.cmx
index 0db7a01..edebfc3 100644
--- a/tests/component_context/meta/component_context_test_one_agent.cmx
+++ b/tests/component_context/meta/component_context_test_one_agent.cmx
@@ -6,7 +6,6 @@
         "services": [
             "fuchsia.cobalt.LoggerFactory",
             "fuchsia.modular.AgentContext",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/component_context/meta/component_context_test_two_agent.cmx b/tests/component_context/meta/component_context_test_two_agent.cmx
index 0db7a01..edebfc3 100644
--- a/tests/component_context/meta/component_context_test_two_agent.cmx
+++ b/tests/component_context/meta/component_context_test_two_agent.cmx
@@ -6,7 +6,6 @@
         "services": [
             "fuchsia.cobalt.LoggerFactory",
             "fuchsia.modular.AgentContext",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/component_context/meta/component_context_test_unstoppable_agent.cmx b/tests/component_context/meta/component_context_test_unstoppable_agent.cmx
index 0db7a01..edebfc3 100644
--- a/tests/component_context/meta/component_context_test_unstoppable_agent.cmx
+++ b/tests/component_context/meta/component_context_test_unstoppable_agent.cmx
@@ -6,7 +6,6 @@
         "services": [
             "fuchsia.cobalt.LoggerFactory",
             "fuchsia.modular.AgentContext",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/embed_shell/meta/embed_shell_test_child_module.cmx b/tests/embed_shell/meta/embed_shell_test_child_module.cmx
index b920ef2..16f817c 100644
--- a/tests/embed_shell/meta/embed_shell_test_child_module.cmx
+++ b/tests/embed_shell/meta/embed_shell_test_child_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/embed_shell/meta/embed_shell_test_parent_module.cmx b/tests/embed_shell/meta/embed_shell_test_parent_module.cmx
index b920ef2..16f817c 100644
--- a/tests/embed_shell/meta/embed_shell_test_parent_module.cmx
+++ b/tests/embed_shell/meta/embed_shell_test_parent_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/embed_shell/meta/embed_shell_test_story_shell.cmx b/tests/embed_shell/meta/embed_shell_test_story_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/embed_shell/meta/embed_shell_test_story_shell.cmx
+++ b/tests/embed_shell/meta/embed_shell_test_story_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/last_focus_time/meta/last_focus_time_test_session_shell.cmx b/tests/last_focus_time/meta/last_focus_time_test_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/last_focus_time/meta/last_focus_time_test_session_shell.cmx
+++ b/tests/last_focus_time/meta/last_focus_time_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/link_context_entities/meta/link_context_entities_test_module.cmx b/tests/link_context_entities/meta/link_context_entities_test_module.cmx
index b920ef2..16f817c 100644
--- a/tests/link_context_entities/meta/link_context_entities_test_module.cmx
+++ b/tests/link_context_entities/meta/link_context_entities_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/link_context_entities/meta/link_context_entities_test_session_shell.cmx b/tests/link_context_entities/meta/link_context_entities_test_session_shell.cmx
index 6e05556..cbc127c 100644
--- a/tests/link_context_entities/meta/link_context_entities_test_session_shell.cmx
+++ b/tests/link_context_entities/meta/link_context_entities_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.IntelligenceServices",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
diff --git a/tests/link_data/meta/link_data_test_module0.cmx b/tests/link_data/meta/link_data_test_module0.cmx
index f303ccd..b34ea48 100644
--- a/tests/link_data/meta/link_data_test_module0.cmx
+++ b/tests/link_data/meta/link_data_test_module0.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/link_passing/meta/link_passing_test_module1.cmx b/tests/link_passing/meta/link_passing_test_module1.cmx
index b920ef2..16f817c 100644
--- a/tests/link_passing/meta/link_passing_test_module1.cmx
+++ b/tests/link_passing/meta/link_passing_test_module1.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/link_passing/meta/link_passing_test_module2.cmx b/tests/link_passing/meta/link_passing_test_module2.cmx
index b920ef2..16f817c 100644
--- a/tests/link_passing/meta/link_passing_test_module2.cmx
+++ b/tests/link_passing/meta/link_passing_test_module2.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/link_passing/meta/link_passing_test_module3.cmx b/tests/link_passing/meta/link_passing_test_module3.cmx
index b920ef2..16f817c 100644
--- a/tests/link_passing/meta/link_passing_test_module3.cmx
+++ b/tests/link_passing/meta/link_passing_test_module3.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/module_context/meta/module_context_test_entity_module.cmx b/tests/module_context/meta/module_context_test_entity_module.cmx
index b920ef2..16f817c 100644
--- a/tests/module_context/meta/module_context_test_entity_module.cmx
+++ b/tests/module_context/meta/module_context_test_entity_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/module_context/meta/module_context_test_module.cmx b/tests/module_context/meta/module_context_test_module.cmx
index b920ef2..16f817c 100644
--- a/tests/module_context/meta/module_context_test_module.cmx
+++ b/tests/module_context/meta/module_context_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/module_context/meta/module_context_test_session_shell.cmx b/tests/module_context/meta/module_context_test_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/module_context/meta/module_context_test_session_shell.cmx
+++ b/tests/module_context/meta/module_context_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/parent_child/meta/parent_child_test_child_module1.cmx b/tests/parent_child/meta/parent_child_test_child_module1.cmx
index b920ef2..16f817c 100644
--- a/tests/parent_child/meta/parent_child_test_child_module1.cmx
+++ b/tests/parent_child/meta/parent_child_test_child_module1.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/parent_child/meta/parent_child_test_child_module2.cmx b/tests/parent_child/meta/parent_child_test_child_module2.cmx
index b920ef2..16f817c 100644
--- a/tests/parent_child/meta/parent_child_test_child_module2.cmx
+++ b/tests/parent_child/meta/parent_child_test_child_module2.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/parent_child/meta/parent_child_test_parent_module.cmx b/tests/parent_child/meta/parent_child_test_parent_module.cmx
index b920ef2..16f817c 100644
--- a/tests/parent_child/meta/parent_child_test_parent_module.cmx
+++ b/tests/parent_child/meta/parent_child_test_parent_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/queue_persistence/meta/queue_persistence_test_agent.cmx b/tests/queue_persistence/meta/queue_persistence_test_agent.cmx
index 0db7a01..edebfc3 100644
--- a/tests/queue_persistence/meta/queue_persistence_test_agent.cmx
+++ b/tests/queue_persistence/meta/queue_persistence_test_agent.cmx
@@ -6,7 +6,6 @@
         "services": [
             "fuchsia.cobalt.LoggerFactory",
             "fuchsia.modular.AgentContext",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/queue_persistence/meta/queue_persistence_test_module.cmx b/tests/queue_persistence/meta/queue_persistence_test_module.cmx
index b920ef2..16f817c 100644
--- a/tests/queue_persistence/meta/queue_persistence_test_module.cmx
+++ b/tests/queue_persistence/meta/queue_persistence_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/session_shell/meta/session_shell_test_session_shell.cmx b/tests/session_shell/meta/session_shell_test_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/session_shell/meta/session_shell_test_session_shell.cmx
+++ b/tests/session_shell/meta/session_shell_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/story_shell/meta/story_shell_test_session_shell.cmx b/tests/story_shell/meta/story_shell_test_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/story_shell/meta/story_shell_test_session_shell.cmx
+++ b/tests/story_shell/meta/story_shell_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/story_shell/meta/story_shell_test_story_shell.cmx b/tests/story_shell/meta/story_shell_test_story_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/story_shell/meta/story_shell_test_story_shell.cmx
+++ b/tests/story_shell/meta/story_shell_test_story_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/suggestion/meta/suggestion_test_module.cmx b/tests/suggestion/meta/suggestion_test_module.cmx
index 6e05556..cbc127c 100644
--- a/tests/suggestion/meta/suggestion_test_module.cmx
+++ b/tests/suggestion/meta/suggestion_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.IntelligenceServices",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
diff --git a/tests/suggestion/meta/suggestion_test_session_shell.cmx b/tests/suggestion/meta/suggestion_test_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/suggestion/meta/suggestion_test_session_shell.cmx
+++ b/tests/suggestion/meta/suggestion_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/trigger/meta/trigger_test_agent.cmx b/tests/trigger/meta/trigger_test_agent.cmx
index 0db7a01..edebfc3 100644
--- a/tests/trigger/meta/trigger_test_agent.cmx
+++ b/tests/trigger/meta/trigger_test_agent.cmx
@@ -6,7 +6,6 @@
         "services": [
             "fuchsia.cobalt.LoggerFactory",
             "fuchsia.modular.AgentContext",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/trigger/meta/trigger_test_module.cmx b/tests/trigger/meta/trigger_test_module.cmx
index b920ef2..16f817c 100644
--- a/tests/trigger/meta/trigger_test_module.cmx
+++ b/tests/trigger/meta/trigger_test_module.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",
diff --git a/tests/trigger/meta/trigger_test_session_shell.cmx b/tests/trigger/meta/trigger_test_session_shell.cmx
index b920ef2..16f817c 100644
--- a/tests/trigger/meta/trigger_test_session_shell.cmx
+++ b/tests/trigger/meta/trigger_test_session_shell.cmx
@@ -5,7 +5,6 @@
     "sandbox": {
         "services": [
             "fuchsia.cobalt.LoggerFactory",
-            "fuchsia.modular.BasemgrMonitor",
             "fuchsia.modular.ModuleContext",
             "fuchsia.modular.PuppetMaster",
             "fuchsia.modular.SessionShellContext",