Skip to content

CI Failure DoctorCI Failure - Run #22834065174 (PR #4297) - Per-Class Coverage Gate #4311

Description

@github-actions

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:

  1. Method extraction: Moving toAppliedDirective/toAppliedArgument from QueryDirectivesImpl to DirectivesResolver removes those covered lines/branches from QueryDirectivesImpl's metrics.
  2. Overload bypass: The ExecutionContext refactoring to call a richer overload directly leaves the 4-param convenience overload of createExecutableNormalizedOperation uncovered.

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 of ExecutableNormalizedOperationFactory.
    • Coverage for QueryDirectivesImpl will naturally be maintained once the methods now live in DirectivesResolver are tested there (which they are, via OperationDirectivesResolverTest). Updating the baseline for QueryDirectivesImpl is acceptable here.
  • Option B — Update test-baseline.json: If the regressions are considered intentional/acceptable, update the per-class coverage entries for graphql.execution.directives.QueryDirectivesImpl and graphql.normalized.ExecutableNormalizedOperationFactory in test-baseline.json to 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions