Module: Bulldogger

Defined in:
lib/bulldogger.rb,
lib/bulldogger/flt.rb,
lib/bulldogger/run.rb,
lib/bulldogger/exec.rb,
lib/bulldogger/probe.rb,
lib/bulldogger/skill.rb,
lib/bulldogger/config.rb,
lib/bulldogger/frames.rb,
lib/bulldogger/capture.rb,
lib/bulldogger/pending.rb,
lib/bulldogger/version.rb,
lib/bulldogger/evidence.rb,
lib/bulldogger/instance.rb,
lib/bulldogger/redactor.rb,
lib/bulldogger/formatter.rb,
lib/bulldogger/preflight.rb,
lib/bulldogger/code_state.rb,
lib/bulldogger/frame_source.rb,
lib/bulldogger/probe/bucket.rb,
lib/bulldogger/probe/target.rb,
lib/bulldogger/probe/writer.rb,
lib/bulldogger/flt_collector.rb,
lib/bulldogger/probe/session.rb,
lib/bulldogger/rerun_command.rb,
lib/bulldogger/exec_collector.rb,
lib/bulldogger/failure_output.rb,
lib/bulldogger/probe/registry.rb,
lib/bulldogger/execution_target.rb,
lib/bulldogger/frames_collector.rb,
lib/bulldogger/frames_collector.rb,
lib/bulldogger/probe/comparator.rb,
lib/bulldogger/application_frames.rb,
lib/bulldogger/integrations/rspec.rb,
lib/bulldogger/probe/method_stats.rb,
lib/bulldogger/probe/raise_tracker.rb,
lib/bulldogger/collector_environment.rb,
lib/bulldogger/integrations/minitest.rb,
lib/bulldogger/probe/target_resolver.rb

Overview

Ruby execution evidence for coding agents, as files: a failing test writes a structured snapshot of its own failure, so an agent can read runtime values instead of guessing them from source.

This module is a thin facade over a default Instance. Separate instances let a tool observe a suite that resets the default instance during test setup. This module does not own capture, formatting, or redaction logic.

Defined Under Namespace

Modules: ApplicationFrames, CodeState, CollectorEnvironment, Exec, ExecCollector, ExecutionTarget, FailureOutput, Flt, FltCollector, Frames, FramesCollector, FramesMethod, Minitest, Preflight, Probe, RSpec, RerunCommand, Skill Classes: Capture, Config, Evidence, Formatter, FrameSource, Instance, Pending, Redactor, Run

Constant Summary collapse

VERSION =
"0.3.1"

Class Method Summary collapse

Class Method Details

.begin_testObject



55
56
57
# File 'lib/bulldogger.rb', line 55

def begin_test
  default.begin_test
end

.configObject



28
29
30
# File 'lib/bulldogger.rb', line 28

def config
  default.config
end

.configureObject



32
33
34
35
# File 'lib/bulldogger.rb', line 32

def configure
  default.configure { |config| yield config }
  self
end

.defaultObject

Test setup can replace this default for isolation. An explicitly created Instance keeps an outer observer alive when the default is replaced.



24
25
26
# File 'lib/bulldogger.rb', line 24

def default
  @default ||= Instance.new
end

.end_testObject



59
60
61
# File 'lib/bulldogger.rb', line 59

def end_test
  default.end_test
end

.finishObject



71
72
73
# File 'lib/bulldogger.rb', line 71

def finish
  default.finish
end

.probe(*target_strings, &block) ⇒ Object

Watches target_strings (each "Klass#method" or "Klass.method") for the life of the block and writes one evidence file summarizing every call's argument/return shape. See lib/bulldogger/probe.rb. Returns the written path, or nil if the switch is off -- the block still runs either way, only the observing and writing are skipped.



81
82
83
# File 'lib/bulldogger.rb', line 81

def probe(*target_strings, &block)
  default.probe(*target_strings, &block)
end

.probe_compare(path_a, path_b) ⇒ Object



93
94
95
# File 'lib/bulldogger.rb', line 93

def probe_compare(path_a, path_b)
  default.probe_compare(path_a, path_b)
end

.probe_start(*target_strings) ⇒ Object

Explicit-session counterpart to #probe: call session.finish to stop watching and write the evidence file. Returns nil, not a session, when the switch is off -- callers must guard the same way every other disabled-switch return value here is guarded.



89
90
91
# File 'lib/bulldogger.rb', line 89

def probe_start(*target_strings)
  default.probe_start(*target_strings)
end

.record_failure(exception:, test:) ⇒ Object



63
64
65
# File 'lib/bulldogger.rb', line 63

def record_failure(exception:, test:)
  default.record_failure(exception: exception, test: test)
end

.run_dirObject



67
68
69
# File 'lib/bulldogger.rb', line 67

def run_dir
  default.run_dir
end

.running?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/bulldogger.rb', line 47

def running?
  default.running?
end

.skill_pathObject



23
24
25
# File 'lib/bulldogger/skill.rb', line 23

def self.skill_path
  Skill.path
end

.snapshot_for(exception) ⇒ Object



51
52
53
# File 'lib/bulldogger.rb', line 51

def snapshot_for(exception)
  default.snapshot_for(exception)
end

.startObject



37
38
39
40
# File 'lib/bulldogger.rb', line 37

def start
  default.start
  self
end

.stopObject



42
43
44
45
# File 'lib/bulldogger.rb', line 42

def stop
  default.stop
  self
end