fix: Resolve merge conflicts in router quality improvements

Resolved conflicts between router quality improvements and multi-source
synthesis architecture:

1. **unified_skill_builder.py**:
   - Updated _generate_architecture_overview() signature to accept github_data
   - Ensures GitHub metadata is available for enhanced router generation

2. **test_c3_integration.py**:
   - Updated test data structure to multi-source list format
   - Tests now properly mock github data for architecture generation
   - All 8 C3 integration tests passing

**Test Results**:
-  All 8 C3 integration tests pass
-  All 26 unified tests pass
-  All 116 GitHub-related tests pass
-  All 62 multi-source architecture tests pass

The changes maintain backward compatibility while enabling router skills
to leverage GitHub insights (issues, labels, metadata) for better quality.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-01-12 00:41:26 +03:00
parent 9d26ca5d0a
commit 52cf99136a
2 changed files with 28 additions and 19 deletions

View File

@@ -189,14 +189,18 @@ class TestC3Integration:
def test_architecture_md_generation(self, mock_config, mock_c3_data, temp_dir):
"""Test ARCHITECTURE.md is generated with all 8 sections."""
# Create skill builder with C3.x data
# Create skill builder with C3.x data (multi-source list format)
github_data = {
'readme': 'Test README',
'c3_analysis': mock_c3_data
}
scraped_data = {
'github': {
'data': {
'readme': 'Test README',
'c3_analysis': mock_c3_data
}
}
'github': [{
'repo': 'test/repo',
'repo_id': 'test_repo',
'idx': 0,
'data': github_data
}]
}
builder = UnifiedSkillBuilder(mock_config, scraped_data)
@@ -205,7 +209,7 @@ class TestC3Integration:
# Generate C3.x references
c3_dir = os.path.join(temp_dir, 'references', 'codebase_analysis')
os.makedirs(c3_dir, exist_ok=True)
builder._generate_architecture_overview(c3_dir, mock_c3_data)
builder._generate_architecture_overview(c3_dir, mock_c3_data, github_data)
# Verify ARCHITECTURE.md exists
arch_file = os.path.join(c3_dir, 'ARCHITECTURE.md')
@@ -234,13 +238,18 @@ class TestC3Integration:
def test_c3_reference_directory_structure(self, mock_config, mock_c3_data, temp_dir):
"""Test correct C3.x reference directory structure is created."""
# Create skill builder with C3.x data (multi-source list format)
github_data = {
'readme': 'Test README',
'c3_analysis': mock_c3_data
}
scraped_data = {
'github': {
'data': {
'readme': 'Test README',
'c3_analysis': mock_c3_data
}
}
'github': [{
'repo': 'test/repo',
'repo_id': 'test_repo',
'idx': 0,
'data': github_data
}]
}
builder = UnifiedSkillBuilder(mock_config, scraped_data)
@@ -250,7 +259,7 @@ class TestC3Integration:
c3_dir = os.path.join(temp_dir, 'references', 'codebase_analysis')
os.makedirs(c3_dir, exist_ok=True)
builder._generate_architecture_overview(c3_dir, mock_c3_data)
builder._generate_architecture_overview(c3_dir, mock_c3_data, github_data)
builder._generate_pattern_references(c3_dir, mock_c3_data.get('patterns'))
builder._generate_example_references(c3_dir, mock_c3_data.get('test_examples'))
builder._generate_guide_references(c3_dir, mock_c3_data.get('how_to_guides'))
@@ -288,8 +297,8 @@ class TestC3Integration:
with open(config_path, 'w') as f:
json.dump(mock_config, f)
# Mock GitHubScraper
with patch('skill_seekers.cli.unified_scraper.GitHubScraper') as mock_github:
# Mock GitHubScraper (correct module path for import)
with patch('skill_seekers.cli.github_scraper.GitHubScraper') as mock_github:
mock_github.return_value.scrape.return_value = {
'readme': 'Test README',
'issues': [],