Repository navigation
Conversation
hjlarry
requested review from
CourTeous33,
QuantumGhost,
crazywoola and
laipz8200
as code owners
October 31, 2026 02:54
Contributor
Pyrefly Type Coverage
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-10-31 02:55:16.384997724 +0000
+++ /tmp/pyrefly_pr.txt 2026-10-31 02:55:06.700911801 +0000
@@ -743,9 +743,9 @@
ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.web.PinnedConversation.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_web_conversation_service.py:270:29
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:67:72
+ --> 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:543:26
+ --> tests/test_containers_integration_tests/services/test_webhook_service_relationships.py:546: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]
@@ -1245,11 +1245,9 @@
ERROR Object of class `int` has no attribute `lower` [missing-attribute]
--> tests/unit_tests/controllers/console/app/test_annotation_security.py:293:35
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
- --> tests/unit_tests/controllers/console/app/test_app_apis.py:132:9
-ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
- --> tests/unit_tests/controllers/console/app/test_app_apis.py:133:9
+ --> tests/unit_tests/controllers/console/app/test_app_apis.py:127:9
ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_app_apis.py:838:51
+ --> tests/unit_tests/controllers/console/app/test_app_apis.py:799:51
ERROR Object of class `App` has no attribute `create_user_name` [missing-attribute]
--> tests/unit_tests/controllers/console/app/test_app_response_models.py:112:5
ERROR Object of class `App` has no attribute `permission_keys` [missing-attribute]
@@ -1607,7 +1605,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:32:22
+ --> tests/unit_tests/controllers/trigger/test_webhook.py:41: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]
@@ -5065,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:504:79
+ --> tests/unit_tests/services/test_webhook_service.py:516: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:514:79
+ --> tests/unit_tests/services/test_webhook_service.py:526: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:524:79
+ --> tests/unit_tests/services/test_webhook_service.py:536: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:533:79
+ --> tests/unit_tests/services/test_webhook_service.py:545: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:542:79
+ --> tests/unit_tests/services/test_webhook_service.py:554: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:552:79
+ --> tests/unit_tests/services/test_webhook_service.py:564: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:794:88
+ --> tests/unit_tests/services/test_webhook_service.py:806: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:821:83
+ --> tests/unit_tests/services/test_webhook_service.py:833: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:841:83
+ --> tests/unit_tests/services/test_webhook_service.py:853: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:859:86
+ --> tests/unit_tests/services/test_webhook_service.py:871: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:878:91
+ --> tests/unit_tests/services/test_webhook_service.py:890: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:900:86
+ --> tests/unit_tests/services/test_webhook_service.py:912: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:919:86
+ --> tests/unit_tests/services/test_webhook_service.py:931: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:937:91
+ --> tests/unit_tests/services/test_webhook_service.py:949: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
Additional details and impacted files@@ Coverage Diff @@
## hjlarry/trigger-workflow-bindings #45188 +/- ##
=====================================================================
+ Coverage 88.10% 88.12% +0.01%
=====================================================================
Files 5584 5586 +2
Lines 334112 334184 +72
Branches 66807 66805 -2
=====================================================================
+ Hits 294384 294491 +107
+ Misses 34504 34474 -30
+ Partials 5224 5219 -5
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:
|
2 of 5 tasks
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 #45172; merge that PR first.
Move App Trigger registration and quota status updates into injected services backed by the shared app trigger repository. Workflow publication now registers, updates and removes triggers in the caller's transaction, so registration rolls back with the published graph. Preserve existing trigger IDs, enablement and provider/type metadata, update nonempty titles, and enable newly registered nodes.
Webhook, plugin-event and scheduled execution receive the same quota status service. It marks only enabled triggers in the affected tenant as rate limited; persistence failures remain logged and do not replace the original quota rejection. Keep SQL in the repository and retain the borrowed publication Session until publication exposes an injected unit of work.
Add real SQLite coverage for publication commit/rollback, tenant/app isolation, metadata preservation and quota-write failures, and extend the PostgreSQL publication test to assert App Trigger rollback. Existing webhook and task callers are adapted to the injected service; their broader runtime migration remains in later layers.
Stack prerequisite
This layer also depends on #44457, which is already merged into main. The current stack base predates that change, so this branch retains its prerequisite merge and GitHub's aggregate diff includes those earlier changes. The new lifecycle changes are isolated in commit 2cabe6c35e. Refreshing the lower stack onto main will remove the prerequisite changes from this PR's diff.
Screenshots
Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods