Files
dify/api/services/dify_builder/action_policy.py
T
twwu c899d8c2c0 fix(builder): align conflict checks across execution layers
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.
2026-10-15 16:56:57 +08:00

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
)