-
Notifications
You must be signed in to change notification settings - Fork 316
Description
Bug Report
Both missing-tool and missing-data have surprising create-issue behavior: an empty config block silently enables issue creation, while not mentioning the key at all leaves it disabled. These should behave the same way.
Current behavior
Both missing-tool and missing-data have three distinct behaviors:
| Configuration | create-issue value |
|---|---|
| Not mentioned at all | false (auto-enabled, reports only) |
missing-tool: / missing-data: (explicit, nil value) |
true (creates issues) |
missing-tool: false / missing-data: false |
Fully disabled |
The gap between rows 1 and 2 is unintuitive. Writing missing-tool: or missing-data: with no value looks like "I acknowledge the default" but actually changes behavior by enabling issue creation.
Expected behavior
An empty missing-tool: or missing-data: block should behave identically to not mentioning the key at all. Users who want issue creation should explicitly opt in with create-issue: true.
Root cause
Both types share parseIssueReportingConfig (pkg/workflow/missing_issue_reporting.go), which sets CreateIssue: true when the key is present with a nil value (lines 37-42):
// Enabled with no value: missing-data: (nil)
if configData == nil {
cfg.CreateIssue = true // <-- surprising default
cfg.TitlePrefix = defaultTitle
cfg.Labels = []string{}
return cfg
}But the auto-enable path in pkg/workflow/safe_outputs_config.go (lines 302-332) explicitly sets CreateIssue: false:
// missing-tool (lines 307-315)
if _, exists := outputMap["missing-tool"]; !exists {
config.MissingTool = &MissingToolConfig{
CreateIssue: false,
}
}
// missing-data (lines 323-331) — identical pattern
if _, exists := outputMap["missing-data"]; !exists {
config.MissingData = &MissingDataConfig{
CreateIssue: false,
}
}Suggested fix
Change parseIssueReportingConfig so that the nil-value case sets CreateIssue: false, matching the auto-enable behavior. This makes the empty-block and not-mentioned cases consistent.