-
Notifications
You must be signed in to change notification settings - Fork 333
[plan] Fix safe-outputs import gaps: missing operation types, YAML tag mismatches, and unmerged meta fields #17907
Copy link
Copy link
Closed
Labels
Description
Context
From schema consistency discussion #17876 (2026-02-23 run, findings 11–13 and two carryovers from Strategy-11).
Objective
Fix four related bugs in the safe-outputs system where import conflict detection, YAML serialization, and field merging produce silent incorrect behavior.
Issues to Fix
1. hasSafeOutputType() missing 11 operation type keys (carryover from Strategy-11)
- File:
pkg/workflow/imports.go:422 - The switch statement is missing 11 operation types, meaning import conflict detection silently passes through conflicts for those types.
- Add all missing operation type keys to the switch in
hasSafeOutputType().
2. Serena languages schema enum restricted to 6 but runtime supports 32 (carryover from Strategy-11)
- File:
pkg/parser/schemas/main_workflow_schema.json(tools.serena.languagesitems.enum) - Schema enum only allows 6 Serena languages, but
SerenaLanguageSupportinruntime_detection.gomaps 32. - Expand the schema
items.enumto match all 32 languages supported bySerenaLanguageSupport, or remove the enum restriction.
3. SafeOutputsConfig plural YAML tags mismatch singular schema keys
- File:
pkg/workflow/compiler_types.go:476-522 - 7 struct fields use plural yaml tags (e.g.,
create-issues) that don't match the singular schema keys (e.g.,create-issue).CreateIssues→ yaml:create-issuesvs schema:create-issueCreateDiscussions,CloseDiscussions,AddComments,CreatePullRequests,CreatePullRequestReviewComments,UpdateIssues— same pattern.
- Parsing uses direct map key lookups so runtime behavior is correct, but marshaling back to YAML would fail
additionalProperties: falsevalidation. - Fix the yaml struct tags to use singular form matching the schema keys.
4. SafeOutputsConfig meta fields not merged from imported workflows
- File:
pkg/workflow/imports.go:655-720 - Five meta fields are never merged when importing workflow configs:
Footer *boolAllowGitHubReferences []stringGroupReports boolMaxBotMentions *stringMentions *MentionsConfig
- Add merge logic for these fields in the import merge function.
Files to Modify
pkg/workflow/imports.gopkg/workflow/compiler_types.gopkg/parser/schemas/main_workflow_schema.json
Acceptance Criteria
-
hasSafeOutputType()switch covers all operation types (no silent pass-through) - Serena
languagesschema enum includes all 32 supported languages -
SafeOutputsConfigyaml tags use singular form matching schema keys - Meta fields (
Footer,AllowGitHubReferences,GroupReports,MaxBotMentions,Mentions) are merged from imported workflow configs - Run
make agent-finishwith no errors before committing - Run
make buildafter schema changes (schemas are embedded via//go:embed)
Generated by Plan Command for issue #discussion #17876
- expires on Feb 25, 2026, 12:04 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.