Consolidate safe-outputs into single job with file-based JavaScript bundling#6806
Conversation
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
…erations into a single job Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
…hitecture Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
|
@copilot make consolidated the default, remove other modes, cleanup dead code |
…ividual job code Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Made consolidated the default and only mode, removed the |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot migrate mor tests |
|
@copilot merge main and fix more tests |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot merge main and fix more tests |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
@copilot when inlining a script in github-script, also add code to expose the builtin object of github-script on the global javascript object (core, github, context, exec) See error https://github.com/githubnext/gh-aw/actions/runs/20345071226/job/58455290507 |
…balThis for required modules Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added code to expose the github-script built-in objects on the global JavaScript object. When scripts are inlined, a preamble is now added that sets 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
This PR is adding more lines to each workflows and this isn't ideal since we are already at the limits of file sizes. |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
Copilot Engine Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall Status: PASS cc
|
Smoke Test ResultsLast 2 merged PRs:
✅ GitHub MCP - Retrieved last 2 PRs Overall: PASS
|
Smoke Test: Claude Engine - PASSRecent PRs:
Test Results:
Overall: PASS (5/6 tests passed, 1 tool not available)
|
|
PRs: Consolidate git repository helper functions into centralized utilities; Add .invalid.yml cleanup to compile --purge
|
All safe outputs are now combined into a single
safe_outputsjob with multiple steps, reducing GitHub Actions job overhead while maintaining observability through step IDs. JavaScript files are written to disk and use relativerequire()paths (./file.cjs) to load local modules.Summary
This PR consolidates all safe output operations into a single GitHub Actions job and implements file-based JavaScript that maximizes module reuse by writing files to disk and requiring them at runtime using local paths.
Key Changes
Consolidated Safe Outputs Job
compiler_safe_output_jobs.go- Simplified to always use consolidated modecompiler_safe_outputs_consolidated.go- Contains the consolidated job builder with all env varscompiler_safe_output_jobs_individual.go- Individual job mode removedbuild*Jobfunctions that created individual jobs (dead code cleanup)safe_outputs:job with step IDsFile-Based JavaScript with Script Inlining
The bundler now properly handles GitHub Script steps:
add_comment.cjs) is embedded directly in the YAML/tmp/gh-aw/scripts/via a "Setup JavaScript files" step./helper.cjs) become absolute (/tmp/gh-aw/scripts/helper.cjs)await main();becomes(async () => { await main(); })();globalThisso required modules can access them:This approach works because:
globalThisrequire()and can accessglobalThis.core, etc.New Functions
GetInlinedScriptForFileMode()- Gets and transforms the main script for inlining, adds globals preambleCollectScriptDependencies()- Collects only dependencies (not the main script) to write to diskBenefits
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.