Add compile-time validation for script runtime mode constraints - #5918
Merged
Conversation
- Add validateNoExecSync for GitHub Script mode - Add validateNoGitHubScriptGlobals for Node.js mode - Integrate validations into RegisterWithMode - Add comprehensive tests for new validations Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add JavaScript Bundler Validation section - Document compile-time validation rules - Explain design rationale for runtime mode constraints Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add compile-time checks in script registry
Add compile-time validation for script runtime mode constraints
Dec 9, 2025
pelikhan
approved these changes
Dec 9, 2025
pelikhan
marked this pull request as ready for review
December 9, 2025 02:34
This was referenced Dec 9, 2025
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.
Scripts in the registry must follow platform conventions: GitHub Script mode cannot use
execSync(asyncexecrequired), Node.js mode cannot use GitHub Actions globals (core.*,exec.*,github.*).Changes
Validation Functions (
pkg/workflow/bundler_validation.go)validateNoExecSync()- DetectsexecSyncusage in GitHub Script modevalidateNoGitHubScriptGlobals()- Detects GitHub Actions globals in Node.js modeScript Registry Integration (
pkg/workflow/script_registry.go)RegisterWithMode()now calls validations before registrationDocumentation (
specs/validation-architecture.md)Tests (
pkg/workflow/bundler_validation_script_registry_test.go)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:
https://api.github.com/user/usr/bin/gh gh api user --jq .login -unreachable=false /tmp/go-build4206891781/b233/vet.cfg /usr/bin/make e mor_annotation_trev-parse bin/grep make buil�� tags/v5 grep by/6f3da1ae4a366d71a291fe57c3bd2465a8927fd549e521d88fbbe6638e99d91e/log.json e ration_test.go ndor/bin/grep 1/x64/bin/npm(http block)/usr/bin/gh gh api user --jq .login /ref/tags/v8 g/timeutil/format_test.go ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile by/6f3da1ae4a366gh -ifaceassert -nilfunc ache/go/1.25.0/x--jq to R�� tags/93cb6efe18208431cddfb8368fd--detach by/6f3da1ae4a366d71a291fe57c3bd2465a8927fd549e521d88fbbe6638e99d91e(http block)/usr/bin/gh gh api user --jq .login le/git/ref/tags/v2 %(refname) f67f0bc70d2d2e0330348d97fb1f8ace6c3/log.json --merged e7141080b38e347c/home/REDACTED/.npm/_npx/6914489a61678098/node_modules/.bin/mcp-server�� rgo/bin/grep git add runs/20251209-021454-8744/test-660994759 -v 1/x64/bin/node e(http block)If you need me to access, download, or install something from one of these locations, you can either:
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.