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

kobotoolbox / kpi / 42988289447
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-3367-remove-celery-beat-from-trash-bin
DEFAULT BRANCH: master
Ran 11 Nov 2026 08:40AM UTC
Jobs 10
Files 890
Run time 1min
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

11 Nov 2026 08:35AM UTC coverage: 85.927% (-0.007%) from 85.934%
42988289447

push

github

web-flow
fix(nlp): let NLP jobs that already started finish when the usage limit is reached DEV-3221 (#7821)

### đŸ“Ŗ Summary

Automatic transcriptions and translations that have already started now
finish, even if the account goes over its usage limit while they run.

### 📖 Description

A bulk transcription could push an account past its transcription
minutes partway through. The jobs that had already started kept running
at Google and their minutes were counted, but their transcripts never
showed up. Those jobs now finish and save their results. Starting a new
transcription or translation is still refused once the limit is reached.

### 💭 Notes

- Minutes are counted when a Google job starts, but `check_limits` also
ran on every poll of that job. Once the counted minutes crossed the
limit, the polls raised a 402 and the results were dropped.
- The limit is now checked where usage is counted.
`GoogleService._before_new_operation()` calls
`raise_if_usage_limit_exceeded()` with the asset owner and the service's
`USAGE_TYPE`, only when there's no operation to resume and a new one is
about to start. `BaseAutomaticNLPAction.check_limits` no longer checks
upfront.
- Polls never hit the check, and a job waiting on Google quota, a
language switch or a stuck `in_progress` row still does, since each of
those starts a new job.
- `BaseAction.check_limits` calls the same helper (now in
`kobo/apps/stripe/utils/limit_enforcement.py`), so Bedrock is unchanged.
- The 402 now comes after payload validation, still before any audio is
converted or sent to Google.
- Not covered here: the 15-minute usage cache still lets new jobs start
past the limit inside that window.

### 👀 Preview steps

1. â„šī¸ on Main as a test account on the free plan (10 transcription
minutes), with `USAGE_LIMIT_ENFORCEMENT` on in the admin's Constance
config. You need an audio file of about 12 minutes.
2. Create and deploy a project with one audio question, then submit it
once with the 12-minute file.
3. In t... (continued)

10899 of 13720 branches covered (79.44%)

20 of 24 new or added lines in 5 files covered. (83.33%)

2208 existing lines in 71 files now uncovered.

34112 of 39699 relevant lines covered (85.93%)

5.82 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
36.51
3.17% kobo/apps/stripe/utils/limit_enforcement.py

Coverage Regressions

Lines Coverage ∆ File
303
0.0
-91.54% kobo/apps/openrosa/apps/viewer/pandas_mongo_bridge.py
251
48.79
-40.55% kobo/apps/openrosa/libs/utils/logger_tools.py
206
19.7
-62.42% kobo/apps/openrosa/libs/utils/export_tools.py
93
42.11
-48.95% kobo/apps/openrosa/apps/api/viewsets/xform_list_api.py
68
69.77
-26.36% kobo/apps/openrosa/apps/logger/xform_instance_parser.py
66
33.33
-59.46% kobo/apps/openrosa/apps/viewer/views.py
64
42.22
-46.67% kobo/apps/openrosa/apps/logger/utils/counters.py
63
33.96
-59.43% kobo/apps/openrosa/apps/api/viewsets/briefcase_api.py
61
0.0
-63.54% kobo/apps/openrosa/apps/logger/tasks.py
59
48.31
-50.0% kobo/apps/openrosa/apps/api/viewsets/xform_submission_api.py
57
30.5
-28.5% kpi/utils/xml.py
54
24.51
-52.94% kobo/apps/openrosa/apps/logger/views.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
28.85
-69.23% kobo/apps/openrosa/apps/logger/import_tools.py
34
60.77
-18.78% kobo/apps/openrosa/apps/viewer/models/data_dictionary.py
34
55.42
-40.96% kobo/apps/openrosa/libs/renderers/renderers.py
33
52.87
-37.93% kobo/apps/openrosa/apps/viewer/models/export.py
33
70.98
-12.95% kobo/apps/openrosa/apps/viewer/models/parsed_instance.py
30
0.0
-75.0% kobo/apps/openrosa/apps/django_digest_backends/cache.py
30
26.67
-50.0% kobo/apps/openrosa/libs/utils/image_tools.py
28
0.0
-27.72% kpi/password_validation.py
27
34.0
-54.0% kobo/apps/data_collectors/authentication.py
26
27.78
-72.22% kobo/apps/openrosa/libs/utils/decorators.py
25
63.71
-20.16% kobo/apps/openrosa/apps/logger/models/attachment.py
24
75.13
-12.44% kobo/apps/openrosa/apps/logger/models/xform.py
23
71.96
-12.17% kobo/apps/openrosa/apps/logger/models/instance.py
22
29.66
-18.64% kobo/apps/openrosa/libs/utils/viewer_tools.py
22
36.84
-57.89% kpi/parsers.py
21
36.36
-63.64% kobo/apps/openrosa/libs/utils/user_auth.py
20
47.3
-27.03% kobo/apps/openrosa/apps/main/models/meta_data.py
20
43.9
-48.78% kobo/apps/openrosa/libs/filters.py
17
41.94
-54.84% kobo/apps/openrosa/libs/authentication.py
17
58.2
-13.11% kobo/apps/openrosa/libs/utils/middleware.py
16
74.12
2.94% kpi/utils/django_orm_helper.py
15
20.0
-60.0% kobo/apps/openrosa/apps/api/utils/xml.py
15
34.38
-46.88% kobo/apps/openrosa/apps/logger/xform_fs.py
15
67.62
-4.76% kpi/utils/object_permission.py
14
81.45
-8.87% kobo/apps/openrosa/apps/logger/signals.py
14
84.73
22.14% kobo/apps/openrosa/apps/logger/utils/instance.py
13
70.34
23.6% kobo/apps/audit_log/models.py
13
55.13
-12.82% kpi/authentication.py
11
54.29
-31.43% kpi/utils/form_versions.py
11
45.16
-17.74% kpi/views/v2/attachment.py
10
36.14
0.0% kpi/utils/storage.py
9
56.82
-13.64% kobo/apps/data_collectors/signals.py
9
47.62
-21.43% kobo/apps/markdownx_uploader/models.py
8
50.0
-50.0% kobo/apps/openrosa/libs/utils/model_tools.py
8
51.7
12.12% kpi/deployment_backends/openrosa_backend.py
7
67.74
-22.58% kobo/apps/data_collectors/models.py
7
32.61
-15.22% kobo/apps/openrosa/apps/api/tools.py
7
30.0
-70.0% kobo/apps/openrosa/libs/utils/string.py
7
70.09
-1.87% kpi/utils/mongo_helper.py
6
69.57
-26.09% kobo/apps/openrosa/libs/permissions.py
6
73.43
11.68% kpi/models/asset.py
5
33.1
-3.52% kobo/apps/mass_emails/user_queries.py
5
85.71
-8.93% kobo/apps/openrosa/apps/logger/exceptions.py
5
50.0
-50.0% kobo/apps/openrosa/libs/mixins/openrosa_headers_mixin.py
4
83.57
23.57% kobo/apps/audit_log/signals.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
80.0
-20.0% kobo/apps/openrosa/apps/viewer/signals.py
3
60.0
-30.0% kobo/apps/openrosa/libs/serializers/data_serializer.py
3
60.0
-30.0% kpi/mixins/mfa.py
2
86.49
0.0% kobo/urls.py
2
63.64
5.45% kpi/signals.py
1
53.13
0.0% kobo/apps/accounts/mfa/utils.py
1
75.0
-25.0% kobo/apps/audit_log/mixins.py
1
76.47
5.08% kpi/mixins/object_permission.py
1
42.4
-0.46% kpi/renderers.py
1
81.25
0.0% kpi/utils/drf_exceptions.py
Jobs
ID Job ID Ran Files Coverage
1 42988289447.1 11 Nov 2026 08:40AM UTC 885
57.39
2 42988289447.2 11 Nov 2026 08:41AM UTC 885
54.38
3 42988289447.3 11 Nov 2026 08:42AM UTC 885
49.99
4 42988289447.4 11 Nov 2026 08:43AM UTC 885
59.41
5 42988289447.5 11 Nov 2026 08:43AM UTC 887
51.36
6 42988289447.6 11 Nov 2026 08:44AM UTC 887
55.71
7 42988289447.7 11 Nov 2026 08:44AM UTC 887
60.59
8 42988289447.8 11 Nov 2026 08:44AM UTC 887
58.98
9 42988289447.9 11 Nov 2026 08:45AM UTC 888
66.39
10 42988289447.10 11 Nov 2026 08:45AM UTC 890
68.9
Source Files on build 42988289447
  • Tree
  • List 890
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b0c29b8d on github
  • Prev Build on main (#42902333082)
  • Next Build on main (#43002679339)
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