Repository navigation
CI Failure DoctorCI Failure - Run #22834065174 (PR #4297) - Per-Class Coverage Gate #4311
Description
Failure Details
- Run: 22834065174
- Commit:
bdf5163— "Merge branch 'master' into extract-out-operation-directives" - PR: #4297 — "This adds support for QueryAppliedDirective on operations and documents"
Failed Job
Per-Class Coverage Gate (test-summary job in pull_request.yml)
The coverage gate script compares per-class JaCoCo coverage against test-baseline.json and fails if any class regresses by more than 0.05 percentage points on any metric.
Coverage Regressions Detected
1. graphql.execution.directives.QueryDirectivesImpl
| Metric | Baseline | After PR | Delta |
|---|---|---|---|
| Line | 97.6% (82/84) | ~97.2% | -0.4% 🔴 |
| Branch | 80.0% (8/10) | ~75.0% | -5.0% 🔴 |
| Method | 94.4% (17/18) | ~93.7% | -0.7% 🔴 |
Root cause: PR #4297 extracts private methods toAppliedDirective(GraphQLDirective) and toAppliedArgument(GraphQLArgument) out of QueryDirectivesImpl and moves them to DirectivesResolver as public methods. These methods were 100% covered by existing tests in the context of QueryDirectivesImpl. The branch regression (−5.0%) is explained by the for-loop in toAppliedDirective() that contributed 2 covered branches now counted under DirectivesResolver instead.
Relevant change (QueryDirectivesImpl.java, diff hunk @@ -125,23 +125,6 @@):
// REMOVED from QueryDirectivesImpl:
private QueryAppliedDirective toAppliedDirective(GraphQLDirective directive) { … }
private QueryAppliedDirectiveArgument toAppliedArgument(GraphQLArgument argument) { … }2. graphql.normalized.ExecutableNormalizedOperationFactory
| Metric | Baseline | After PR | Delta |
|---|---|---|---|
| Line | 92.0% (23/25) | ~84.0% | -8.0% 🔴 |
| Branch | 0.0% (0/0) | 0.0% | ±0.0% |
| Method | 87.5% (7/8) | ~75.0% | -12.5% 🔴 |
Root cause: ExecutionContext.java was changed to bypass the 4-parameter convenience overload and call the 5-parameter overload directly. Previously, ExecutionContext called:
// OLD — exercised the 4-param overload (lines 311-319):
ExecutableNormalizedOperationFactory.createExecutableNormalizedOperation(
graphQLSchema, operationDefinition, fragmentsByName, coercedVariables)After the PR, ExecutionContext.mkExecutableNormalizedOperation() calls:
// NEW — skips the 4-param overload, calls 5-param directly:
createExecutableNormalizedOperation(
graphQLSchema, operationDefinition, fragmentsByName, coercedVariables, options)The 4-param public static method at lines 311–319 of ExecutableNormalizedOperationFactory.java is no longer exercised by any path in the main execution flow, leaving 2 lines and 1 method uncovered.
Root Cause Summary
The CI failure is not a test failure — all tests pass. It is a coverage gate failure caused by:
- Method extraction: Moving
toAppliedDirective/toAppliedArgumentfromQueryDirectivesImpltoDirectivesResolverremoves those covered lines/branches fromQueryDirectivesImpl's metrics. - Overload bypass: The
ExecutionContextrefactoring to call a richer overload directly leaves the 4-param convenience overload ofcreateExecutableNormalizedOperationuncovered.
Recommended Fix
- Option A — Add targeted tests (preferred to maintain API coverage):
- Add a test that directly calls
ExecutableNormalizedOperationFactory.createExecutableNormalizedOperation(schema, operationDef, fragments, coercedVars)(the 4-param overload) to restore coverage ofExecutableNormalizedOperationFactory. - Coverage for
QueryDirectivesImplwill naturally be maintained once the methods now live inDirectivesResolverare tested there (which they are, viaOperationDirectivesResolverTest). Updating the baseline forQueryDirectivesImplis acceptable here.
- Add a test that directly calls
- Option B — Update
test-baseline.json: If the regressions are considered intentional/acceptable, update the per-class coverage entries forgraphql.execution.directives.QueryDirectivesImplandgraphql.normalized.ExecutableNormalizedOperationFactoryintest-baseline.jsonto match the new coverage values.
Generated by CI Failure Doctor
To install this workflow, run
gh aw add githubnext/agentics/workflows/ci-doctor.md@ee50a3b7d1d3eb4a8c409ac9409fd61c9a66b0f5. View source at https://github.com/githubnext/agentics/tree/ee50a3b7d1d3eb4a8c409ac9409fd61c9a66b0f5/workflows/ci-doctor.md.
Activity