• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 35956905562
83%
master: 76%

Build:
Build:
LAST BUILD BRANCH: guitlle/dev-180-openid-logout
DEFAULT BRANCH: master
Ran 24 Sep 2026 04:47AM UTC
Jobs 10
Files 913
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Sep 2026 04:44AM UTC coverage: 82.945% (-0.002%) from 82.947%
35956905562

push

github

web-flow
feat(openapiValidator): add OpenAPI request/response validation middleware DEV-1740 (#7314)

### 📣 Summary

The API and its published documentation are now checked against each
other automatically, so the API documentation stays accurate.

### 📖 Description

KoboToolbox publishes a description of its API that integrations and
third-party tools rely on. Until now nothing verified that the API
really matches it, so the two could drift apart unnoticed. Requests and
responses are now compared against that description automatically and
any difference is reported to the team, so it gets fixed instead of
reaching the documentation. Nothing changes in how the product behaves
today.

### 💭 Notes

Proof of concept for DEV-1740, picked up from Olivier's branch (~700
commits behind main at the time).

- New app `kobo.apps.openapi_validator`: middleware validating requests
and responses against `static/openapi/schema_v2.json`.
- Test settings only. `OPENAPI_VALIDATION` is hard-coded off in
`base.py` and on in `testing.py`, and the middleware refuses to load
unless `settings.TESTING` is true (`MiddlewareNotUsed`, so Django drops
it from the stack): a deployed environment never runs it whatever the
flags say and pays nothing. Enabling it on live traffic is DEV-1740's
follow-up, not this PR.
- Strict in test settings: a mismatch fails the test that triggered it
unless listed in `OPENAPI_KNOWN_MISMATCHES` — 85 `(error_code, route,
method)` entries, each one a real schema bug to fix and delete.
- Entries are keyed by endpoint, not by test, so no test file is
touched: the 1189 per-test entries the suite produces are only 85
distinct bugs, and endpoint keys survive test renames. Trade-offs: a new
test hitting an already-listed endpoint passes silently, and the key
ignores the status code, so a listed `response-validation` silences
drift on every status that route returns. Adding the status to the key
needs a full-suite regeneration — follow-up.
- Request-side errors are ... (continued)

10341 of 13696 branches covered (75.5%)

168 of 223 new or added lines in 7 files covered. (75.34%)

2964 existing lines in 78 files now uncovered.

33002 of 39788 relevant lines covered (82.94%)

5.51 hits per line

Uncovered Changes

Lines Coverage ∆ File
52
73.74
kobo/apps/openapi_validator/middleware.py
2
80.0
kobo/apps/openapi_validator/utils.py
1
89.47
-4.64% kobo/apps/audit_log/middleware.py

Coverage Regressions

