From 82b22aa0a5fe887974a83405f5f9a5e8df48257c Mon Sep 17 00:00:00 2001 From: Bill Murdock Date: Fri, 8 May 2026 08:42:52 -0400 Subject: [PATCH] fix: register RepomixConfigAssessor in create_all_assessors RepomixConfigAssessor existed in assessors/repomix.py but was never imported or added to create_all_assessors(), causing the attribute validator to reject repomix_config as an unknown ID. Also fixes three unit tests in test_repomix.py that created output files in the repo root instead of the repomix/ subdirectory, which is where RepomixService.get_output_files() now looks. Closes #400 Co-Authored-By: Claude Sonnet 4.6 --- src/agentready/assessors/__init__.py | 2 ++ tests/unit/test_repomix.py | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/agentready/assessors/__init__.py b/src/agentready/assessors/__init__.py index 9919c8fb..4aaf8864 100644 --- a/src/agentready/assessors/__init__.py +++ b/src/agentready/assessors/__init__.py @@ -33,6 +33,7 @@ PatternReferencesAssessor, ProgressiveDisclosureAssessor, ) +from .repomix import RepomixConfigAssessor from .security import DependencySecurityAssessor from .structure import ( IssuePRTemplatesAssessor, @@ -104,6 +105,7 @@ def create_all_assessors() -> list[BaseAssessor]: DbtProjectStructureAssessor(), # dbt conditional # Tier 3 Important — 14% total DesignIntentAssessor(), # NEW (2%) + RepomixConfigAssessor(), # 2% CyclomaticComplexityAssessor(), # 3% ArchitectureDecisionsAssessor(), # 3% IssuePRTemplatesAssessor(), # 3% diff --git a/tests/unit/test_repomix.py b/tests/unit/test_repomix.py index f25e0b15..2f480f37 100644 --- a/tests/unit/test_repomix.py +++ b/tests/unit/test_repomix.py @@ -100,8 +100,10 @@ def test_get_output_files_empty(self, tmp_path): def test_get_output_files_found(self, tmp_path): """Test getting output files when they exist.""" - (tmp_path / "repomix-output.md").write_text("content") - (tmp_path / "repomix-output.xml").write_text("") + repomix_dir = tmp_path / "repomix" + repomix_dir.mkdir() + (repomix_dir / "repomix-output.md").write_text("content") + (repomix_dir / "repomix-output.xml").write_text("") service = RepomixService(tmp_path) files = service.get_output_files() @@ -116,7 +118,9 @@ def test_check_freshness_no_files(self, tmp_path): def test_check_freshness_fresh_file(self, tmp_path): """Test freshness check with recent file.""" - output = tmp_path / "repomix-output.md" + repomix_dir = tmp_path / "repomix" + repomix_dir.mkdir() + output = repomix_dir / "repomix-output.md" output.write_text("fresh content") service = RepomixService(tmp_path) @@ -223,7 +227,9 @@ def test_assess_fresh_output(self, tmp_path): # Create .git directory, config and output (tmp_path / ".git").mkdir() (tmp_path / "repomix.config.json").write_text("{}") - (tmp_path / "repomix-output.md").write_text("content") + repomix_dir = tmp_path / "repomix" + repomix_dir.mkdir() + (repomix_dir / "repomix-output.md").write_text("content") repo = Repository( path=tmp_path,