Class: Lemans::Agents::MiniswenInstalled

Inherits:
Miniswen show all
Defined in:
lib/lemans/agents/miniswen_installed.rb

Overview

Runs the miniswen CLI inside the sandbox instead of driving the loop harness-side: the gem is installed while the network is still open, the run writes a results file, and the harness downloads it back into the same Result the shared ATIF tail already knows how to report.

Constant Summary collapse

NAME =
"miniswen-installed"
RESULTS_PATH =
"/tmp/lemans-miniswen.result.json"
INSTALL_TIMEOUT_SEC =
300
EXEC_SLACK_SEC =

The CLI enforces max-time itself; the slack only covers process startup, so the results file exists before the outer exec expires.

60

Constants inherited from Miniswen

Lemans::Agents::Miniswen::OUTCOME_FOR_STATUS

Instance Attribute Summary

Attributes inherited from Lemans::Agent

#model, #profile

Instance Method Summary collapse

Methods inherited from Miniswen

#run

Methods inherited from Lemans::Agent

#initialize, #name, #run

Constructor Details

This class inherits a constructor from Lemans::Agent

Instance Method Details

#install(_task, environment) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/lemans/agents/miniswen_installed.rb', line 21

def install(_task, environment)
  environment.exec!(
    "command -v miniswen >/dev/null 2>&1 || gem install miniswen -v #{::Miniswen::VERSION} --no-document",
    timeout: INSTALL_TIMEOUT_SEC
  )
  environment.exec("miniswen --refresh-registry", timeout: INSTALL_TIMEOUT_SEC)
end