Class: Tasker::Types::DependencyGraphConfig

Inherits:
BaseConfig
  • Object
show all
Defined in:
lib/tasker/types/dependency_graph_config.rb

Overview

Configuration type for dependency graph calculation settings

This configuration exposes previously hardcoded calculation constants used in dependency graph analysis and bottleneck detection.

Examples:

Basic usage

config = DependencyGraphConfig.new(
  impact_multipliers: { downstream_weight: 5, blocked_weight: 15 }
)

With all options

config = DependencyGraphConfig.new(
  impact_multipliers: {
    downstream_weight: 5,
    blocked_weight: 15,
    path_length_weight: 10,
    completed_penalty: 15,
    blocked_penalty: 25,
    error_penalty: 30,
    retry_penalty: 10
  },
  severity_multipliers: {
    error_state: 2.0,
    exhausted_retry_bonus: 0.5,
    dependency_issue: 1.2
  },
  penalty_constants: {
    retry_instability: 3,
    non_retryable: 10,
    exhausted_retry: 20
  },
  severity_thresholds: {
    critical: 100,
    high: 50,
    medium: 20
  },
  duration_estimates: {
    base_step_seconds: 30,
    error_penalty_seconds: 60,
    retry_penalty_seconds: 30
  }
)

Instance Attribute Summary collapse

Method Summary

Methods inherited from BaseConfig

#initialize

Constructor Details

This class inherits a constructor from Tasker::Types::BaseConfig

Instance Attribute Details

#duration_estimatesHash<Symbol, Integer> (readonly)

Returns Duration estimation constants in seconds.

Returns:

  • (Hash<Symbol, Integer>)

    Duration estimation constants in seconds



137
138
139
140
141
142
143
144
145
146
# File 'lib/tasker/types/dependency_graph_config.rb', line 137

attribute :duration_estimates, Types::Hash.schema(
        base_step_seconds: Types::Integer.default(30),
        error_penalty_seconds: Types::Integer.default(60),
        retry_penalty_seconds: Types::Integer.default(30)
      ).constructor { |value| value.respond_to?(:deep_symbolize_keys) ? value.deep_symbolize_keys : value }
.default({
  base_step_seconds: 30,
  error_penalty_seconds: 60,
  retry_penalty_seconds: 30
}.freeze)

#impact_multipliersHash<Symbol, Integer> (readonly)

Returns Impact calculation multipliers.

Returns:

  • (Hash<Symbol, Integer>)

    Impact calculation multipliers



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/tasker/types/dependency_graph_config.rb', line 57

attribute :impact_multipliers, Types::Hash.schema(
        downstream_weight: Types::Integer.default(5),
        blocked_weight: Types::Integer.default(15),
        path_length_weight: Types::Integer.default(10),
        completed_penalty: Types::Integer.default(15),
        blocked_penalty: Types::Integer.default(25),
        error_penalty: Types::Integer.default(30),
        retry_penalty: Types::Integer.default(10)
      ).constructor { |value| value.respond_to?(:deep_symbolize_keys) ? value.deep_symbolize_keys : value }
.default({
  downstream_weight: 5,
  blocked_weight: 15,
  path_length_weight: 10,
  completed_penalty: 15,
  blocked_penalty: 25,
  error_penalty: 30,
  retry_penalty: 10
}.freeze)

#penalty_constantsHash<Symbol, Integer> (readonly)

Returns Penalty calculation constants.

Returns:

  • (Hash<Symbol, Integer>)

    Penalty calculation constants



101
102
103
104
105
106
107
108
109
110
# File 'lib/tasker/types/dependency_graph_config.rb', line 101

attribute :penalty_constants, Types::Hash.schema(
        retry_instability: Types::Integer.default(3),
        non_retryable: Types::Integer.default(10),
        exhausted_retry: Types::Integer.default(20)
      ).constructor { |value| value.respond_to?(:deep_symbolize_keys) ? value.deep_symbolize_keys : value }
.default({
  retry_instability: 3,
  non_retryable: 10,
  exhausted_retry: 20
}.freeze)

#severity_multipliersHash<Symbol, Float> (readonly)

Returns State severity multipliers.

Returns:

  • (Hash<Symbol, Float>)

    State severity multipliers



83
84
85
86
87
88
89
90
91
92
# File 'lib/tasker/types/dependency_graph_config.rb', line 83

attribute :severity_multipliers, Types::Hash.schema(
        error_state: Types::Float.default(2.0),
        exhausted_retry_bonus: Types::Float.default(0.5),
        dependency_issue: Types::Float.default(1.2)
      ).constructor { |value| value.respond_to?(:deep_symbolize_keys) ? value.deep_symbolize_keys : value }
.default({
  error_state: 2.0,
  exhausted_retry_bonus: 0.5,
  dependency_issue: 1.2
}.freeze)

#severity_thresholdsHash<Symbol, Integer> (readonly)

Returns Severity classification thresholds.

Returns:

  • (Hash<Symbol, Integer>)

    Severity classification thresholds



119
120
121
122
123
124
125
126
127
128
# File 'lib/tasker/types/dependency_graph_config.rb', line 119

attribute :severity_thresholds, Types::Hash.schema(
        critical: Types::Integer.default(100),
        high: Types::Integer.default(50),
        medium: Types::Integer.default(20)
      ).constructor { |value| value.respond_to?(:deep_symbolize_keys) ? value.deep_symbolize_keys : value }
.default({
  critical: 100,
  high: 50,
  medium: 20
}.freeze)