Skip to content

feat(doppelganger-api-detector): add scanContracts task and response coverage tracking - #221

Merged
Arc-E-Tect merged 3 commits into
mainfrom
feat/scan-contracts-response-coverage
Aug 24, 2026
Merged

feat(doppelganger-api-detector): add scanContracts task and response coverage tracking#221
Arc-E-Tect merged 3 commits into
mainfrom
feat/scan-contracts-response-coverage

Conversation

@Arc-E-Tect

Copy link
Copy Markdown
Owner

Summary

  • Adds a new scanContracts task reporting, per endpoint both declared in the OpenAPI documentation and implemented by a @RestController method, its declared response codes and contract test count.
  • New includeResponseCoverage DSL flag (default false) - when enabled, adds a per-response-code test-count breakdown, including codes with zero covering tests. Not merely hidden when disabled; never computed.
  • Contract test status codes are detected best-effort from MockMvc, WebTestClient, REST Assured, and Spring Cloud Contract call/DSL shapes.
  • New branch-agnostic responseCoverageHistoryFile (NDJSON), separate from contractHistoryFile since it tracks a different shape (a live test-count gauge, not milestone timestamps) and is Doppelganger-only.
  • Refactored DetectDoppelgangerApisTask's bootstrapping-gap handling into a shared ContractScanSupport helper, reused by both tasks - its existing test suite passes unmodified, confirming the refactor is behavior-preserving.
  • Depends on api-detector-core 1.4.0 (feat(api-detector-core): add declared response codes to DescribedEndpoint SoftwareEngineeringDoneRight-Library#75, published).

Verified end-to-end against a real ~1100-controller-file codebase in addition to the unit test suite - see commit history for details.

Arc-E-Tect and others added 3 commits August 24, 2026 21:22
…coverage tracking

detectDoppelgangerApis only answers whether an endpoint has at least one
contract test at all, hiding how many response codes are declared and how
well each is actually exercised. Adds a new scanContracts task reporting,
per declared-and-implemented endpoint, its declared response code count and
contract test count, plus - behind the includeResponseCoverage DSL flag,
since it costs more to compute - a per-response-code test count breakdown.
Contract test status codes are detected best-effort from MockMvc, WebTestClient,
REST Assured, and Spring Cloud Contract call/DSL shapes.

Response coverage history is tracked, when enabled, in its own branch-agnostic
NDJSON file (responseCoverageHistoryFile), separate from contractHistoryFile
since it's a Doppelganger-only concern with a different record shape (a live
test-count gauge rather than milestone timestamps).

