fix: populate checks for every failing step in buildLaunchStrictJsonReport; extract helper functions#63
Draft
Copilot wants to merge 3 commits into
Draft
Conversation
Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>
…; extract runRuntimeChecks/runRepoChecks/runInfraChecks helpers Co-authored-by: clduab11 <185000089+clduab11@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor launch-gated global CLI/daemon appliance
fix: populate checks for every failing step in buildLaunchStrictJsonReport; extract helper functions
Mar 7, 2026
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.
The
report.stepsloop inbuildLaunchStrictJsonReportonly pushed entries intofixesfor failing steps — it never added a correspondingLaunchGateCheckentry. This meant gate steps likerepo.preflight,codex.auth,mcp.up, anddoctor.strictwere silently absent from thechecksarray in the strict JSON output even when they failed.Changes
if (step.ok || !step.remediation) continueto always emit a{ status: 'fail' }check for every failing step, then conditionally emit fixes only when a remediation string exists. Fallbackdetailnow uses`${step.id} failed`instead of a generic string.Refactor — decompose
buildLaunchStrictJsonReport: Extracted three focused helpers from the previously ~157-line monolith:runRuntimeChecks(spawnCommand, cwd)— Node.js, npm, dependency integrity, optional engine detection; returns{ checks, fixes, capabilityAdditions }runRepoChecks(spawnCommand, cwd)— build, typecheck, test script checksrunInfraChecks(report, cwd)— daemon health, MCP config, worktree state locationbuildLaunchStrictJsonReportnow composes their results, runs the fixed step loop, then computesok/nextActions.Tests: Added
describe('buildLaunchStrictJsonReport')with 3 new targeted tests covering checks population for failing steps, fix emission gated on remediation presence, and passing steps excluded from checks.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.