Repository navigation
Conversation
hjlarry
requested review from
CourTeous33,
Mairuis,
QuantumGhost and
laipz8200
as code owners
October 31, 2026 08:20
Contributor
Pyrefly Type Coverage
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-10-31 08:21:47.310481718 +0000
+++ /tmp/pyrefly_pr.txt 2026-10-31 08:21:38.514409382 +0000
@@ -745,7 +745,7 @@
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webhook_service_relationships.py:68:72
ERROR Class `WebhookServiceRelationshipFactory` has no class attribute `_read_cache` [missing-attribute]
- --> tests/test_containers_integration_tests/services/test_webhook_service_relationships.py:546:26
+ --> tests/test_containers_integration_tests/services/test_webhook_service_relationships.py:548:26
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
--> tests/test_containers_integration_tests/services/test_workflow_app_service.py:125:38
ERROR Object of class `NoneType` has no attribute `status` [missing-attribute]
@@ -1202,10 +1202,12 @@
--> tests/test_containers_integration_tests/test_workflow_pause_integration.py:929:27
ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/trigger/conftest.py:37:79
+ERROR Argument `str | None` is not assignable to parameter `workflow_id` with type `SQLCoreOperations[str] | str` in function `models.trigger.WorkflowTriggerLog.__init__` [bad-argument-type]
+ --> tests/test_containers_integration_tests/trigger/test_trigger_e2e.py:207:25
ERROR Argument `dict[str, str | dict[str, str | dict[str, str]]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/trigger/test_trigger_e2e.py:306:21
+ --> tests/test_containers_integration_tests/trigger/test_trigger_e2e.py:310:21
ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
- --> tests/test_containers_integration_tests/trigger/test_trigger_e2e.py:604:49
+ --> tests/test_containers_integration_tests/trigger/test_trigger_e2e.py:611:49
ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
--> tests/unit_tests/commands/test_archive_workflow_runs.py:181:16
ERROR Expected a callable, got `None` [not-callable]
@@ -1605,7 +1607,7 @@
ERROR Object of class `FromClause` has no attribute `drop` [missing-attribute]
--> tests/unit_tests/controllers/trigger/test_trigger.py:46:5
ERROR `_RequestStub` is not assignable to attribute `request` with type `Request` [bad-assignment]
- --> tests/unit_tests/controllers/trigger/test_webhook.py:41:22
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:47:22
ERROR Object of class `Exception` has no attribute `data` [missing-attribute]
--> tests/unit_tests/controllers/web/test_app.py:250:16
ERROR Object of class `ModuleType` has no attribute `web_ns` [missing-attribute]
@@ -4908,8 +4910,6 @@
--> tests/unit_tests/services/test_app_service.py:355:17
ERROR Argument `Literal['advanced-chat', 'agent', 'agent-chat', 'channel', 'chat', 'completion', 'rag-pipeline', 'workflow']` is not assignable to parameter `mode` with type `Literal['advanced-chat', 'agent', 'agent-chat', 'chat', 'completion', 'workflow']` in function `services.entities.app_entities.CreateAppParams.__init__` [bad-argument-type]
--> tests/unit_tests/services/test_app_service.py:356:65
-ERROR `in` is not supported between `Literal['Quota limit reached']` and `None` [not-iterable]
- --> tests/unit_tests/services/test_async_workflow_service.py:344:16
ERROR Argument `BillingInfo` is not assignable to parameter `result` with type `dict[Unknown, Unknown]` in function `TestBillingServiceSubscriptionInfoDataType._assert_billing_info_types` [bad-argument-type]
--> tests/unit_tests/services/test_billing_service.py:1853:41
ERROR Argument `BillingInfo` is not assignable to parameter `result` with type `dict[Unknown, Unknown]` in function `TestBillingServiceSubscriptionInfoDataType._assert_billing_info_types` [bad-argument-type]
@@ -5063,33 +5063,33 @@
ERROR Argument `list[File]` is not assignable to parameter `value` with type `list[object]` in function `services.variable_truncator.VariableTruncator._truncate_array` [bad-argument-type]
--> tests/unit_tests/services/test_variable_truncator.py:751:44
ERROR Argument `dict[str, dict[Unknown, Unknown]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:516:79
+ --> tests/unit_tests/services/test_webhook_service.py:493:79
ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:526:79
+ --> tests/unit_tests/services/test_webhook_service.py:503:79
ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:536:79
+ --> tests/unit_tests/services/test_webhook_service.py:513:79
ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:545:79
+ --> tests/unit_tests/services/test_webhook_service.py:522:79
ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:554:79
+ --> tests/unit_tests/services/test_webhook_service.py:531:79
ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:564:79
+ --> tests/unit_tests/services/test_webhook_service.py:541:79
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:806:88
+ --> tests/unit_tests/services/test_webhook_service.py:783:88
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:833:83
+ --> tests/unit_tests/services/test_webhook_service.py:810:83
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:853:83
+ --> tests/unit_tests/services/test_webhook_service.py:830:83
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:871:86
+ --> tests/unit_tests/services/test_webhook_service.py:848:86
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:890:91
+ --> tests/unit_tests/services/test_webhook_service.py:867:91
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:912:86
+ --> tests/unit_tests/services/test_webhook_service.py:889:86
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:931:86
+ --> tests/unit_tests/services/test_webhook_service.py:908:86
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
- --> tests/unit_tests/services/test_webhook_service.py:949:91
+ --> tests/unit_tests/services/test_webhook_service.py:926:91
ERROR Argument `dict[str, str | dict[str, str]]` is not assignable to parameter `webhook_data` with type `RawWebhookDataDict` in function `services.trigger.webhook_service.WebhookService._validate_http_metadata` [bad-argument-type]
--> tests/unit_tests/services/test_webhook_service_additional.py:249:57
ERROR Argument `dict[str, dict[str, int] | dict[str, str]]` is not assignable to parameter `webhook_data` with type `RawWebhookDataDict` in function `services.trigger.webhook_service.WebhookService.build_workflow_inputs` [bad-argument-type]
|
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (80.32%) is below the adjusted base coverage (87.12%). You can increase the head coverage or adjust the Removed Code Behavior.
Additional details and impacted files@@ Coverage Diff @@
## hjlarry/trigger-renewal-scan #45195 +/- ##
================================================================
- Coverage 88.12% 80.32% -7.80%
================================================================
Files 5587 5532 -55
Lines 334262 323122 -11140
Branches 66811 66169 -642
================================================================
- Hits 294555 259561 -34994
- Misses 34486 59141 +24655
+ Partials 5221 4420 -801
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #39993. Stacked on #45190; merge that PR first.
Move trigger workflow dispatch and execution logging behind injected services, repositories, and gateways. Webhook, plugin-event, and scheduled callers share the dispatch service; plugin-event orchestration moves out of the Celery task.
Workflow queries return detached snapshots with tenant, app, and workflow ownership checks. Producer log writes use short transactions that finish before billing and broker calls, and invocation-failure records are persisted atomically. Existing queue selection, task payloads, quota reservations, and per-event error isolation are preserved.
Replace mock-heavy dispatch tests with real SQLite, local Billing HTTP, and in-memory Celery coverage. The existing gap between successful broker publication and recording the task ID remains; this change does not introduce an outbox. Broader webhook, schedule, debug, and execution lifecycle changes remain in subsequent layers.
Screenshots
Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods