code_healer 0.1.17 → 0.1.18
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 +6 -0
- data/lib/code_healer/setup.rb +63 -63
- data/lib/code_healer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a88b89f7bf244566728987fa8a20b3db2d6ee1e6b0a249956c06907441eb5a13
|
4
|
+
data.tar.gz: 349d7d045fa176d54454d7d42ae354369001eddeee2764cedf9f82c62bf4a49f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50dd2dc5f4af17274e9854ea43581a794b55d88d50e2fbc2ffbde5c450dfadc9801929454d4f0f4f34d523c16bb7921f5c060c273d43448f300f8ab3d25e2ad5
|
7
|
+
data.tar.gz: b7f287a9b342cd8ad8e110c4eb480ac7c7f1dbc2b8fc753b272e32ff767eabe8d947b1c790c65cbe9eb13fdac2701aad91ff23ed2c228b53f7729cefbbe36a84
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.1.18] - 2025-08-21
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
- **Critical YAML Generation Bug**: Fixed incorrect indentation in setup script that caused YAML parsing errors.
|
14
|
+
- **Configuration File Structure**: Corrected all YAML indentation issues in generated configuration files.
|
15
|
+
|
10
16
|
## [0.1.17] - 2025-08-21
|
11
17
|
|
12
18
|
### Added
|
data/lib/code_healer/setup.rb
CHANGED
@@ -356,17 +356,17 @@ puts
|
|
356
356
|
|
357
357
|
# Create actual .env file (will be ignored by git)
|
358
358
|
env_content = <<~ENV
|
359
|
-
|
359
|
+
# CodeHealer Configuration
|
360
360
|
# OpenAI Configuration
|
361
|
-
|
361
|
+
OPENAI_API_KEY=#{openai_key}
|
362
362
|
|
363
363
|
# GitHub Configuration
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
ENV
|
364
|
+
GITHUB_TOKEN=#{github_token}
|
365
|
+
GITHUB_REPOSITORY=#{github_repo}
|
366
|
+
|
367
|
+
# Optional: Redis Configuration
|
368
|
+
REDIS_URL=redis://localhost:6379/0
|
369
|
+
ENV
|
370
370
|
|
371
371
|
create_file_with_content('.env', env_content, dry_run: options[:dry_run])
|
372
372
|
|
@@ -375,36 +375,36 @@ create_file_with_content('.env', env_content, dry_run: options[:dry_run])
|
|
375
375
|
# CodeHealer Configuration
|
376
376
|
enabled: true
|
377
377
|
|
378
|
-
|
378
|
+
# Allowed classes for healing (customize as needed)
|
379
379
|
allowed_classes:
|
380
380
|
- User
|
381
381
|
- Order
|
382
382
|
- PaymentProcessor
|
383
|
-
|
383
|
+
- OrderProcessor
|
384
384
|
|
385
|
-
|
385
|
+
# Excluded classes (never touch these)
|
386
386
|
excluded_classes:
|
387
387
|
- ApplicationController
|
388
388
|
- ApplicationRecord
|
389
389
|
- ApplicationJob
|
390
390
|
- ApplicationMailer
|
391
|
-
|
391
|
+
- ApplicationHelper
|
392
392
|
|
393
393
|
# Allowed error types for healing
|
394
394
|
allowed_error_types:
|
395
|
-
|
396
|
-
|
395
|
+
- ZeroDivisionError
|
396
|
+
- NoMethodError
|
397
397
|
- ArgumentError
|
398
|
-
|
398
|
+
- TypeError
|
399
399
|
- NameError
|
400
400
|
- ValidationError
|
401
401
|
|
402
|
-
|
402
|
+
# Evolution Strategy Configuration
|
403
403
|
evolution_strategy:
|
404
|
-
|
405
|
-
|
404
|
+
method: #{evolution_method} # Options: api, claude_code_terminal, hybrid
|
405
|
+
fallback_to_api: #{fallback_to_api} # If Claude Code fails, fall back to API
|
406
406
|
|
407
|
-
|
407
|
+
# Claude Code Terminal Configuration
|
408
408
|
claude_code:
|
409
409
|
enabled: #{evolution_method == 'claude_code_terminal' || evolution_method == 'hybrid'}
|
410
410
|
timeout: #{enable_demo_mode ? 60 : 300} # Shorter timeout for demo mode
|
@@ -423,16 +423,16 @@ create_file_with_content('.env', env_content, dry_run: options[:dry_run])
|
|
423
423
|
- "docs/business_logic.md"
|
424
424
|
- "spec/business_context_specs.rb"
|
425
425
|
|
426
|
-
|
426
|
+
# Business Context Configuration
|
427
427
|
business_context:
|
428
428
|
enabled: true
|
429
|
-
|
430
|
-
|
429
|
+
sources:
|
430
|
+
- "docs/business_rules.md"
|
431
431
|
|
432
432
|
# OpenAI API configuration
|
433
433
|
api:
|
434
434
|
provider: openai
|
435
|
-
|
435
|
+
model: gpt-4
|
436
436
|
max_tokens: 2000
|
437
437
|
temperature: 0.1
|
438
438
|
|
@@ -440,53 +440,53 @@ create_file_with_content('.env', env_content, dry_run: options[:dry_run])
|
|
440
440
|
git:
|
441
441
|
auto_commit: true
|
442
442
|
auto_push: true
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
443
|
+
branch_prefix: "#{branch_prefix}"
|
444
|
+
commit_message_template: 'Fix {{class_name}}\#\#{{method_name}}: {{error_type}}'
|
445
|
+
pr_target_branch: "#{pr_target_branch}"
|
446
|
+
|
447
|
+
# Pull Request Configuration
|
448
448
|
pull_request:
|
449
449
|
enabled: true
|
450
450
|
auto_create: true
|
451
451
|
labels:
|
452
452
|
- "auto-fix"
|
453
|
-
|
453
|
+
- "self-evolving"
|
454
454
|
- "bug-fix"
|
455
455
|
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
456
|
+
# Safety Configuration
|
457
|
+
safety:
|
458
|
+
backup_before_evolution: true
|
459
|
+
rollback_on_syntax_error: true
|
460
|
+
|
461
|
+
# Evolution Limits
|
462
|
+
max_evolutions_per_day: 10
|
463
|
+
|
464
|
+
# Notification Configuration (optional)
|
465
|
+
notifications:
|
466
|
+
enabled: false
|
467
|
+
slack_webhook: ""
|
468
|
+
email_notifications: false
|
469
|
+
|
470
|
+
# Demo Mode Configuration
|
471
|
+
demo:
|
472
|
+
enabled: #{enable_demo_mode}
|
473
|
+
skip_tests: #{demo_config[:skip_tests] || false}
|
474
|
+
skip_pr: #{demo_config[:skip_pr] || false}
|
475
|
+
|
476
|
+
# Performance Configuration
|
477
|
+
performance:
|
478
|
+
max_concurrent_healing: 3
|
479
|
+
healing_timeout: 300
|
480
|
+
retry_attempts: 3
|
481
|
+
|
482
|
+
# Code Heal Directory Configuration
|
483
|
+
code_heal_directory:
|
484
|
+
path: "#{code_heal_directory}"
|
485
|
+
auto_cleanup: #{auto_cleanup}
|
486
|
+
cleanup_after_hours: #{cleanup_after_hours}
|
487
|
+
max_workspaces: 10
|
488
|
+
clone_strategy: "branch" # Options: branch, full_repo
|
489
|
+
sticky_workspace: #{enable_demo_mode} # Reuse workspace for faster demo responses
|
490
490
|
YAML
|
491
491
|
|
492
492
|
create_file_with_content('config/code_healer.yml', config_content, dry_run: options[:dry_run])
|
data/lib/code_healer/version.rb
CHANGED