mirror of
https://github.com/langgenius/dify.git
synced 2026-06-19 00:21:10 +08:00
Pause-time token emission now draws only from the recipient set each API surface is allowed to act on (emit ⊆ validate), so the CLI/OpenAPI caller is never handed a token the resume endpoint would reject as 404 (WTA-867). A form's recipients are partitioned once, per surface, into a single FormDisposition: the surface-actionable recipient yields `form_token`, while the rest are reported as `approval_channels` (e.g. ["email", "console"]) so the caller is told where approval actually happens. Token and channels are two projections of one decision (disposition_for_surface) loaded by one recipient query (load_form_dispositions_by_form_id); the live pause path and the reconnect snapshot path consume the same FormDisposition so they cannot drift. RecipientType carries its user-facing approval-channel label as an enum tuple value, set in __new__, so a new recipient type cannot be declared without one. Tests: consolidate recipient/disposition/enrich tests into parametrized matrices, add CONSOLE-surface and empty-token coverage, extract a shared fake session for the pause-event tests. |
||
|---|---|---|
| .. | ||
| auth | ||
| __init__.py | ||
| conftest.py | ||
| test_account.py | ||
| test_app_describe_query.py | ||
| test_app_list_query.py | ||
| test_app_payloads.py | ||
| test_app_run_dispatch.py | ||
| test_app_run_rate_limit.py | ||
| test_app_run_streaming.py | ||
| test_apps_permitted_external_query.py | ||
| test_audit_app_run.py | ||
| test_contract.py | ||
| test_cors.py | ||
| test_device_approve_deny.py | ||
| test_device_code.py | ||
| test_device_lookup.py | ||
| test_device_sso.py | ||
| test_device_token.py | ||
| test_error_contract.py | ||
| test_health.py | ||
| test_human_input_form.py | ||
| test_input_schema.py | ||
| test_meta_version.py | ||
| test_models.py | ||
| test_oauth_sso_claims.py | ||
| test_oauth_sso_csrf.py | ||
| test_oauth_sso_host_header.py | ||
| test_pagination_envelope.py | ||
| test_workflow_events_openapi.py | ||
| test_workspaces_members.py | ||
| test_workspaces.py | ||