@@ -219,18 +219,17 @@ def get_binary_path(target: str, version: str = "rust") -> Path:
219219
220220def copy_flatbuffer_daemon_configs (etc_dir : Path , * , include_lm_config : bool = True ) -> None :
221221 """
222- Populate `etc_dir` with per-process health-monitor flatbuffer config binaries.
222+ Populate `etc_dir` with flatbuffer daemon config binaries from build outputs .
223223
224- Only ``hmproc_*.bin`` files are copied. The cluster-level health-monitor
225- configs (``hmcore.bin``, ``hm_demo.bin``) define a ``MainCluster`` topology
226- that expects specific processes to be present in the LM config at startup.
227- Because the test fixture starts the daemon with a minimal JSON config that
228- has *empty* components (components are added dynamically by each test), those
229- files would make the HM thread fail to initialise — so they are always
230- excluded here.
224+ All ``*.bin`` files from the ``daemon_lifecycle_configs`` target are copied,
225+ with the following exceptions:
231226
232- ``lm_demo.bin`` is the static demo LM config; it is excluded when
233- ``include_lm_config=False`` (the default for all JSON-config-based tests).
227+ - ``hmproc_state_manager.bin`` is always excluded because the test fixture
228+ provides a minimal JSON config with a dynamically-managed state_manager
229+ component; copying this static process-level config would create conflicts.
230+ - ``lm_demo.bin`` is excluded when ``include_lm_config=False`` (the default
231+ for integration tests where a JSON config is passed directly as a CLI
232+ argument instead of using the static flatbuffer LM config).
234233
235234 Parameters
236235 ----------
@@ -241,10 +240,8 @@ def copy_flatbuffer_daemon_configs(etc_dir: Path, *, include_lm_config: bool = T
241240 integration tests) when a JSON config file is passed to the daemon
242241 directly as a CLI argument.
243242 """
244- # When using JSON config mode (which provides components dynamically), we must
245- # exclude only the process-level configs that reference pre-defined components.
246- # Core topology files (hmcore.bin, hm_demo.bin, lm_demo.bin) define the cluster
247- # structure and are required for daemon initialization.
243+ # Exclude only configs that conflict with dynamically-provided components
244+ # or those not needed when using JSON config mode.
248245 _EXCLUDED_IN_JSON_MODE = {"hmproc_state_manager.bin" }
249246
250247 def _should_skip (name : str ) -> bool :
@@ -658,10 +655,12 @@ def launch_manager_daemon(
658655 # Set FIT_ENABLE_SETCAP=1 to prompt for sudo password and apply setcap.
659656 if os .environ .get ("FIT_ENABLE_SETCAP" , "0" ) == "1" :
660657 try :
661- # In setuid mode, supervised processes may run as a uid different
662- # from the test user and still need to traverse Bazel output paths.
663- ensure_path_traversable_for_sandbox (Path .home ())
664- ensure_path_traversable_for_sandbox (Path .home () / ".cache" / "bazel" )
658+ # NOTE: Supervised processes may run as a uid different from the test user.
659+ # If Bazel outputs are under your home directory and it lacks o+x permissions,
660+ # those processes will fail to traverse paths. To avoid modifying your home
661+ # directory permissions automatically, ensure it is already traversable (o+x)
662+ # or configure Bazel to use an output directory outside your home.
663+ # Test workspace directories are made traversable below.
665664
666665 if os .geteuid () != 0 :
667666 subprocess .run (["sudo" , "-v" ], check = True , timeout = 30 )
0 commit comments