feat(python/robomp): bootstrapped node_modules in bare worktrees

- Added `ensure_workspace_dependencies` to automate `bun install` for new worktrees where dependencies are missing.
- Configured the installer to use `--frozen-lockfile` and `--ignore-scripts` to preserve security and lockfile integrity.
- Integrated the bootstrap step into the worker startup process to ensure workspace packages are resolvable.
This commit is contained in:
can1357
2026-06-19 17:12:04 +02:00
parent 4bb7349779
commit 89e9ce8647
3 changed files with 162 additions and 0 deletions
+3
View File
@@ -484,6 +484,9 @@ def _run_rpc_blocking(
rpc_env.update(_prepare_slot_runtime_env(inputs.workspace, inputs.slot_uid))
rpc_env.update(_safe_directory_env(bindings.workspace.repo_dir))
rpc_env.update(_git_identity_env(inputs.settings.resolved_author_name, inputs.settings.git_author_email))
# Bare worktrees have no node_modules; install (idempotently) so the agent
# can resolve workspace packages (@oh-my-pi/pi-*) and actually run tests.
host_tools.ensure_workspace_dependencies(bindings)
resuming = _has_prior_session(bindings.workspace.session_dir)
extra_args: tuple[str, ...] = ("--continue",) if resuming else ()
log.info(