Conversation
…, unmerged meta fields, Serena languages - Add 11 missing operation type cases to hasSafeOutputType() switch statement - Fix 7 SafeOutputsConfig yaml struct tags to use singular form matching schema keys - Add merge logic for Footer, AllowGitHubReferences, GroupReports, MaxBotMentions, Mentions meta fields - Expand Serena languages schema enum from 6 to all 32 supported languages Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Hey ✅ What's Great:
While the changes are correct, they lack test coverage for the bugs being fixed. According to the testing guidelines, bug fixes should include regression tests to prevent reoccurrence. Specifically:
If you'd like a hand, you can use this prompt:
|
|
@copilot add tests |
There was a problem hiding this comment.
Pull request overview
Fixes multiple silent failures in the safe-outputs pipeline by improving import conflict detection, aligning safe-outputs YAML serialization with the schema, ensuring imported safe-outputs meta fields aren’t dropped, and expanding Serena language schema validation.
Changes:
- Expanded
hasSafeOutputType()to include previously-missing safe-output operation keys so import conflicts are correctly detected. - Added import-merge handling for additional safe-outputs meta fields (footer/mentions/etc.).
- Updated schema + types to reduce YAML/schema mismatches (safe-outputs keys) and broaden Serena
languagesenum coverage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/workflow/imports.go | Adds missing safe-output type detection and merges additional safe-outputs meta fields from imports. |
| pkg/workflow/compiler_types.go | Updates several SafeOutputsConfig YAML tags to match schema-safe singular keys. |
| pkg/parser/schemas/main_workflow_schema.json | Expands Serena languages enum to match supported runtime languages. |
Comments suppressed due to low confidence (3)
pkg/workflow/compiler_types.go:489
CreateCodeScanningAlertsstill uses the YAML tagcreate-code-scanning-alerts, but the schema and parsing logic use the singular keycreate-code-scanning-alert. This will continue to emit invalid YAML when marshalingSafeOutputsConfig(and can fail schema validation withadditionalProperties: false). Update the struct tag to the singular key to match the schema.
CreatePullRequestReviewComments *CreatePullRequestReviewCommentsConfig `yaml:"create-pull-request-review-comment,omitempty"`
SubmitPullRequestReview *SubmitPullRequestReviewConfig `yaml:"submit-pull-request-review,omitempty"` // Submit a PR review with status (APPROVE, REQUEST_CHANGES, COMMENT)
ReplyToPullRequestReviewComment *ReplyToPullRequestReviewCommentConfig `yaml:"reply-to-pull-request-review-comment,omitempty"` // Reply to existing review comments on PRs
ResolvePullRequestReviewThread *ResolvePullRequestReviewThreadConfig `yaml:"resolve-pull-request-review-thread,omitempty"` // Resolve a review thread on a pull request
CreateCodeScanningAlerts *CreateCodeScanningAlertsConfig `yaml:"create-code-scanning-alerts,omitempty"`
pkg/workflow/imports.go:673
- The merge condition for
AllowGitHubReferencesuseslen(result.AllowGitHubReferences) == 0, which treats an explicitly-configured empty list (meaning “allow none”) the same as “unset” and will overwrite it with imported values. Use a nil check (e.g.,result.AllowGitHubReferences == nil) to only import when the field wasn’t configured in the main workflow.
if len(result.AllowGitHubReferences) == 0 && len(importedConfig.AllowGitHubReferences) > 0 {
result.AllowGitHubReferences = importedConfig.AllowGitHubReferences
pkg/workflow/imports.go:683
- New merge behavior for the additional meta fields (
footer,allowed-github-references,group-reports,max-bot-mentions,mentions) doesn’t appear to be covered by the existing safe-outputs import tests (which already validate other meta fields likeallowed-domains,env, etc.). Add/extend tests to assert these new fields are imported and that main-workflow values take precedence when set.
// Merge additional meta-configuration fields
if result.Footer == nil && importedConfig.Footer != nil {
result.Footer = importedConfig.Footer
}
if len(result.AllowGitHubReferences) == 0 && len(importedConfig.AllowGitHubReferences) > 0 {
result.AllowGitHubReferences = importedConfig.AllowGitHubReferences
}
if !result.GroupReports && importedConfig.GroupReports {
result.GroupReports = true
}
if result.MaxBotMentions == nil && importedConfig.MaxBotMentions != nil {
result.MaxBotMentions = importedConfig.MaxBotMentions
}
if result.Mentions == nil && importedConfig.Mentions != nil {
result.Mentions = importedConfig.Mentions
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… merges, and Serena schema enum Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added tests in
|
|
@copilot merge main and recompile |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Merged main and recompiled all 158 workflow lock files in commit 0a54f3f. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot merge main and fix https://github.com/github/gh-aw/actions/runs/22314510716/job/64557689936 |
…L errors; merge main Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Merged main and fixed the CI failure in commit 5e756b7. The Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
hasSafeOutputType()switch: add 11 missing operation type casesSafeOutputsConfigyaml tags: change 7 plural tags to singular to match schema keysmergeSafeOutputConfig(): add merge logic for 5 missing meta fieldslanguagesschema enum: expand from 6 to all 32 supported languagessafe_outputs_fix_test.goTestMCPRegistryClient_LiveResponseStructureto skip on stream/CANCEL network errorsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.