-
Notifications
You must be signed in to change notification settings - Fork 37
Add test coverage for compiler core files (2,291 untested lines) #10756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Created compiler_test.go with 14 test functions - Created compiler_orchestrator_test.go with 14 test functions - Created compiler_activation_jobs_test.go with 13 test functions - Total: 41 new test functions covering core compilation logic Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Fixed test expectations to match actual implementation behavior - Updated engine detection to use AI field - Corrected network permissions tests - Fixed internal marker removal test to match actual behavior - All new compiler tests now passing Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Summary: - 41 new test functions across 3 test files - compiler_test.go: 12 tests (CompileWorkflow, CompileWorkflowData) - compiler_orchestrator_test.go: 12 tests (ParseWorkflowFile, helpers) - compiler_activation_jobs_test.go: 17 tests (job building functions) - All tests passing - Code formatted and ready for review Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add test coverage for compiler files with zero coverage
Add test coverage for compiler core files (2,291 untested lines)
Jan 19, 2026
Contributor
|
@copilot merge main, and recompile. |
…ot/add-test-coverage-to-compiler-files
Contributor
Author
4 tasks
9 tasks
pelikhan
pushed a commit
that referenced
this pull request
Jan 20, 2026
* Initial plan * docs: add test file linting requirements to AGENTS.md Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
This was referenced Jan 20, 2026
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.
Plan: Add Test Coverage for Compiler Files ✅ COMPLETE
Phase 1: Create Test Infrastructure ✅
pkg/workflow/compiler_test.go(12 tests)pkg/workflow/compiler_orchestrator_test.go(12 tests)pkg/workflow/compiler_activation_jobs_test.go(17 tests)Phase 2: compiler.go Tests ✅
CompileWorkflow()- basic workflow compilationCompileWorkflow()- error handling for missing filesCompileWorkflow()- error handling for invalid frontmatterCompileWorkflowData()- workflow data compilationPhase 3: compiler_orchestrator.go Tests ✅
ParseWorkflowFile()- valid main workflowParseWorkflowFile()- valid shared workflow (no 'on' field)ParseWorkflowFile()- missing frontmatter errorParseWorkflowFile()- invalid YAML frontmatterParseWorkflowFile()- path traversal protectionParseWorkflowFile()- engine config extractionParseWorkflowFile()- engine overrideParseWorkflowFile()- network permissions extractionParseWorkflowFile()- strict mode validationcopyFrontmatterWithoutInternalMarkers(),detectTextOutputUsage()Phase 4: compiler_activation_jobs.go Tests ✅
buildPreActivationJob()- with permission checkbuildPreActivationJob()- without permission checkbuildPreActivationJob()- with stop-timebuildPreActivationJob()- with reaction (eyes, rocket, none, empty)buildPreActivationJob()- with custom steps/outputsbuildPreActivationJob()- integration test with all featuresbuildActivationJob()- basic activationbuildActivationJob()- with pre-activation dependencybuildActivationJob()- with reactionbuildActivationJob()- with workflow_run repo safetybuildMainJob()- basic main jobbuildMainJob()- with activation dependencybuildMainJob()- with permissionsbuildMainJob()- different engines (copilot, claude, codex)extractPreActivationCustomFields()- no custom jobextractPreActivationCustomFields()- with custom fieldsextractPreActivationCustomFields()- invalid steps handlingPhase 5: Integration and Validation ✅
✅ SUCCESS SUMMARY
Files Created
pkg/workflow/compiler_test.go(12 tests, 317 lines)compiler.gopkg/workflow/compiler_orchestrator_test.go(12 tests, 360 lines)ParseWorkflowFile()function (792 lines)pkg/workflow/compiler_activation_jobs_test.go(17 tests, 638 lines)Test Coverage Achievement
Test Quality
requirefor setup,assertfor validationsKey Functions Now Tested
CompileWorkflow()- 647 lines (compiler.go)ParseWorkflowFile()- 792 lines (compiler_orchestrator.go)buildPreActivationJob()- 790 lines (compiler_activation_jobs.go)buildActivationJob()- supports complete activation flowbuildMainJob()- validates main job generationThis addresses the issue's requirement to create test files and achieve >50% coverage for each compiler file, making refactoring significantly safer.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.