code_healer 0.1.22 โ 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +66 -0
- data/lib/code_healer/business_context_manager.rb +36 -20
- data/lib/code_healer/claude_code_evolution_handler.rb +28 -31
- data/lib/code_healer/config_manager.rb +10 -7
- data/lib/code_healer/evolution_job.rb +3 -3
- data/lib/code_healer/healing_job.rb +53 -31
- data/lib/code_healer/healing_workspace_manager.rb +413 -80
- data/lib/code_healer/presentation_logger.rb +114 -0
- data/lib/code_healer/setup.rb +3 -4
- data/lib/code_healer/version.rb +1 -1
- metadata +3 -2
@@ -0,0 +1,114 @@
|
|
1
|
+
module CodeHealer
|
2
|
+
# Presentation-focused logger for conference demos and clean operator output
|
3
|
+
class PresentationLogger
|
4
|
+
class << self
|
5
|
+
def verbose?
|
6
|
+
env_flag = ENV.fetch('CODE_HEALER_VERBOSE', 'false')
|
7
|
+
env_flag.to_s.downcase == 'true'
|
8
|
+
end
|
9
|
+
|
10
|
+
def section(title)
|
11
|
+
divider
|
12
|
+
puts "\n๐ค #{title}\n"
|
13
|
+
end
|
14
|
+
|
15
|
+
def step(message)
|
16
|
+
puts "โก๏ธ #{message}"
|
17
|
+
end
|
18
|
+
|
19
|
+
def info(message)
|
20
|
+
puts "โน๏ธ #{message}"
|
21
|
+
end
|
22
|
+
|
23
|
+
def success(message)
|
24
|
+
puts "โ
#{message}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def warn(message)
|
28
|
+
puts "โ ๏ธ #{message}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def error(message)
|
32
|
+
puts "โ #{message}"
|
33
|
+
end
|
34
|
+
|
35
|
+
def detail(message)
|
36
|
+
return unless verbose?
|
37
|
+
puts " ยท #{message}"
|
38
|
+
end
|
39
|
+
|
40
|
+
def kv(label, value)
|
41
|
+
# Truncate long values for presentation
|
42
|
+
display_value = case value
|
43
|
+
when Array
|
44
|
+
if value.length > 3
|
45
|
+
"#{value.first(2).join(', ')}... (#{value.length} total)"
|
46
|
+
else
|
47
|
+
value.join(', ')
|
48
|
+
end
|
49
|
+
when String
|
50
|
+
value.length > 100 ? "#{value[0..97]}..." : value
|
51
|
+
else
|
52
|
+
value.to_s
|
53
|
+
end
|
54
|
+
puts " โข #{label}: #{display_value}"
|
55
|
+
end
|
56
|
+
|
57
|
+
def backtrace(backtrace_array)
|
58
|
+
return unless backtrace_array&.any?
|
59
|
+
|
60
|
+
# Show only the first 3 relevant lines for presentation
|
61
|
+
relevant_lines = backtrace_array.first(3).map do |line|
|
62
|
+
# Extract just the file and line number for cleaner display
|
63
|
+
if line.match?(/^(.+\.rb):(\d+):in/)
|
64
|
+
file = File.basename($1)
|
65
|
+
line_num = $2
|
66
|
+
method = line.match(/in `(.+)'/)&.[](1) || 'unknown'
|
67
|
+
"#{file}:#{line_num} in #{method}"
|
68
|
+
else
|
69
|
+
line
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
puts " โข Backtrace: #{relevant_lines.join(' โ ')}"
|
74
|
+
detail("Full backtrace available with CODE_HEALER_VERBOSE=true") if backtrace_array.length > 3
|
75
|
+
end
|
76
|
+
|
77
|
+
def time(label, ms)
|
78
|
+
puts "โฑ๏ธ #{label}: #{ms} ms"
|
79
|
+
end
|
80
|
+
|
81
|
+
def divider
|
82
|
+
puts "\nโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n"
|
83
|
+
end
|
84
|
+
|
85
|
+
def outcome(success:, branch: nil, pr_url: nil, reason: nil, timing: nil)
|
86
|
+
if success
|
87
|
+
success_msg = "๐ Healing complete"
|
88
|
+
success_msg << " (#{timing})" if timing
|
89
|
+
success(success_msg)
|
90
|
+
puts " โข Branch: #{branch}" if branch
|
91
|
+
puts " โข PR: #{pr_url}" if pr_url
|
92
|
+
else
|
93
|
+
error_msg = "๐ฅ Healing failed"
|
94
|
+
error_msg << " (#{reason})" if reason
|
95
|
+
error(error_msg)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def claude_action(action)
|
100
|
+
puts "๐ค #{action}"
|
101
|
+
end
|
102
|
+
|
103
|
+
def workspace_action(action)
|
104
|
+
puts "๐๏ธ #{action}"
|
105
|
+
end
|
106
|
+
|
107
|
+
def git_action(action)
|
108
|
+
puts "๐ #{action}"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
|
data/lib/code_healer/setup.rb
CHANGED
@@ -428,7 +428,7 @@ enable_demo_mode = ask_for_yes_no("Enable demo mode for fast demonstrations?", d
|
|
428
428
|
demo_config = {}
|
429
429
|
if enable_demo_mode
|
430
430
|
demo_config[:skip_tests] = ask_for_yes_no("Skip test generation in demo mode?", default: true)
|
431
|
-
|
431
|
+
|
432
432
|
|
433
433
|
puts
|
434
434
|
puts "๐ Demo mode will significantly speed up healing operations!"
|
@@ -440,7 +440,7 @@ if enable_demo_mode
|
|
440
440
|
puts " - Timeout reduced to 60 seconds for quick responses"
|
441
441
|
puts " - Sticky workspace enabled for faster context loading"
|
442
442
|
puts " - Claude session persistence for better performance"
|
443
|
-
puts " - Tests
|
443
|
+
puts " - Tests skipped for immediate results (PRs still created)"
|
444
444
|
end
|
445
445
|
|
446
446
|
# Create configuration files
|
@@ -523,7 +523,7 @@ create_file_with_content('.env', env_content, dry_run: options[:dry_run])
|
|
523
523
|
- ".git/"
|
524
524
|
- "node_modules/"
|
525
525
|
- "vendor/"
|
526
|
-
command_template: "claude --print '{prompt}' --output-format text --permission-mode acceptEdits --allowedTools Edit"
|
526
|
+
command_template: "claude --print '{prompt}' --output-format text --permission-mode acceptEdits --allowedTools Edit,mcp__atlassian"
|
527
527
|
business_context_sources:
|
528
528
|
- "config/business_rules.yml"
|
529
529
|
- "docs/business_logic.md"
|
@@ -617,7 +617,6 @@ create_file_with_content('.env', env_content, dry_run: options[:dry_run])
|
|
617
617
|
demo:
|
618
618
|
enabled: #{enable_demo_mode}
|
619
619
|
skip_tests: #{demo_config[:skip_tests] || false}
|
620
|
-
skip_pr: #{demo_config[:skip_pr] || false}
|
621
620
|
|
622
621
|
# Performance Configuration
|
623
622
|
performance:
|
data/lib/code_healer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_healer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deepan Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -401,6 +401,7 @@ files:
|
|
401
401
|
- lib/code_healer/mcp_server.rb
|
402
402
|
- lib/code_healer/mcp_tools.rb
|
403
403
|
- lib/code_healer/models/healing_metric.rb
|
404
|
+
- lib/code_healer/presentation_logger.rb
|
404
405
|
- lib/code_healer/pull_request_creator.rb
|
405
406
|
- lib/code_healer/routes.rb
|
406
407
|
- lib/code_healer/services/metrics_collector.rb
|