Skip to content

test(developer): increase test coverage with InternalsVisibleTo pattern#1

Merged
johnazariah merged 11 commits intomainfrom
workflow/increase-test-coverage-using-aura-test-generation-aae5
Jan 19, 2026
Merged

test(developer): increase test coverage with InternalsVisibleTo pattern#1
johnazariah merged 11 commits intomainfrom
workflow/increase-test-coverage-using-aura-test-generation-aae5

Conversation

@johnazariah
Copy link
Copy Markdown
Owner

Summary

Adds 39 new tests (558 → 597) using the InternalsVisibleTo pattern to test internal methods.

Changes

Infrastructure

  • Added InternalsVisibleTo to Aura.Module.Developer.csproj
  • Exposed ParseBuildErrors and BuildError as internal in BuildFixLoopTools
  • Exposed SanitizeForMermaid as internal in VisualizationTools

New Tests

  • BuildFixLoopToolsTests: Tool registration, schema validation, ParseBuildErrors for MSBuild/Rust/TypeScript formats
  • VisualizationToolsTests: Tool registration, schema validation, SanitizeForMermaid pure function tests
  • GuardianRegistryTests: Watcher setup, duplicate directory handling, disposal patterns, TestableFileSystem helper for mocking FileSystemWatcher

Notes

  • Discovered production bug: GuardianDefinition.Triggers typed as IReadOnlyList<T> cannot be deserialized by YamlDotNet (separate fix needed)

…ializer, RoslynTestGenerator, DeveloperAgentProvider

- CodeGraphIndexerTests: 4 tests for IndexAsync/ReindexAsync
- GuardianRegistryInitializerTests: 4 tests for StartAsync/StopAsync
- RoslynTestGeneratorTests: 2 tests for GenerateTestsAsync
- DeveloperAgentProviderTests: 1 test for GetAgents
- GuardianExecutorTests: 2 additional tests for overloads

Generated using Aura test generation with manual fixes for IOptions<T> mocking.
Developer module: 176 -> 189 tests
- LanguageToolFactoryTests: +10 tests covering tool registration,
  handler execution, fallback behavior, schema generation
- DeveloperAgentProviderTests: +8 tests covering agent types,
  priority ordering, metadata, capabilities
- WorkflowServiceTests: +3 tests for RejectStep, ReassignStep,
  UpdateStepDescription

Total Developer module tests: 199 -> 217
- Add InternalsVisibleTo for Aura.Module.Developer.Tests
- Change ParseBuildErrors and BuildError to internal
- Change SanitizeForMermaid to internal
- Add BuildFixLoopToolsTests: tool registration, ParseBuildErrors
- Add VisualizationToolsTests: tool registration, SanitizeForMermaid
- Add GuardianRegistryTests: watcher setup, disposal patterns
- Create TestableFileSystem helper for mocking FileSystemWatcher

Tests: 558 → 597 (+39 tests)
@johnazariah johnazariah merged commit 04b45f5 into main Jan 19, 2026
1 of 4 checks passed
@johnazariah johnazariah deleted the workflow/increase-test-coverage-using-aura-test-generation-aae5 branch January 27, 2026 04:11
johnazariah pushed a commit that referenced this pull request Feb 20, 2026
…espace resolution

StoryService (P0 #1):
- Extract GetStoryOrThrowAsync, GetStoryWithStepsOrThrowAsync, GetStepOrThrow
- Replace 12 duplicated fetch-and-throw patterns across 13 methods
- Unify exception type to InvalidOperationException

Debug logging (P0 #2):
- Demote 8 [REACT-DEBUG] LogWarning to LogDebug in ReActExecutor
- Demote 2 [STEP-DEBUG] LogWarning to LogDebug in StoryService.Execution
- Keep LogError for genuine timeout errors

Namespace resolution (P0 #3):
- Create RoslynSyntaxHelpers.GetContainingNamespace shared helper
- Remove duplicate GetNamespace from CSharpIngesterAgent and RoslynCodeIngestor
- Simplify inline namespace resolution in RoslynRefactoringService.Interface

Build: 0 warnings, 0 errors. Tests: 829 passing (449+278+102).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant