Description
validateSharedWorkflowFields (pkg/parser/schema_validation.go:52-86) iterates frontmatter via for key := range frontmatter — a Go map, whose iteration order is randomized per-run. When a shared workflow has multiple forbidden fields, the resulting error message (built from forbiddenFound at lines 83/85) lists them in non-deterministic order across compiler runs. The generic forbidden-field error also omits any "here's what IS allowed" guidance, even though the file already has that list (sharedWorkflowAllowedOnFieldList, used for the on-field case at line 155).
Expected Impact
Deterministic, reproducible error messages (useful for golden tests and bug reports that currently can't rely on message stability), plus more actionable guidance for authors fixing a shared-workflow frontmatter.
Suggested Fix
Sort forbiddenFound before formatting the multi-field error (line 85). Consider enriching the single/multi-field forbidden-field messages with a short pointer to what IS allowed in shared workflows, mirroring the existing on-field error's use of sharedWorkflowAllowedOnFieldList.
Code Region: pkg/parser/schema_validation.go:52-86
Suggested Agent
Developer (Go)
Estimated Effort
Quick (< 1 hour)
Data Source
DeepReport Intelligence Briefing, 2026-10-08 (cycle 3). Source discussion #66921. Live-verified today: validateSharedWorkflowFields does iterate a map with for key := range frontmatter, and the forbidden-field error at lines 83/85 does not reference the allowed-field list.
Generated by 🔬 Deep Report · claude · agent · 343.4 AIC · ⌖ 9.25 AIC · ⊞ 7.1K · ◷
Description
validateSharedWorkflowFields(pkg/parser/schema_validation.go:52-86) iteratesfrontmatterviafor key := range frontmatter— a Go map, whose iteration order is randomized per-run. When a shared workflow has multiple forbidden fields, the resulting error message (built fromforbiddenFoundat lines 83/85) lists them in non-deterministic order across compiler runs. The generic forbidden-field error also omits any "here's what IS allowed" guidance, even though the file already has that list (sharedWorkflowAllowedOnFieldList, used for theon-field case at line 155).Expected Impact
Deterministic, reproducible error messages (useful for golden tests and bug reports that currently can't rely on message stability), plus more actionable guidance for authors fixing a shared-workflow frontmatter.
Suggested Fix
Sort
forbiddenFoundbefore formatting the multi-field error (line 85). Consider enriching the single/multi-field forbidden-field messages with a short pointer to what IS allowed in shared workflows, mirroring the existingon-field error's use ofsharedWorkflowAllowedOnFieldList.Code Region:
pkg/parser/schema_validation.go:52-86Suggested Agent
Developer (Go)
Estimated Effort
Quick (< 1 hour)
Data Source
DeepReport Intelligence Briefing, 2026-10-08 (cycle 3). Source discussion #66921. Live-verified today:
validateSharedWorkflowFieldsdoes iterate a map withfor key := range frontmatter, and the forbidden-field error at lines 83/85 does not reference the allowed-field list.