mirror of
https://github.com/langgenius/dify.git
synced 2026-11-12 14:21:29 +08:00
Share revision exemptions between service admission and queued workers while retaining fixture and session fences. Use executable graph normalization for execution admission and native node bindings. Keep recovery classification separate from handler execution, refresh cached offers before continuing, and reject drift during rebasing. Add service-to-native regression coverage and fix JSON execution context typing.
16 lines
646 B
Python
16 lines
646 B
Python
"""Revision-token policy shared by request admission and queued execution."""
|
|
|
|
from core.dify_builder.models import Action
|
|
|
|
|
|
def requires_app_revision(action: Action) -> bool:
|
|
"""Input values and conversation/model commands do not bind a draft revision.
|
|
|
|
The presence of HTTP fixtures, including an empty fixture list, binds
|
|
testdata to the exact revision admitted by the fixture owner. Session
|
|
versions and the Builder's recovery baseline are independent checks.
|
|
"""
|
|
return action.kind not in {"message", "update_model"} and not (
|
|
action.kind == "provide_testdata" and "http_fixtures" not in action.payload
|
|
)
|