Skip to content

test: raise every service to 90%+ line coverage - #1098

Open
devin-ai-integration[bot] wants to merge 32 commits into
mainfrom
devin/1795032267-cov90-all
Open

devin-ai-integration[bot] wants to merge 32 commits into
mainfrom
devin/1795032267-cov90-all

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Summary

Raises every service under services/ to at least 90% line coverage. Almost all of the change is new tests. Each service was done in its own subsession and branch (devin/1795032267-cov90-<service>), then merged here. The merges had no conflicts, and each service's tree matches its source branch exactly.

Service Line % before → after Branch % after Tests
admin-service 60.4 → 97.5 85.1 356 pass
analytics-service 80.9 → 97.6 92.2 85 pass
api-gateway 59.2 → 94.9 92.9 104 pass
audit-service 54.5 → 99.9 95.1 95 pass
auth-service 73.3 → 98.2 (94.9 incl. Lombok) 100 80 pass
billing-service 78.8 → 100 100 33 pass, 3 opt-in Postgres skipped
collab-service 65.1 → 99.3 93.2 148 pass
document-service 89.7 → 100 100 107 pass, 1 xfail (OW-SEC-401)
file-service 20.1 → 97.9 96.0 56 pass
industry-solutions 66.7 → 98.6 (86.8 at PLSQL_OPTIMIZE_LEVEL=2) 90.0 (blocks) 66 assertions
legacy-billing 0 → 100 100 56 pass, 6 xfail (suspected bugs)
legacy-portal 71.3 → 99.1 100 48 pass, 1 skip
notification-service 33.1 → 96.1 84.1 105 pass
report-service 81.9 → 97.2 90.6 97 pass, 3 skip (suspected bug)
search-service 75.4 → 99.5 99.4 155 pass

Non-test changes (coverage tooling, plus one refactor):

  • Coverage plugin or config: JaCoCo in legacy-portal/pom.xml, report-service/pom.xml and notification-service/build.gradle.kts; scoverage in analytics-service/project/plugins.sbt; .coveragerc in document, search and legacy-billing (document adds concurrency = greenlet,thread, which fixes the under-reporting); pytest-cov in billing-service/pyproject.toml; auth-service/lombok.config so JaCoCo skips Lombok-generated code; collab-service/jest.config.js; api-gateway/Makefile now uses -coverpkg=./...; admin-service/spec/spec_helper.rb turns on branch coverage.
  • Coverage gates that now fail the build below a threshold: search (fail_under = 90), billing (fail_under = 90 when run with --cov), collab (jest thresholds: 90 for lines, statements and functions, 85 for branches).
  • analytics-service/build.sbt adds Test / parallelExecution := false, plus a test resource that pins the Docker API version so the Testcontainers tests run on Docker 29 instead of cancelling silently.
  • file-service is the only service with production code changes: routes moved into configure_routes() in src/main.rs with no behaviour change, and src/events.rs gains a test-only constructor.

Tests never assert suspected bugs as correct behaviour; they are marked xfail or skipped, or left unasserted. None of those bugs are fixed here. CI fixes: three jobs were failing on any PR that touches their paths because the runner image changed, not because of these tests. apt-key was removed (breaking the analytics-service sbt install), and the default Python moved to 3.14, which has no wheels for asyncpg 0.29 / psycopg-binary 3.2.9 (breaking equivalence and parity). The fixes: the sbt key now goes into a signed-by keyring, equivalence pins poetry to Python 3.12, and parity sets UV_PYTHON=3.12.

Coverage wiring in the root Makefile, extra CI jobs (Postgres/Docker coverage runs) and blueprint changes are deliberately left out of this PR.

Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/48b540e5de6d4ac4abdf50815eeca84d
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/48b540e5de6d4ac4abdf50815eeca84d?variant=devin
Requested by: @TheWuster935


🟢 Devin Review found nothing to fix · View findings

Devin Review

devin-ai-integration Bot and others added 30 commits November 18, 2026 20:06
…ed script, opt-in Postgres tests)

Co-Authored-By: derek.wu <derekwu35@gmail.com>
…ine coverage

Co-Authored-By: derek.wu <derekwu35@gmail.com>
Co-Authored-By: derek.wu <derekwu35@gmail.com>
Co-Authored-By: derek.wu <derekwu35@gmail.com>
…agerc greenlet tracing

Co-Authored-By: derek.wu <derekwu35@gmail.com>
…91% branch

Co-Authored-By: derek.wu <derekwu35@gmail.com>
…ith coverage config

Co-Authored-By: derek.wu <derekwu35@gmail.com>
Add specs for Incident model/serializer, IncidentsController, ChaosController,
ChaosProbeService, HealthChecker, admin HealthController, AdminSettingsService,
DevinSessionService HTTP paths, and AlertsController resolve/auth paths.
Enable SimpleCov branch coverage.

Co-Authored-By: derek.wu <derekwu35@gmail.com>
Co-Authored-By: derek.wu <derekwu35@gmail.com>
Add unit tests for UserService, UserSettingsService, JwtAuthFilter,
GlobalExceptionHandler, HealthController degraded paths, refresh/logout
paths in AuthService and token-type checks in JwtTokenProvider, plus MockMvc
integration tests for settings, logout, user lookup and refresh failures.
Add lombok.config so JaCoCo skips Lombok-generated accessors/equals/hashCode.

Co-Authored-By: derek.wu <derekwu35@gmail.com>
Co-Authored-By: derek.wu <derekwu35@gmail.com>
…ion-service' into devin/1795032267-cov90-all
…fakes

Co-Authored-By: derek.wu <derekwu35@gmail.com>
…, EventProcessor/Health/Config/Main tests

Co-Authored-By: derek.wu <derekwu35@gmail.com>
…lock, add coverage runner

Co-Authored-By: derek.wu <derekwu35@gmail.com>
Co-Authored-By: derek.wu <derekwu35@gmail.com>
Co-Authored-By: derek.wu <derekwu35@gmail.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team November 18, 2026 20:21
@socket-security

socket-security Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednuget/​microsoft.aspnetcore.mvc.testing@​8.0.119810090100100
Addedpypi/​pytest-cov@​6.3.0100100100100100
Addedpypi/​pytest-cov@​7.1.0100100100100100

View full report

@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 2 commits November 18, 2026 20:24
…ge run

Co-Authored-By: derek.wu <derekwu35@gmail.com>
…for analytics, parity and equivalence jobs

Co-Authored-By: derek.wu <derekwu35@gmail.com>
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