Make --typecheck a true compile-only mode in launcher#47
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix package health checker issue for daily evaluation
Make Jul 23, 2026
--typecheck a true compile-only mode in launcher
pelikhan
marked this pull request as ready for review
July 23, 2026 13:58
Contributor
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
Contributor
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd — approving. The fix is correct, well-scoped, and the test suite now properly asserts the compile-only contract.
📋 Key Themes & Highlights
Positive Highlights
- ✅ Root cause addressed at both call sites (
runRootAgentFromStdinandrunProgramCodeFromStdin) — no partial fixes - ✅ Tests upgraded from 'does not reject' to asserting
createSessionis not called — a proper regression spec - ✅ New inline-stdin test closes the coverage gap for that mode
- ✅
withInjectedRigImporthardening is a neat fix: only injecting referenced symbols avoids syntheticTS6133failures cleanly - ✅
displayPathparameter keeps error messages user-friendly without leaking temp paths
Minor Observation
The agent detection regex (/agent\s*\(/u) will also match a user-defined local function named agent, injecting an import that shadows it. This is a pre-existing edge case (previously the import was always injected), so it is out of scope here — worth noting for a future hardening pass.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 32.8 AIC · ⌖ 5.81 AIC · ⊞ 6.3K
Comment /matt to run again
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.
--typecheckpreviously continued into runtime execution after successful typecheck, which caused misleadingECONNREFUSEDfailures in CI environments without a Copilot server. The launcher now treats typecheck as a compile-only path and exits before runtime/session setup in both program-file and inline-stdin modes.Launcher control-flow fix
runRootAgentFromStdin)runProgramCodeFromStdin)--typecheckmode.Typecheck diagnostics clarity
typecheckProgramnow supports a display path so inline stdin errors are reported asTypecheck failed for <stdin>in the primary error message (instead of temp file path in the header).Inline import injection hardening
withInjectedRigImportnow injects only referenced symbols (agent,p,s) rather than always injecting all three.noUnusedLocals/TS6133failures introduced by synthetic unused imports during inline typecheck.Docs alignment
README.mdandskills/rig/SKILL.mdto state that--typechecktypechecks and exits without execution.