Chore/test coverage hardening#427
Merged
Merged
Conversation
New test files covering: - Utils: RestUtilities, RuntimeUtilities, StringUtilities, CharacterUtilities, CollectionUtilities, MatchingUtilities, WordSplitter, FileUtilities, LifecycleUtilities - Memory: MemoryItemConverter, ContextUtilities, ConversationLogGenerator, Data model, ConversationMemorySnapshot - Output: OutputItemTypes (polymorphic serialization) - Engine: Agent, ComponentCache, Deployment, Context model - Configs: ResourceUtilities - Backup: ZipArchive (including Zip Slip protection) Coverage: 43.7% -> 45.9% line, 38.8% -> 41.3% branch All 2459 tests pass.
New test files: - ApiCallModels: RetryApiCallInstruction, Request, PostResponse, ApiCall - HttpCodeValidator: default config, construction, setters - PropertyModel: Property (6 constructors, scope, visibility, equality), PropertyInstruction (defaults, construction, equality) - AuditEntry: immutable with* methods, chaining - LogEntry: record construction, Jackson null-exclusion, round-trip - ScheduleConfiguration: defaults, all fields, enums, Jackson - InMemoryTenantQuotaStore: atomic limits, cost budget, usage reporting - RejectedExecutionExceptionMapper: HTTP 503, Retry-After header - LifecycleUtilities: component key composition Coverage: 45.9% -> 46.3% line, 41.3% -> 41.4% branch All 2545 tests pass.
…(batch 3) New test files: - OccurrenceTest: config, clone, execution with null data - ConnectorTest: AND/OR short-circuit logic, clone, empty check - SizeMatcherTest: min/max/equal matching, path nav, not-executed - DependencyTest: config, clone, null safety - CustomToolConfigurationTest: all fields, ToolParameter, ToolType enum, equality, Jackson Coverage: 46.3% -> 47.2% line, 41.4% -> 42.3% branch All 2580 tests pass.
…els tests (batch 4) New test files: - A2AModelsTest: all records, Part factories, JSON-RPC, TaskState, error codes - TenancyModelsTest: QuotaCheckResult, TenantQuota, UsageSnapshot, ExceptionMapper - ScheduleFireLogTest: completed/failed/dead-lettered, Jackson round-trip - MoreConditionsTest: Negation (inversion), ActionMatcher (config/actions), ContentTypeMatcher (mime/minCount) - ToolCostTrackerModelsTest: ToolCostMetrics, ConversationCostMetrics, RateLimitInfo Coverage: 47.2% -> 47.3% line, 42.3% branch All tests pass, BUILD SUCCESS.
…sts (batch 5) Expanded/new test files: - AgentConfigurationTest: added AgentIdentity, ChannelConnector, UserMemoryConfig, Guardrails, DreamConfig, SecurityConfig setters (146 -> 312 lines) - DictionaryConfigurationTest: Word/RegEx/Phrase equality, compareTo, Jackson - RuleGroupTest: defaults, ExecutionStrategy enum, rule list management Coverage: 47.3% -> 47.8% line, 42.3% -> 42.4% branch All tests pass, BUILD SUCCESS.
…tor tests (batch 6) New test files: - AgentCardServiceTest: getAgentCard (null/disabled/enabled/error), buildAgentCard (skills, auth, capabilities), listA2AAgents (148 lines of service logic) - ContextLoggerTest: createLoggingContext field combos, MDC operations - SimpleDocumentDescriptorTest: constructors, setters Coverage: 47.8% -> 48.1% line, 42.4% -> 42.7% branch (2709 tests) All tests pass, BUILD SUCCESS.
New test file: - LlmConfigurationModelsTest: RagDefaults, ModelCascadeConfig, CascadeStep, ToolResponseLimits, McpServerConfig, A2AAgentConfig, RetryConfiguration, KnowledgeBaseReference, ConversationSummaryConfig (incl. validate() logic) Coverage: 48.1% -> 48.3% line, 42.7% -> 42.8% branch All tests pass, BUILD SUCCESS.
New test file: - SmallModelsBatchTest: DeploymentInfo, ConversationStatus, DataFactory, HttpPreRequest, HttpCodeValidator, PropertySetterConfiguration, Deployment.Environment.fromString/toValue, Deployment.Status Coverage: 48.3% -> 48.5% line All tests pass, BUILD SUCCESS.
New test file: - RuleDeserializationTest: 11 tests covering full deserialization pipeline Empty groups, default/explicit execution strategy, rules with actions, condition types (actionmatcher, negation, connector, occurrence, dependency, contentTypeMatcher), nested conditions, invalid JSON error handling. Uses real ObjectMapper with mock CDI dependencies. Coverage: 48.5% -> 48.8% line, 42.8% -> 42.9% branch All tests pass, BUILD SUCCESS.
New test files: - RuleTest: execute() with no/pass/fail/error conditions, short-circuit, infinite loop detection, equals/hashCode, clone, toString (136 lines covered) - RulesEvaluatorTest: empty sets, success/fail/error, execution strategies (executeUntilFirstSuccess vs executeAll), null rule set guard (115 lines covered) Coverage: 48.8% -> 49.1% line, 42.9% -> 43.2% branch All tests pass, BUILD SUCCESS.
Coverage progress: 48.1% -> 49.1% line, 42.7% -> 43.2% branch 8 new test files across models, services, and rules engine.
…ostUtils, RagConfiguration - OutputModelsTest: TextOutputItem, ButtonOutputItem, QuickReply, OutputValue, OutputEntry (Comparable sorting), Jackson polymorphic deserialization - OutputTypesTest: all 8 OutputItem subtypes (Image, AgentFace, ApplicationLink, InputField, QuickReply, Other/Map delegation), Jackson polymorphism - EngineModelsTest: Deployment.Environment (backward compat fromString + Jackson), Deployment.Status, Context, InputData, DeadLetterEntry, AgentDeploymentStatus, CoordinatorStatus - PrePostUtilsTest: verifyHttpCode with DEFAULT validator, custom codes, skip logic - RagConfigurationTest: defaults, setters, Jackson round-trip - ConversationOutputTest: typed get(), LinkedHashMap ordering - Fix McpToolFilterTest: null tool name NPE (Set.of doesn't allow null in contains) - Fix BackupModelsTest: SyncMapping now takes 3 args (sourceAgentVersion added) - Fix ConversationPropertiesTest: Map<String,Object> type for Property constructor Line coverage: 43.7% -> 50.4% (+6.7pp, +1486 lines covered)
…lizer, ToolExecutionService, engine models - McpCallsModelsTest: McpCallsConfiguration (defaults, setters, Jackson), McpCall (defaults, setters, Jackson round-trip) - IdSerializerTest: isValid() (hex validation, length, null), non-BSON serialize - IdDeserializerTest: non-BSON deserialization path - ToolExecutionServiceTest: executeToolWrapped (all feature permutations: success, cached, rate-limited, caching/rate-limiting/cost-tracking disabled, null conversationId, tool exception), parallel array validation - EngineModelsTest: added AgentDeployment (defaults, setters), LogEntry record (all fields, nulls, Jackson, @JsonInclude.NON_NULL verification) Total: 3077 tests passing
…cheImpl - McpMemoryToolsTest: all 7 tool methods (list, getVisible, search, getByKey, upsert, delete, deleteAll, count) with null/blank validation, success paths, exception handling, limit/pagination - EddiChatMemoryStoreTest: getMessages (new conversation, store error, empty snapshot), updateMessages (no-op), deleteMessages (success, not found, store error) - CacheImplTest: full ConcurrentMap delegation (put/get/remove/replace/ containsKey/containsValue/size/isEmpty/clear/putAll/keySet/values/ entrySet) + all TTL-aware overloads Line coverage: 50.8% -> 51.4% (+0.6pp, 157 lines covered)
- UserConversationTest: constructors, setters, Jackson round-trip - RegularDictionaryTest: word lookup (case-sensitive/insensitive), phrases, regex matching, lookupIfKnown, list immutability (16 tests) - MergedTermsCorrectionTest: merged word detection, partial match, temporary dictionary support - PhoneticCorrectionTest: phonetic code-based word correction - V6QuteMigrationTest: disabled/already-applied skip, empty collections, Thymeleaf->Qute migration with mocked MongoDB Line coverage: 51.4% -> 52.0% (+0.6pp, 160 lines covered)
…Mapper WebSearchTool: Replace all String.split/indexOf-based JSON parsing with Jackson ObjectMapper.readTree() for safe, correct JSON parsing. Inject ObjectMapper via CDI constructor (matching WeatherTool pattern). Use boolean flags for empty-result detection instead of StringBuilder.equals(). AuditLedgerService: Replace hand-rolled JSON string concatenation in writeToDeadLetter with Jackson ObjectMapper.writeValueAsString() for correct escaping of all field values. Remove unsafe fallback that embedded unescaped user values. Tests: 49 passing (23 WebSearchTool + 26 AuditLedger). All parsing tests are pure unit tests against mock JSON - no network calls.
…cheServiceTest, add AgentSetupServiceTest (139 new tests)
…nagerTest (51 new tests)
…k (16 tests total)
…ll Qute template extensions)
…4.7%, 3448 tests)
…cate @SuppressWarnings, add uncommitted test classes from prior session (McpCallsTask, InputParser, OutputGeneration, PhoneticCorrection)
…OutputGenerationTask, PropertySetterTask, McpCallsTask - LlmTask: +20 tests covering convertToObject, responseObjectName, addToOutput=false, rolling summary, token-aware windowing, resolveModelName, snippets, multiple tasks, cascade skip - LifecycleManager: +15 tests covering task execution, selective execution, STOP_CONVERSATION, strict write discipline, event sink, audit collector - OutputGenerationTask: +13 tests covering null component, action matching, language filtering, quick replies, configure - PropertySetterTask: +11 tests covering action matching, wildcards, override, value types, context expressions, CATCH_ANY_INPUT - McpCallsTask: +13 tests covering action matching, wildcards, blacklist, tool discovery, configure Total: 3,520 tests (up from 3,448), all passing
- InputParser: +16 tests covering construction, normalize (whitespace, chaining, null language), parse (unknown words, dictionary lookup, language mismatch, corrections, multi-word), Config POJO - Conversation: +8 tests covering state management (isEnded, endConversation), init (READY state, user property loading, null store), say/rerun IN_PROGRESS guards Total: 3,544 tests, all passing
- AgentDeploymentManagement: +8 tests (deploy, null guards, no re-deploy, exception handling, stale cleanup, migrations) - MatchMatrix: +11 tests (add/get, iterator, NoSuchElementException, MatchingResult basics) Total: 3,563 tests, all passing
RestAgentGroupStore.syncDescriptor: - DocumentDescriptorFilter creates descriptors in a ContainerResponseFilter that runs AFTER the REST method returns, so syncDescriptor was reading a descriptor that didn't exist yet - On CREATE: now creates the descriptor inline with name/description - On UPDATE: falls back to reading descriptor at version-1 (the filter hasn't promoted it yet) and updates name/desc in-place; the filter then carries the changes forward when it bumps the version ToolCacheService: - Global counters (eddi.tool.cache.hits/misses) had no tags but per-tool counters reused the same metric name WITH a 'tool' tag — Prometheus requires identical tag key sets for same-named meters - Renamed per-tool counters to .by_tool suffix to avoid collision
Resolves two Checkstyle violations: parameter naming convention and 150-char line limit.
…p docker] 3 new + 4 modified test suites adding ~42 test methods across 3 packages: - configs.migration: MigrationLogStore (4), MigrationManager exception/re-entrancy/type=other reclassification (13), V6QuteMigration nested doc/list (3), V6RenameMigration error codes/environment rewrites (5) - datastore.mongo: DescriptorStore constructor/filter branch (6), ResourceFilter AND/OR/pagination/sort (9) - backup.impl: RemoteApiResourceSource normalizeBaseUrl/resolveVersion/auth/snippets (7) All 4,948 tests pass with 0 failures.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 117 out of 245 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ResultManipulatorTest - Remove unused conversationProperties map and Document doc in convertConversationPropertyString() - Strengthen mixedValueAlternatives() with type-shape assertions (TextOutputItem, type inference) - Fix misleading @DisplayName and comments in exactMatch_emptyQuotedString()
…or hardening [skip docker] - CI/CD: Trivy (filesystem + Docker image), Gitleaks secret scan, CycloneDX SBOM, ZAP DAST (report-only), security headers check in smoke test - All actions SHA-pinned; ZAP v0.10.0, Trivy v0.35.0, Gitleaks v2.3.9 - CodeQL gated on code changes; Trivy in Slack notifications - Jazzer v0.30.0 fuzz tests for PathNavigator (13 tests) and MatchingUtilities (12 tests) - Fix: PathNavigator parseInt overflow on array indices > Integer.MAX_VALUE - .trivyignore / .gitleaksignore override files for audited false positives
…test assertions, descriptor race condition, remove hardcoded scripts - RestOutputActions: sort full aggregated list before truncating to limit, ensuring deterministic alphabetically-first results regardless of insertion order - DescriptorStoreTest: replace brittle assertThrows(Exception.class) with properly stubbed MongoCollection.find() chain returning empty results; tests now assert observable behavior instead of relying on NPE - RestAgentGroupStore: handle race condition in createDescriptor by catching ResourceStoreException and falling back to setDescriptor when the DocumentDescriptorFilter creates the descriptor concurrently - Remove parse_jacoco.ps1, parse_class_coverage.ps1, parse_pkg_coverage.ps1 developer-only scripts with hardcoded absolute paths [skip docker]
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 117 out of 245 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- RestLogAdminExtendedTest: keep eventSink open during initial batch - PostgresTestBase: add explicit JVM shutdown hook for PostgreSQL container - ZipArchiveTest: generate platform-independent path for path traversal test - GroupConversationServiceTest: assert specific exception (IllegalArgumentException) - pom.xml: raise merged check coverage limits to 0.81 (instruction) and 0.70 (branch) to enforce OpenSSF Silver [skip docker]
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 117 out of 250 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove check_coverage.ps1 (local dev script, hardcoded path) - Remove UT-only JaCoCo check gate (test phase, 65%/55%) - Single coverage gate: merged-check (verify phase, 70%/60% UT+IT) - Build job: verify -DskipITs → test (no gate in test phase) - Fix sort|head broken pipe in coverage summaries (suppress stderr + exit code)
rolandpickl
approved these changes
Apr 22, 2026
This was referenced Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛡️ Test Coverage Hardening
Summary
Systematic test coverage hardening across the entire EDDI backend, pushing instruction coverage from ~45% → 80.6% and achieving OpenSSF Silver badge qualification. This PR adds 196 new test files across 115 commits, totaling 43,000+ lines of new test code.
📊 Coverage Results
🏗️ What Changed
🧪 Unit Tests (Bulk of the work)
engine.internal,modules.llm,configs.*,datastore,backup,tools,utils,runtime,models, and more🔌 Integration Tests
LlmAgentEngineIT,HttpCallsAgentEngineIT,PropertySetterAgentEngineIT,ComplexRulesAgentEngineITSecretPersistence,AuditStore,ResourceStorage,ScheduleStore,UserMemoryStore,ConversationMemoryStore,DeploymentStorage,DatabaseLogs,AgentTriggerStore,UserConversationStore,AttachmentStorage,MigrationLogStoreScheduleStore,SecretPersistence,DeploymentStorage,AttachmentStorage,UserMemoryStore,ResourceStorage🏗️ Infrastructure & CI
--enable-native-accessfix for JNA/Testcontainers compatibility🐛 Bug Fixes (discovered during testing)
RestAgentGroupStoreToolCacheServiceSIGPIPEbroken pipe fix📝 Code Quality
ObjectMapperRestToolHistory→ constructor injection refactorHttpClientWrapperutility methods package-private@SuppressWarningsannotations and unused variables🔢 By the Numbers
✅ Verification
🎯 What This Enables