Description
A Go type consistency audit (discussion #50840) found the field name TitlePrefix reused for two unrelated concepts across 8 structs in pkg/workflow: a "default title for new content" meaning in create_issue.go, create_discussion.go, create_pull_request.go, create_project.go, versus a "required-title-prefix validation"/deprecated-filter-alias meaning in push_to_pull_request_branch.go, missing_issue_reporting.go, update_issue.go, and safe_outputs_parser.go's SafeOutputFilterConfig.TitlePrefix. Same field name, different semantics, risks confusing future maintainers.
Suggested Changes
- Rename the "default title for new content" variant (in create_issue/create_discussion/create_pull_request/create_project) to
DefaultTitlePrefix
- Have
update_issue.go embed SafeOutputFilterConfig instead of redeclaring its own TitlePrefix
- Update yaml tags/docs/tests referencing the old field name where applicable
Files Affected
pkg/workflow/create_pull_request.go:36
pkg/workflow/create_issue.go:14
pkg/workflow/create_discussion.go:16
pkg/workflow/create_project.go:12
pkg/workflow/push_to_pull_request_branch.go:17
pkg/workflow/missing_issue_reporting.go:20
pkg/workflow/update_issue.go:19
pkg/workflow/safe_outputs_parser.go:20
Success Criteria
Source
Extracted from Typist - Go Type Consistency Analysis (discussion #50840)
Priority
Medium - improves maintainability, moderate effort (2-3 hours per audit estimate)
🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 35.3 AIC · ⌖ 4.12 AIC · ⊞ 10.2K · ◷
Description
A Go type consistency audit (discussion #50840) found the field name
TitlePrefixreused for two unrelated concepts across 8 structs inpkg/workflow: a "default title for new content" meaning increate_issue.go,create_discussion.go,create_pull_request.go,create_project.go, versus a "required-title-prefix validation"/deprecated-filter-alias meaning inpush_to_pull_request_branch.go,missing_issue_reporting.go,update_issue.go, andsafe_outputs_parser.go'sSafeOutputFilterConfig.TitlePrefix. Same field name, different semantics, risks confusing future maintainers.Suggested Changes
DefaultTitlePrefixupdate_issue.goembedSafeOutputFilterConfiginstead of redeclaring its ownTitlePrefixFiles Affected
pkg/workflow/create_pull_request.go:36pkg/workflow/create_issue.go:14pkg/workflow/create_discussion.go:16pkg/workflow/create_project.go:12pkg/workflow/push_to_pull_request_branch.go:17pkg/workflow/missing_issue_reporting.go:20pkg/workflow/update_issue.go:19pkg/workflow/safe_outputs_parser.go:20Success Criteria
DefaultTitlePrefixused consistently for the "default title" semantic across the 4 create_* structsupdate_issue.goembedsSafeOutputFilterConfigrather than redeclaringTitlePrefixmake test-unitpasses with no regressionsmake fmtrun after editsSource
Extracted from Typist - Go Type Consistency Analysis (discussion #50840)
Priority
Medium - improves maintainability, moderate effort (2-3 hours per audit estimate)