Depends on api-detector-core's new DescribedEndpoint.responseCodes() (not yet
released) - the version catalog entry needs bumping once that version ships.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Picks up the published DescribedEndpoint.responseCodes() support the
scanContracts task depends on (Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…avadoc task

StatusCodeDetector referenced ContractVerificationSource by simple name
without an import, which javac tolerates but javadoc's stricter reference
resolution treats as a hard error - failing ./gradlew build (via the
javadoc task) in CI, though not check/test, which is why it was missed
locally before pushing. Fully-qualifies the reference, and adds the
missing @return tags ScanContractsTask's getters were flagged for while
in there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Arc-E-Tect
Arc-E-Tect merged commit 773cf7b into main Aug 24, 2026
5 checks passed
@Arc-E-Tect
Arc-E-Tect deleted the feat/scan-contracts-response-coverage branch August 24, 2026 18:14
Arc-E-Tect added a commit that referenced this pull request Aug 24, 2026
# [2.3.0](doppelganger-api-detector-v2.2.1...doppelganger-api-detector-v2.3.0) (2026-08-24)

### ✨ New and updated features

* **doppelganger-api-detector:** add scanContracts task and response coverage tracking ([#221](#221)) ([773cf7b](773cf7b)), closes [#221](#221) [Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75](Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75)

### 🐛 Bug Fixes

* **tracker-lens:** exclude removed items from chart-series cumulative counts ([#219](#219)) ([ee35459](ee35459)), closes [#219](#219)
* **tracker-lens:** exclude removed items from progress-projection counts ([#220](#220)) ([010f581](010f581)), closes [#220](#220)
* **examples:** migrate doppelganger-api-detector RestDocs examples to Spring Boot 4's split test modules ([#218](#218)) ([2b3cd7b](2b3cd7b)), closes [#218](#218) [#122](#122)
* **ci:** stop treating a sibling-triggered no-op release as a failure ([#216](#216)) ([ac53a54](ac53a54)), closes [#216](#216)

### 🔧 Misc

* dependency updates for Gradle plugin repository ([#217](#217)) ([de0d5e8](de0d5e8)), closes [#217](#217)
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 2.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Arc-E-Tect added a commit that referenced this pull request Aug 24, 2026
# [3.4.0](api-only-suite-v3.3.1...api-only-suite-v3.4.0) (2026-08-24)

### ✨ New and updated features

* **doppelganger-api-detector:** add scanContracts task and response coverage tracking ([#221](#221)) ([773cf7b](773cf7b)), closes [#221](#221) [Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75](Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75)

### 🐛 Bug Fixes

* **api-only-suite:** bump api-detector-core to 1.4.0 ([#222](#222)) ([3d79566](3d79566)), closes [#222](#222)
* **tracker-lens:** exclude removed items from chart-series cumulative counts ([#219](#219)) ([ee35459](ee35459)), closes [#219](#219)
* **tracker-lens:** exclude removed items from progress-projection counts ([#220](#220)) ([010f581](010f581)), closes [#220](#220)
* **examples:** migrate doppelganger-api-detector RestDocs examples to Spring Boot 4's split test modules ([#218](#218)) ([2b3cd7b](2b3cd7b)), closes [#218](#218) [#122](#122)
* **ci:** stop treating a sibling-triggered no-op release as a failure ([#216](#216)) ([ac53a54](ac53a54)), closes [#216](#216)

### 🔧 Misc

* dependency updates for Gradle plugin repository ([#217](#217)) ([de0d5e8](de0d5e8)), closes [#217](#217)
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 3.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Arc-E-Tect added a commit that referenced this pull request Aug 24, 2026
# [2.2.0](tracker-lens-v2.1.2...tracker-lens-v2.2.0) (2026-08-24)

### ✨ New and updated features

* **doppelganger-api-detector:** add scanContracts task and response coverage tracking ([#221](#221)) ([773cf7b](773cf7b)), closes [#221](#221) [Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75](Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75)
* **tracker-lens:** visualize Doppelganger response-code coverage ([#223](#223)) ([23de77e](23de77e)), closes [#223](#223) [#160](#160)

### 🐛 Bug Fixes

* **api-only-suite:** bump api-detector-core to 1.4.0 ([#222](#222)) ([3d79566](3d79566)), closes [#222](#222)
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Arc-E-Tect added a commit that referenced this pull request Aug 25, 2026
# [4.3.0](mirage-api-detector-v4.2.0...mirage-api-detector-v4.3.0) (2026-08-25)

### ✨ New and updated features

* **doppelganger-api-detector:** add scanContracts task and response coverage tracking ([#221](#221)) ([773cf7b](773cf7b)), closes [#221](#221) [Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75](Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75)
* **detector-plugins:** adopt api-detector-core 1.5.0 and add scanContracts progress ([#227](#227)) ([523e72d](523e72d)), closes [#227](#227)
* **tracker-lens:** visualize Doppelganger response-code coverage ([#223](#223)) ([23de77e](23de77e)), closes [#223](#223) [#160](#160)

### 🐛 Bug Fixes

* **api-only-suite:** bump api-detector-core to 1.4.0 ([#222](#222)) ([3d79566](3d79566)), closes [#222](#222)
* **examples:** correct response-coverage chart math and grid legibility ([#225](#225)) ([9317796](9317796)), closes [#225](#225) [#224](#224)
* **tracker-lens:** exclude removed items from chart-series cumulative counts ([#219](#219)) ([ee35459](ee35459)), closes [#219](#219)
* **tracker-lens:** exclude removed items from progress-projection counts ([#220](#220)) ([010f581](010f581)), closes [#220](#220)
* **examples:** migrate doppelganger-api-detector RestDocs examples to Spring Boot 4's split test modules ([#218](#218)) ([2b3cd7b](2b3cd7b)), closes [#218](#218) [#122](#122)
* **ci:** stop treating a sibling-triggered no-op release as a failure ([#216](#216)) ([ac53a54](ac53a54)), closes [#216](#216)

### 📝 Documentation

* **tracker-lens:** show response-coverage in the register() DSL examples ([#226](#226)) ([f3217f7](f3217f7)), closes [#226](#226)

### 🔧 Misc

* **examples:** bump dashboard-extra-charts to tracker-lens 2.2.0 ([#224](#224)) ([beaa1a0](beaa1a0)), closes [#224](#224) [#223](#223)
* dependency updates for Gradle plugin repository ([#217](#217)) ([de0d5e8](de0d5e8)), closes [#217](#217)
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 4.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Arc-E-Tect added a commit that referenced this pull request Aug 25, 2026
# [3.3.0](shadow-api-detector-v3.2.0...shadow-api-detector-v3.3.0) (2026-08-25)

### ✨ New and updated features

* **doppelganger-api-detector:** add scanContracts task and response coverage tracking ([#221](#221)) ([773cf7b](773cf7b)), closes [#221](#221) [Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75](Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75)
* **detector-plugins:** adopt api-detector-core 1.5.0 and add scanContracts progress ([#227](#227)) ([523e72d](523e72d)), closes [#227](#227)
* **tracker-lens:** visualize Doppelganger response-code coverage ([#223](#223)) ([23de77e](23de77e)), closes [#223](#223) [#160](#160)

### 🐛 Bug Fixes

* **api-only-suite:** bump api-detector-core to 1.4.0 ([#222](#222)) ([3d79566](3d79566)), closes [#222](#222)
* **examples:** correct response-coverage chart math and grid legibility ([#225](#225)) ([9317796](9317796)), closes [#225](#225) [#224](#224)
* **tracker-lens:** exclude removed items from chart-series cumulative counts ([#219](#219)) ([ee35459](ee35459)), closes [#219](#219)
* **tracker-lens:** exclude removed items from progress-projection counts ([#220](#220)) ([010f581](010f581)), closes [#220](#220)
* **examples:** migrate doppelganger-api-detector RestDocs examples to Spring Boot 4's split test modules ([#218](#218)) ([2b3cd7b](2b3cd7b)), closes [#218](#218) [#122](#122)
* **ci:** stop treating a sibling-triggered no-op release as a failure ([#216](#216)) ([ac53a54](ac53a54)), closes [#216](#216)

### 📝 Documentation

* **tracker-lens:** show response-coverage in the register() DSL examples ([#226](#226)) ([f3217f7](f3217f7)), closes [#226](#226)

### 🔧 Misc

* **examples:** bump dashboard-extra-charts to tracker-lens 2.2.0 ([#224](#224)) ([beaa1a0](beaa1a0)), closes [#224](#224) [#223](#223)
* dependency updates for Gradle plugin repository ([#217](#217)) ([de0d5e8](de0d5e8)), closes [#217](#217)
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 3.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Arc-E-Tect added a commit that referenced this pull request Aug 27, 2026
# [6.3.0](gherkin-to-asciidoc-v6.2.0...gherkin-to-asciidoc-v6.3.0) (2026-08-27)

### ✨ New and updated features

* **doppelganger-api-detector:** add scanContracts task and response coverage tracking ([#221](#221)) ([773cf7b](773cf7b)), closes [#221](#221) [Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75](Arc-E-Tect/SoftwareEngineeringDoneRight-Library#75)
* **detector-plugins:** adopt api-detector-core 1.5.0 and add scanContracts progress ([#227](#227)) ([523e72d](523e72d)), closes [#227](#227)
* **mirage-api-detector:** scan WireMock stubs created at run time by Java code ([#230](#230)) ([3c12eee](3c12eee)), closes [#230](#230)
* **tracker-lens:** visualize Doppelganger response-code coverage ([#223](#223)) ([23de77e](23de77e)), closes [#223](#223) [#160](#160)

### 🐛 Bug Fixes

* **api-only-suite:** bump api-detector-core to 1.4.0 ([#222](#222)) ([3d79566](3d79566)), closes [#222](#222)
* **api-only-suite:** bump api-detector-core to 1.5.0 ([#228](#228)) ([aedfabb](aedfabb)), closes [#228](#228) [#227](#227)
* **shadow-api-detector:** bump api-detector-core to 1.5.1 ([#233](#233)) ([dcc9be8](dcc9be8)), closes [#233](#233)
* **mirage-api-detector:** bump api-detector-core to 1.5.1 ([#234](#234)) ([bbb028b](bbb028b)), closes [#234](#234)
* **doppelganger-api-detector:** bump api-detector-core to 1.5.1 ([#235](#235)) ([ca0d4cf](ca0d4cf)), closes [#235](#235)
* **examples:** correct response-coverage chart math and grid legibility ([#225](#225)) ([9317796](9317796)), closes [#225](#225) [#224](#224)
* **tracker-lens:** exclude removed items from chart-series cumulative counts ([#219](#219)) ([ee35459](ee35459)), closes [#219](#219)
* **tracker-lens:** exclude removed items from progress-projection counts ([#220](#220)) ([010f581](010f581)), closes [#220](#220)
* **gherkin-to-asciidoc:** explain why a scenario becomes removed ([#238](#238)) ([66ae18b](66ae18b)), closes [#238](#238)
* **api-only-suite:** forward mirage's stubSourceDirs and doppelganger's testDirsUserConfigured to detectAllApiGaps's task instances ([#231](#231)) ([89c235c](89c235c)), closes [#231](#231)
* **examples:** migrate doppelganger-api-detector RestDocs examples to Spring Boot 4's split test modules ([#218](#218)) ([2b3cd7b](2b3cd7b)), closes [#218](#218) [#122](#122)
* **tracker-lens:** recognise api-detector-core's current semver schemaVersion header line ([#236](#236)) ([7aaf30c](7aaf30c)), closes [#236](#236)
* **mirage-api-detector:** rewrite a literal urlPath/url purely numeric id segment into a {id} placeholder ([#237](#237)) ([df6d205](df6d205)), closes [#237](#237) [#232](#232)
* **mirage-api-detector:** rewrite a WireMock urlPattern/urlPathPattern regex id segment into a {id} placeholder ([#232](#232)) ([ea9441e](ea9441e)), closes [#232](#232)
* **ci:** stop treating a sibling-triggered no-op release as a failure ([#216](#216)) ([ac53a54](ac53a54)), closes [#216](#216)

### 👷 CI/CD

* **api-only-suite:** derive api-detector-core version from sibling plugins ([#229](#229)) ([cca417d](cca417d)), closes [#229](#229)

### 📝 Documentation

* **tracker-lens:** show response-coverage in the register() DSL examples ([#226](#226)) ([f3217f7](f3217f7)), closes [#226](#226)

### 🔧 Misc

* **examples:** bump dashboard-extra-charts to tracker-lens 2.2.0 ([#224](#224)) ([beaa1a0](beaa1a0)), closes [#224](#224) [#223](#223)
* dependency updates for Gradle plugin repository ([#217](#217)) ([de0d5e8](de0d5e8)), closes [#217](#217)
@Arc-E-Tect

Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 6.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant