Skip to content

ci: fix AttributeError: 'Flask' object has no attribute 'login_manager' FAILED #33891#33896

Merged
crazywoola merged 8 commits intolanggenius:mainfrom
asukaminato0721:33891
Mar 23, 2026
Merged

ci: fix AttributeError: 'Flask' object has no attribute 'login_manager' FAILED #33891#33896
crazywoola merged 8 commits intolanggenius:mainfrom
asukaminato0721:33891

Conversation

@asukaminato0721
Copy link
Copy Markdown
Contributor

@asukaminato0721 asukaminato0721 commented Mar 23, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

fix #33891

for reviewer: I port the flaky mock based test to real container based test so no more mock problems.

the diff is huge but only test updates.

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

Copilot AI review requested due to automatic review settings March 23, 2026 05:23
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 23, 2026
gemini-code-assist[bot]

This comment was marked as outdated.

hjlarry
hjlarry previously approved these changes Mar 23, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 23, 2026

This comment was marked as outdated.

fatelei
fatelei previously approved these changes Mar 23, 2026
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 05:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@asukaminato0721
Copy link
Copy Markdown
Contributor Author

FAILED api/tests/unit_tests/controllers/console/app/test_statistic.py::TestStatisticEndpoints::test_average_response_time_statistic - AssertionError: assert <MagicMock name='mock.unauthorized().status_code' id='140628709443104'> == 200
 +  where <MagicMock name='mock.unauthorized().status_code' id='140628709443104'> = <MagicMock name='mock.unauthorized()' id='140628575480880'>.status_code
FAILED api/tests/unit_tests/controllers/console/app/test_statistic.py::TestStatisticEndpoints::test_tokens_per_second_statistic - AssertionError: assert <MagicMock name='mock.unauthorized().status_code' id='140628577490064'> == 200
 +  where <MagicMock name='mock.unauthorized().status_code' id='140628577490064'> = <MagicMock name='mock.unauthorized()' id='140628591748848'>.status_code
FAILED api/tests/unit_tests/controllers/console/app/test_statistic.py::TestStatisticEndpoints::test_invalid_time_range - Failed: DID NOT RAISE <class 'werkzeug.exceptions.BadRequest'>
FAILED api/tests/unit_tests/controllers/console/app/test_statistic.py::TestStatisticEndpoints::test_time_range_params_passed - AssertionError: assert <MagicMock name='mock.unauthorized().status_code' id='140628592790560'> == 200
 +  where <MagicMock name='mock.unauthorized().status_code' id='140628592790560'> = <MagicMock name='mock.unauthorized()' id='140628583593456'>.status_code
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_workflow_variable_collection_get_success - AssertionError: assert <MagicMock na...628706321680'> == {'items': [], 'total': 0}
  
  Use -v to get more diff
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_workflow_variable_collection_get_not_exist - Failed: DID NOT RAISE <class 'controllers.console.app.error.DraftWorkflowNotExist'>
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_workflow_variable_collection_delete - AssertionError: assert <MagicMock name='mock.unauthorized().status_code' id='140628708015808'> == 204
 +  where <MagicMock name='mock.unauthorized().status_code' id='140628708015808'> = <MagicMock name='mock.unauthorized()' id='140628612955120'>.status_code
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_node_variable_collection_get_success - AssertionError: assert <MagicMock na...628612949408'> == {'items': []}
  
  Use -v to get more diff
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_node_variable_collection_get_invalid_node_id - Failed: DID NOT RAISE <class 'controllers.web.error.InvalidArgumentError'>
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_node_variable_collection_delete - AssertionError: assert <MagicMock name='mock.unauthorized().status_code' id='140628584771472'> == 204
 +  where <MagicMock name='mock.unauthorized().status_code' id='140628584771472'> = <MagicMock name='mock.unauthorized()' id='140628606107472'>.status_code
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_variable_api_get_success - AssertionError: assert <MagicMock name='mock.unauthorized().__getitem__()' id='140628708004960'> == 'var_123'
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_variable_api_get_not_found - Failed: DID NOT RAISE <class 'controllers.web.error.NotFoundError'>
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_variable_api_patch_success - AssertionError: assert <MagicMock name='mock.unauthorized().__getitem__()' id='140628607768416'> == 'var_123'
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_variable_api_delete_success - AssertionError: assert <MagicMock name='mock.unauthorized().status_code' id='140628606135200'> == 204
 +  where <MagicMock name='mock.unauthorized().status_code' id='140628606135200'> = <MagicMock name='mock.unauthorized()' id='140628592724688'>.status_code
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_variable_reset_api_put_success - AssertionError: assert <MagicMock name='mock.unauthorized().status_code' id='140628614582912'> == 204
 +  where <MagicMock name='mock.unauthorized().status_code' id='140628614582912'> = <MagicMock name='mock.unauthorized()' id='140628619531264'>.status_code
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_conversation_variable_collection_get - AssertionError: assert <MagicMock na...628583913360'> == {'items': []}
  
  Use -v to get more diff
FAILED api/tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py::TestWorkflowDraftVariableEndpoints::test_system_variable_collection_get - AssertionError: assert <MagicMock na...628589513280'> == {'items': []}

@dosu

@dosubot
Copy link
Copy Markdown

dosubot bot commented Mar 23, 2026

The failing tests are caused by an incomplete fix. Adding monkeypatch.setattr(app, "login_manager", MagicMock(), raising=False) solves the original AttributeError, but a bare MagicMock means login_manager.unauthorized() returns another MagicMock instead of a proper HTTP response.

To fix these tests, you need to configure the mock properly:

@pytest.fixture
def app(monkeypatch):
    flask_app = Flask(__name__)
    flask_app.config["TESTING"] = True
    
    # Configure login_manager mock with proper unauthorized behavior
    mock_login_manager = MagicMock()
    mock_login_manager.unauthorized.return_value = Response(status=401)
    monkeypatch.setattr(flask_app, "login_manager", mock_login_manager, raising=False)
    
    return flask_app

Additionally, ensure g._login_user is set directly in the test request context. The _get_user() function checks for g._login_user before calling login_manager._load_user(), so populating it early will bypass the login_manager path entirely for authenticated test scenarios.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor  Share on X

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 07:33:59.155132925 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 07:33:50.081081105 +0000
@@ -1808,17 +1808,17 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:169:16
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:207:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:216:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:240:16
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:250:16
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:268:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]
@@ -1954,169 +1954,169 @@
 ERROR Cannot set item in `OrderedDict[str, bool | list[str] | str]` [unsupported-operation]
    --> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:134:47
 ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:64:16
 ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:64:16
 ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:64:16
 ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:64:16
 ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:64:16
 ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:64:16
 ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:65:20
 ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:97:16
 ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:97:16
 ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:97:16
 ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:97:16
 ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:97:16
 ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:97:16
 ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
+  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:98:20
 ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:16
 ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:25
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:142:25
 ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:143:16
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:143:16
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:143:16
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:143:16
 ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:143:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:143:16
 ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:25
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:143:25
 ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:16
 ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:25
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:222:25
 ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:223:16
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:223:16
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:223:16
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:223:16
 ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:223:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:223:16
 ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:25
+   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:223:25
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/controllers/console/auth/test_login_logout.py:467:16
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -2126,45 +2126,45 @@
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:207:9
 ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:126:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:328:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:330:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:329:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:331:16
 ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:330:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:332:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:343:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:345:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:361:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:363:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:379:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:381:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:397:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:399:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:417:16
+   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:419:16
 ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:74:16
 ERROR Type `Response` is not iterable [not-iterable]

Copilot AI review requested due to automatic review settings March 23, 2026 11:02
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 11:03:46.996779726 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 11:03:37.905775613 +0000
@@ -794,6 +794,8 @@
 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/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 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/controllers/console/helpers.py:40:48
+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/core/app/layers/test_pause_state_persist_layer.py:97:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:106:20
@@ -1808,17 +1810,9 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:163:16
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:201:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 11:05:36.138100564 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 11:05:27.411169225 +0000
@@ -794,6 +794,8 @@
 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/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 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/controllers/console/helpers.py:40:48
+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/core/app/layers/test_pause_state_persist_layer.py:97:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:106:20
@@ -1808,17 +1810,9 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:163:16
 ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
+   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:201:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@langgenius langgenius deleted a comment from github-actions bot Mar 23, 2026
@langgenius langgenius deleted a comment from github-actions bot Mar 23, 2026
@langgenius langgenius deleted a comment from github-actions bot Mar 23, 2026
@langgenius langgenius deleted a comment from github-actions bot Mar 23, 2026
@langgenius langgenius deleted a comment from github-actions bot Mar 23, 2026
@langgenius langgenius deleted a comment from github-actions bot Mar 23, 2026
@langgenius langgenius deleted a comment from github-actions bot Mar 23, 2026
@asukaminato0721
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a CI failure by migrating several unit tests to more robust integration tests. This is an excellent change that improves test reliability. The new tests are well-structured and comprehensive. I've included one suggestion to refactor a test helper function for better efficiency and adherence to database transaction best practices.

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 11:33:44.743209184 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 11:33:35.440128238 +0000
@@ -793,6 +793,10 @@
    --> tests/test_containers_integration_tests/conftest.py:198:39
 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/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth_server.py:272:16
+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/controllers/console/helpers.py:40:48
 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/core/app/layers/test_pause_state_persist_layer.py:97:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -1807,18 +1811,6 @@
   --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]
@@ -1953,170 +1945,6 @@
   --> tests/unit_tests/controllers/console/app/test_wraps.py:47:16
 ERROR Cannot set item in `OrderedDict[str, bool | list[str] | str]` [unsupported-operation]
    --> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:134:47
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:25
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/controllers/console/auth/test_login_logout.py:467:16
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -2125,46 +1953,6 @@
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:206:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:207:9
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:328:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:329:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:330:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:343:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:361:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:379:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:397:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:417:16
 ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:74:16
 ERROR Type `Response` is not iterable [not-iterable]

Copilot AI review requested due to automatic review settings March 23, 2026 11:34
@asukaminato0721 asukaminato0721 review requested due to automatic review settings March 23, 2026 11:34
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 11:35:53.107358806 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 11:35:44.771426868 +0000
@@ -793,6 +793,10 @@
    --> tests/test_containers_integration_tests/conftest.py:198:39
 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/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth_server.py:272:16
+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/controllers/console/helpers.py:40:48
 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/core/app/layers/test_pause_state_persist_layer.py:97:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -1807,18 +1811,6 @@
   --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]
@@ -1953,170 +1945,6 @@
   --> tests/unit_tests/controllers/console/app/test_wraps.py:47:16
 ERROR Cannot set item in `OrderedDict[str, bool | list[str] | str]` [unsupported-operation]
    --> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:134:47
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:25
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/controllers/console/auth/test_login_logout.py:467:16
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -2125,46 +1953,6 @@
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:206:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:207:9
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:328:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:329:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:330:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:343:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:361:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:379:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:397:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:417:16
 ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:74:16
 ERROR Type `Response` is not iterable [not-iterable]

Copilot AI review requested due to automatic review settings March 23, 2026 11:48
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 11:49:55.632314783 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 11:49:46.317192507 +0000
@@ -794,6 +794,8 @@
 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/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 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/controllers/console/helpers.py:40:48
+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/core/app/layers/test_pause_state_persist_layer.py:97:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:106:20
@@ -1807,18 +1809,6 @@
   --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]
@@ -1953,170 +1943,6 @@
   --> tests/unit_tests/controllers/console/app/test_wraps.py:47:16
 ERROR Cannot set item in `OrderedDict[str, bool | list[str] | str]` [unsupported-operation]
    --> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:134:47
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:25
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/controllers/console/auth/test_login_logout.py:467:16
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -2125,46 +1951,6 @@
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:206:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:207:9
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:328:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:329:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:330:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:343:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:361:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:379:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:397:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:417:16
 ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:74:16
 ERROR Type `Response` is not iterable [not-iterable]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@asukaminato0721
Copy link
Copy Markdown
Contributor Author

==== 1 failed, 13357 passed, 13 skipped, 1354 warnings in 507.59s (0:08:27) ====

finally

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 12:11:38.323955568 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 12:11:29.413892951 +0000
@@ -794,6 +794,8 @@
 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/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 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/controllers/console/helpers.py:40:48
+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/core/app/layers/test_pause_state_persist_layer.py:97:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:106:20
@@ -1807,18 +1809,6 @@
   --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]
@@ -1953,170 +1943,6 @@
   --> tests/unit_tests/controllers/console/app/test_wraps.py:47:16
 ERROR Cannot set item in `OrderedDict[str, bool | list[str] | str]` [unsupported-operation]
    --> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:134:47
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:25
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/controllers/console/auth/test_login_logout.py:467:16
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -2125,46 +1951,6 @@
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:206:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:207:9
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:328:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:329:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:330:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:343:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:361:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:379:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:397:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:417:16
 ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:74:16
 ERROR Type `Response` is not iterable [not-iterable]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-23 12:13:15.850993806 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-23 12:13:06.988924958 +0000
@@ -794,6 +794,8 @@
 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/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 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/controllers/console/helpers.py:40:48
+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/core/app/layers/test_pause_state_persist_layer.py:97:20
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:106:20
@@ -1807,18 +1809,6 @@
   --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
   --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:164:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:202:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:211:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:235:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:245:16
-ERROR Object of class `NoneType` has no attribute `status_code` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow_draft_variable.py:263:16
 ERROR Type `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:83:9
 ERROR Type `AsyncIterable[bytes]` is not iterable [not-iterable]
@@ -1953,170 +1943,6 @@
   --> tests/unit_tests/controllers/console/app/test_wraps.py:47:16
 ERROR Cannot set item in `OrderedDict[str, bool | list[str] | str]` [unsupported-operation]
    --> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:134:47
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:58:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:59:20
-ERROR `in` is not supported between `Literal['sources']` and `bytes` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `(dict[str, Any], StartResponse) -> Iterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[bytes]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `AsyncIterable[str]` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Iterator[bytes]` [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `in` is not supported between `Literal['sources']` and `Response` [not-iterable]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:90:16
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Iterator[str]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `Response` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `bytes` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `list[Any]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-  --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:91:20
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:133:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:134:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:207:25
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:16
-ERROR Cannot index into `Mapping[str, Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_data_source_bearer_auth.py:208:25
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/controllers/console/auth/test_login_logout.py:467:16
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -2125,46 +1951,6 @@
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:206:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/unit_tests/controllers/console/auth/test_oauth.py:207:9
-ERROR `(dict[str, Any], StartResponse) -> Iterable[bytes]` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `AsyncIterable[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[bytes]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Iterator[str]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `bytes` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `list[Any]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `tuple[AsyncIterable[bytes] | AsyncIterable[str] | Iterator[bytes] | Iterator[str] | Mapping[str, Any] | Response | bytes | list[Any] | str, int, Headers | Mapping[str, list[str] | str | tuple[str, ...]] | Sequence[tuple[str, list[str] | str | tuple[str, ...]]]]` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:124:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:328:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:329:16
-ERROR Cannot index into `Response` [bad-index]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:330:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:343:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:361:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:379:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:397:16
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/controllers/console/auth/test_oauth_server.py:417:16
 ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:74:16
 ERROR Type `Response` is not iterable [not-iterable]

@crazywoola crazywoola merged commit d956b91 into langgenius:main Mar 23, 2026
26 of 29 checks passed
@asukaminato0721 asukaminato0721 deleted the 33891 branch March 23, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError: 'Flask' object has no attribute 'login_manager' FAILED

5 participants