fix: allow dedicated flow substeps to inherit parent tag (#8832)

Flow substeps that inherit the parent flow's tag were re-validated
against CUSTOM_TAGS, which rejected dedicated flow tags
(`{workspace_id}:flow/{path}`) since they are never user-registered.
The parent flow's tag was already validated at push time, so skip the
redundant check when the substep simply inherits it.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-04-14 16:38:37 -04:00
committed by GitHub
parent 91064ce857
commit aebf758412

View File

@@ -3703,8 +3703,14 @@ async fn push_next_flow_job(
)
};
// Check tag availability for flow substeps to prevent abuse
if let Some(tag_str) = tag.as_deref().filter(|t| !t.is_empty()) {
// Check tag availability for flow substeps to prevent abuse.
// Skip when the substep inherits the parent flow's tag: that tag was already
// validated at flow push time, and for dedicated flows it is the auto-generated
// `{workspace_id}:flow/{path}` tag which is never in CUSTOM_TAGS.
if let Some(tag_str) = tag
.as_deref()
.filter(|t| !t.is_empty() && *t != flow_job.tag.as_str())
{
check_tag_available_for_workspace_internal(
&db,
&flow_job.workspace_id,