[WIP] Extract magic constants from compiler_yaml.go to constants package#12703
Closed
[WIP] Extract magic constants from compiler_yaml.go to constants package#12703
Conversation
- Add FilePath semantic type for file paths - Add ByteSize semantic type for byte sizes - Add PromptFilePath constant for workflow prompt file path - Add DefaultMaxPatchSize constant for max patch size (1024 KB) - Add DefaultYAMLBuilderSize constant (256 KB) - Add MaxChunkSize and ChunkSizeBuffer constants - Add comprehensive tests for new semantic types Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot stopped work on behalf of
pelikhan due to an error
January 30, 2026 09:18
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract Magic Constants to Centralized Constants Package
This PR extracts hardcoded magic values from compiler code to the centralized constants package, improving maintainability and consistency.
Implementation Plan
Identify all magic constants in scope
/tmp/gh-aw/aw-prompts/prompt.txt(compiler_yaml.go lines 281, 287)1024(compiler_safe_outputs_config.go lines 298, 322; create_pull_request.go line 90)256 * 1024(compiler_yaml.go line 179)20900and21000(compiler_yaml.go line 201)Add new constants to pkg/constants/constants.go
Update compiler_yaml.go to use new constants
Update compiler_safe_outputs_config.go to use new constants
Update create_pull_request.go to use new constants
Run tests and validation
Request code review
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.