Class: RobotLab::To::Config
- Inherits:
-
MywayConfig::Base
- Object
- MywayConfig::Base
- RobotLab::To::Config
- Defined in:
- lib/robot_lab/to/config.rb
Overview
Configuration for a robot-to run.
Sources (lowest to highest precedence):
1. Bundled defaults (config/defaults.yml)
2. User config file (~/.config/robot_lab/to.yml)
3. Environment variables (ROBOT_LAB_TO_*)
4. Constructor keyword arguments (CLI overrides)
Instance Attribute Summary collapse
- #commit_format ⇒ Object
-
#debug ⇒ Object
writeonly
Runtime CLI overrides — applied after load.
- #decision_mode ⇒ Object
-
#decision_timeout ⇒ Object
nil = wait indefinitely.
- #decision_wait_poll ⇒ Object
-
#decisions_enabled ⇒ Object
writeonly
Runtime CLI overrides — applied after load.
-
#eval ⇒ Object
Eval strategy selection + tuning (see RobotLab::To::Evals.build).
-
#eval_floor ⇒ Object
Prose/grader settings (Phase 3).
-
#eval_judge_model ⇒ Object
Prose/grader settings (Phase 3).
- #eval_measure ⇒ Object
-
#eval_spec ⇒ Object
Prose/grader settings (Phase 3).
- #eval_target ⇒ Object
-
#local_guards ⇒ Object
writeonly
Runtime CLI overrides — applied after load.
- #max_consecutive_failures ⇒ Object
-
#max_iterations ⇒ Object
CLI-only options with no YAML default (nil means "no limit / not set").
- #max_submit_nudges ⇒ Object
- #max_tokens ⇒ Object
- #max_verify_repairs ⇒ Object
- #model ⇒ Object
-
#protect_paths ⇒ Object
Prose/grader settings (Phase 3).
-
#provider ⇒ Object
Keys defined in defaults.yml — super is safe.
-
#require_improvement ⇒ Object
writeonly
Runtime CLI overrides — applied after load.
- #run_dir ⇒ Object
- #stop_on_plateau ⇒ Object
- #stop_when ⇒ Object
-
#stream ⇒ Object
writeonly
Runtime CLI overrides — applied after load.
- #verify_command ⇒ Object
- #verify_timeout ⇒ Object
-
#write_guard ⇒ Object
Prose/grader settings (Phase 3).
Instance Method Summary collapse
- #debug? ⇒ Boolean
- #decisions_enabled? ⇒ Boolean
-
#initialize(**overrides) ⇒ Config
constructor
A new instance of Config.
- #local_guards? ⇒ Boolean
-
#require_improvement? ⇒ Boolean
CLI/Ruby-only with a hardcoded default (MywayConfig does not generate a reliable
require_improvement?predicate). - #stream? ⇒ Boolean
Constructor Details
#initialize(**overrides) ⇒ Config
Returns a new instance of Config.
35 36 37 38 39 40 41 42 43 |
# File 'lib/robot_lab/to/config.rb', line 35 def initialize(**overrides) super() @eval = @eval_measure = @eval_target = nil @require_improvement = @stop_on_plateau = nil @eval_judge_model = @eval_spec = @eval_floor = nil @protect_paths = [] @write_guard = true overrides.each { |k, v| public_send(:"#{k}=", v) if respond_to?(:"#{k}=") } end |
Instance Attribute Details
#commit_format ⇒ Object
54 |
# File 'lib/robot_lab/to/config.rb', line 54 def commit_format = @commit_format || super |
#debug=(value) ⇒ Object (writeonly)
Runtime CLI overrides — applied after load.
21 22 23 |
# File 'lib/robot_lab/to/config.rb', line 21 def debug=(value) @debug = value end |
#decision_mode ⇒ Object
60 |
# File 'lib/robot_lab/to/config.rb', line 60 def decision_mode = @decision_mode || super |
#decision_timeout ⇒ Object
nil = wait indefinitely
63 |
# File 'lib/robot_lab/to/config.rb', line 63 def decision_timeout = @decision_timeout || super |
#decision_wait_poll ⇒ Object
61 62 |
# File 'lib/robot_lab/to/config.rb', line 61 def decision_wait_poll = @decision_wait_poll || super # nil = wait indefinitely |
#decisions_enabled=(value) ⇒ Object (writeonly)
Runtime CLI overrides — applied after load.
21 22 23 |
# File 'lib/robot_lab/to/config.rb', line 21 def decisions_enabled=(value) @decisions_enabled = value end |
#eval ⇒ Object
Eval strategy selection + tuning (see RobotLab::To::Evals.build). All CLI-only / nil-default. #eval may hold a strategy name ("code"/"null"), a registered symbol, an instance responding to #score, or a proc. The judge/spec/floor readers Prose needs arrive with Phase 3.
75 |
# File 'lib/robot_lab/to/config.rb', line 75 def eval = @eval |
#eval_floor ⇒ Object
Prose/grader settings (Phase 3). attr_accessor keeps these off the reek method-count budget (Config sits at its TooManyMethods limit); they are assigned in initialize to avoid InstanceVariableAssumption. write_guard (default true) lets local_guards runs opt out of WriteGuard so a robot can freely overwrite files it is iteratively refining (e.g. prose drafts).
33 34 35 |
# File 'lib/robot_lab/to/config.rb', line 33 def eval_floor @eval_floor end |
#eval_judge_model ⇒ Object
Prose/grader settings (Phase 3). attr_accessor keeps these off the reek method-count budget (Config sits at its TooManyMethods limit); they are assigned in initialize to avoid InstanceVariableAssumption. write_guard (default true) lets local_guards runs opt out of WriteGuard so a robot can freely overwrite files it is iteratively refining (e.g. prose drafts).
33 34 35 |
# File 'lib/robot_lab/to/config.rb', line 33 def eval_judge_model @eval_judge_model end |
#eval_measure ⇒ Object
76 |
# File 'lib/robot_lab/to/config.rb', line 76 def eval_measure = @eval_measure |
#eval_spec ⇒ Object
Prose/grader settings (Phase 3). attr_accessor keeps these off the reek method-count budget (Config sits at its TooManyMethods limit); they are assigned in initialize to avoid InstanceVariableAssumption. write_guard (default true) lets local_guards runs opt out of WriteGuard so a robot can freely overwrite files it is iteratively refining (e.g. prose drafts).
33 34 35 |
# File 'lib/robot_lab/to/config.rb', line 33 def eval_spec @eval_spec end |
#eval_target ⇒ Object
77 |
# File 'lib/robot_lab/to/config.rb', line 77 def eval_target = @eval_target |
#local_guards=(value) ⇒ Object (writeonly)
Runtime CLI overrides — applied after load.
21 22 23 |
# File 'lib/robot_lab/to/config.rb', line 21 def local_guards=(value) @local_guards = value end |
#max_consecutive_failures ⇒ Object
48 |
# File 'lib/robot_lab/to/config.rb', line 48 def max_consecutive_failures = @max_consecutive_failures || super |
#max_iterations ⇒ Object
CLI-only options with no YAML default (nil means "no limit / not set")
66 |
# File 'lib/robot_lab/to/config.rb', line 66 def max_iterations = @max_iterations |
#max_submit_nudges ⇒ Object
49 |
# File 'lib/robot_lab/to/config.rb', line 49 def max_submit_nudges = @max_submit_nudges || super |
#max_tokens ⇒ Object
67 |
# File 'lib/robot_lab/to/config.rb', line 67 def max_tokens = @max_tokens |
#max_verify_repairs ⇒ Object
50 |
# File 'lib/robot_lab/to/config.rb', line 50 def max_verify_repairs = @max_verify_repairs || super |
#model ⇒ Object
47 |
# File 'lib/robot_lab/to/config.rb', line 47 def model = @model || super |
#protect_paths ⇒ Object
Prose/grader settings (Phase 3). attr_accessor keeps these off the reek method-count budget (Config sits at its TooManyMethods limit); they are assigned in initialize to avoid InstanceVariableAssumption. write_guard (default true) lets local_guards runs opt out of WriteGuard so a robot can freely overwrite files it is iteratively refining (e.g. prose drafts).
33 34 35 |
# File 'lib/robot_lab/to/config.rb', line 33 def protect_paths @protect_paths end |
#provider ⇒ Object
Keys defined in defaults.yml — super is safe
46 |
# File 'lib/robot_lab/to/config.rb', line 46 def provider = @provider || super |
#require_improvement=(value) ⇒ Object (writeonly)
Runtime CLI overrides — applied after load.
21 22 23 |
# File 'lib/robot_lab/to/config.rb', line 21 def require_improvement=(value) @require_improvement = value end |
#run_dir ⇒ Object
53 |
# File 'lib/robot_lab/to/config.rb', line 53 def run_dir = @run_dir || super |
#stop_on_plateau ⇒ Object
78 |
# File 'lib/robot_lab/to/config.rb', line 78 def stop_on_plateau = @stop_on_plateau |
#stop_when ⇒ Object
68 |
# File 'lib/robot_lab/to/config.rb', line 68 def stop_when = @stop_when |
#stream=(value) ⇒ Object (writeonly)
Runtime CLI overrides — applied after load.
21 22 23 |
# File 'lib/robot_lab/to/config.rb', line 21 def stream=(value) @stream = value end |
#verify_command ⇒ Object
69 |
# File 'lib/robot_lab/to/config.rb', line 69 def verify_command = @verify_command |
#verify_timeout ⇒ Object
51 |
# File 'lib/robot_lab/to/config.rb', line 51 def verify_timeout = @verify_timeout || super |
#write_guard ⇒ Object
Prose/grader settings (Phase 3). attr_accessor keeps these off the reek method-count budget (Config sits at its TooManyMethods limit); they are assigned in initialize to avoid InstanceVariableAssumption. write_guard (default true) lets local_guards runs opt out of WriteGuard so a robot can freely overwrite files it is iteratively refining (e.g. prose drafts).
33 34 35 |
# File 'lib/robot_lab/to/config.rb', line 33 def write_guard @write_guard end |
Instance Method Details
#debug? ⇒ Boolean
57 |
# File 'lib/robot_lab/to/config.rb', line 57 def debug? = @debug.nil? ? super : @debug |
#decisions_enabled? ⇒ Boolean
59 |
# File 'lib/robot_lab/to/config.rb', line 59 def decisions_enabled? = @decisions_enabled.nil? ? super : @decisions_enabled |
#local_guards? ⇒ Boolean
55 |
# File 'lib/robot_lab/to/config.rb', line 55 def local_guards? = @local_guards.nil? ? super : @local_guards |
#require_improvement? ⇒ Boolean
CLI/Ruby-only with a hardcoded default (MywayConfig does not generate a
reliable require_improvement? predicate). Default true per design: the
loop is strictly monotone unless --no-require-improvement is passed.
83 |
# File 'lib/robot_lab/to/config.rb', line 83 def require_improvement? = @require_improvement.nil? || @require_improvement |
#stream? ⇒ Boolean
56 |
# File 'lib/robot_lab/to/config.rb', line 56 def stream? = @stream.nil? ? super : @stream |