Lines Coverage ∆ File
312
0.0
-91.23% kobo/apps/openrosa/apps/viewer/pandas_mongo_bridge.py
284
45.33
-42.77% kobo/apps/openrosa/libs/utils/logger_tools.py
209
19.68
-56.33% kobo/apps/openrosa/libs/utils/export_tools.py
206
0.0
-86.19% kobo/apps/openrosa/libs/utils/briefcase_client.py
93
42.11
-48.95% kobo/apps/openrosa/apps/api/viewsets/xform_list_api.py
87
0.0
-87.88% kobo/apps/openrosa/libs/utils/backup_tools.py
81
0.0
-93.1% kobo/apps/stripe/serializers.py
75
0.0
-41.9% kobo/apps/stripe/views.py
66
33.33
-59.46% kobo/apps/openrosa/apps/viewer/views.py
64
24.22
-39.75% kobo/apps/stripe/utils/subscription_limits.py
63
34.58
-58.88% kobo/apps/openrosa/apps/api/viewsets/briefcase_api.py
63
40.48
-50.0% kobo/apps/openrosa/apps/logger/signals.py
63
0.0
-51.64% kobo/apps/stripe/models.py
59
48.31
-50.0% kobo/apps/openrosa/apps/api/viewsets/xform_submission_api.py
58
0.0
-90.63% kobo/apps/openrosa/libs/data/query.py
54
25.0
-71.05% kobo/apps/openrosa/apps/logger/utils/suspension.py
49
0.0
-57.65% kobo/apps/openrosa/apps/logger/tasks.py
49
23.85
-37.69% kobo/apps/openrosa/apps/logger/utils/instance.py
49
28.57
-43.75% kobo/apps/openrosa/apps/logger/views.py
43
46.1
-15.99% kobo/apps/openrosa/apps/viewer/models/data_dictionary.py
40
0.0
-40.82% kobo/apps/openrosa/apps/viewer/xls_writer.py
40
23.29
-54.79% kobo/apps/openrosa/libs/utils/image_tools.py
38
24.14
-32.76% kobo/apps/openrosa/apps/viewer/tasks.py
37
51.22
-45.12% kobo/apps/openrosa/libs/serializers/xform_serializer.py
36
24.49
-73.47% kobo/apps/openrosa/apps/logger/import_tools.py
36
20.2
-36.36% kobo/apps/stripe/utils/billing_dates.py
34
47.87
-7.64% kobo/apps/audit_log/models.py
34
55.29
-40.0% kobo/apps/openrosa/libs/renderers/renderers.py
33
55.83
-27.5% kobo/apps/openrosa/apps/logger/models/attachment.py
33
49.02
-32.35% kobo/apps/openrosa/apps/viewer/models/export.py
32
58.33
-13.33% kobo/apps/openrosa/apps/viewer/models/parsed_instance.py
31
78.05
-10.8% kobo/apps/openrosa/apps/logger/xform_instance_parser.py
30
0.0
-75.0% kobo/apps/openrosa/apps/django_digest_backends/cache.py
28
30.14
-19.18% kobo/apps/openrosa/libs/utils/viewer_tools.py
27
34.0
-54.0% kobo/apps/data_collectors/authentication.py
26
40.59
-15.29% kobo/apps/openrosa/apps/main/models/meta_data.py
26
27.78
-72.22% kobo/apps/openrosa/libs/utils/decorators.py
24
72.04
-11.37% kobo/apps/openrosa/apps/logger/models/xform.py
24
29.67
-26.37% kobo/apps/openrosa/libs/utils/user_auth.py
21
55.0
-17.5% kobo/apps/openrosa/libs/utils/middleware.py
20
43.9
-48.78% kobo/apps/openrosa/libs/filters.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
17
16.22
-45.95% kobo/apps/openrosa/apps/logger/utils/database_query.py
17
41.94
-54.84% kobo/apps/openrosa/libs/authentication.py
15
20.0
-60.0% kobo/apps/openrosa/apps/api/utils/xml.py
15
31.71
-36.59% kobo/apps/openrosa/apps/logger/xform_fs.py
15
0.0
-20.55% kobo/apps/stripe/signals.py
14
75.38
-7.18% kobo/apps/openrosa/apps/logger/models/instance.py
14
44.0
-56.0% kobo/apps/openrosa/libs/utils/model_tools.py
14
31.82
-31.82% kobo/apps/stripe/utils/limit_enforcement.py
12
44.9
-24.49% kobo/apps/openrosa/apps/logger/utils/counters.py
12
35.0
-60.0% kobo/apps/stripe/utils/import_management.py
11
63.57
-7.86% kobo/apps/audit_log/signals.py
9
0.0
-29.03% kobo/apps/stripe/utils/manual_subscription.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
7
30.56
-6.48% kobo/apps/openrosa/apps/api/tools.py
7
31.25
-43.75% kobo/apps/openrosa/libs/utils/string.py
7
0.0
-100.0% kobo/apps/stripe/apps.py
6
83.05
-10.17% kobo/apps/openrosa/apps/logger/exceptions.py
6
69.57
-26.09% kobo/apps/openrosa/libs/permissions.py
6
0.0
-100.0% kobo/apps/stripe/exceptions.py
6
0.0
-37.5% kobo/apps/stripe/utils/view_utils.py
5
72.22
-27.78% kobo/apps/openrosa/apps/logger/models/daily_xform_submission_counter.py
5
75.0
-25.0% kobo/apps/openrosa/apps/logger/models/monthly_xform_submission_counter.py
5
0.0
-38.46% kobo/apps/openrosa/apps/main/context_processors.py
5
66.67
-33.33% kobo/apps/openrosa/apps/viewer/signals.py
5
50.0
-50.0% kobo/apps/openrosa/libs/mixins/openrosa_headers_mixin.py
4
45.45
-36.36% kobo/apps/openrosa/koboform/__init__.py
4
0.0
-100.0% kobo/apps/openrosa/libs/utils/storage.py
3
60.0
-30.0% kobo/apps/openrosa/libs/serializers/data_serializer.py
3
31.43
-2.86% kobo/apps/organizations/admin/organization.py
3
59.46
-1.62% kobo/apps/organizations/models.py
3
60.53
-7.89% kobo/apps/organizations/utils.py
1
78.57
-1.19% kobo/apps/audit_log/base_views.py
1
75.0
-25.0% kobo/apps/audit_log/mixins.py
1
92.86
-3.57% kobo/apps/audit_log/utils.py
1
76.27
-1.69% kobo/apps/user_reports/utils/migrations.py
1
70.83
-4.17% kpi/urls/__init__.py
Jobs
ID Job ID Ran Files Coverage
1 35956905562.1 24 Sep 2026 04:47AM UTC 908
52.79
2 35956905562.2 24 Sep 2026 04:48AM UTC 908
49.28
3 35956905562.3 24 Sep 2026 04:48AM UTC 908
43.65
4 35956905562.4 24 Sep 2026 04:48AM UTC 910
54.04
5 35956905562.5 24 Sep 2026 04:50AM UTC 910
44.93
6 35956905562.6 24 Sep 2026 04:50AM UTC 910
50.53
7 35956905562.7 24 Sep 2026 04:51AM UTC 908
58.65
8 35956905562.8 24 Sep 2026 04:52AM UTC 911
68.07
9 35956905562.9 24 Sep 2026 04:53AM UTC 910
59.73
10 35956905562.10 24 Sep 2026 04:56AM UTC 913
70.4
Source Files on build 35956905562
  • Tree
  • List 913
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 976c89ba on github
  • Prev Build on main (#35920169980)
  • Next Build on main (#35992070691)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc