dify/api/core/app
GareArc f533e992d4
fix(hitl): scope OpenAPI/Service-API resume to author-configured webapp forms
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.
2026-06-16 16:11:29 -07:00
..
app_config fix: normalize json_schema from string to dict in VariableEntity (#36777) 2026-06-03 04:33:25 +00:00
apps fix(hitl): scope OpenAPI/Service-API resume to author-configured webapp forms 2026-06-16 16:11:29 -07:00
entities fix(hitl): scope OpenAPI/Service-API resume to author-configured webapp forms 2026-06-16 16:11:29 -07:00
features chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
file_access refactor: add missing @override decorator to file access controller and workflow file runtime (#36495) 2026-05-21 19:39:51 +00:00
layers fix: handle GraphRunAbortedEvent in TriggerPostLayer (#37350) 2026-06-12 03:08:02 +00:00
llm perf(api): reduce workflow startup latency for chatflow (#36773) 2026-06-11 07:05:35 +00:00
task_pipeline chore(api): Fix several typing errors (#37237) 2026-06-12 01:36:48 +00:00
workflow feat: support custom trace session id for Phoenix tracing (#37056) 2026-06-04 08:42:03 +00:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00