fix: resolve test coverage regression and locked PR comment failure#1254
Merged
lpcox merged 2 commits intoclaude/fix-issue-20590from Mar 12, 2026
Merged
fix: resolve test coverage regression and locked PR comment failure#1254lpcox merged 2 commits intoclaude/fix-issue-20590from
lpcox merged 2 commits intoclaude/fix-issue-20590from
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [GH-1249] Fix failing Test Coverage workflow
fix: resolve test coverage regression and locked PR comment failure
Mar 12, 2026
Contributor
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes two CI failures: a branch coverage regression from untested API proxy target warning logic, and a 403 error when commenting on locked PRs.
Changes:
- Extract inline warning logic into a testable
emitApiProxyTargetWarningsfunction insrc/cli.tswith 7 unit tests - Add 4 unit tests for
OPENAI_API_TARGET/ANTHROPIC_API_TARGETenv var forwarding ingenerateDockerCompose - Add
continue-on-error: trueto the PR comment step intest-coverage.yml
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/cli.ts | Extract warning logic into exported emitApiProxyTargetWarnings function |
| src/cli.test.ts | Add tests for the new emitApiProxyTargetWarnings function |
| src/docker-manager.test.ts | Add tests for API target env var forwarding |
| .github/workflows/test-coverage.yml | Add continue-on-error: true to PR comment step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
lpcox
added a commit
that referenced
this pull request
Mar 12, 2026
…#1249) * Initial plan * feat: add openai/anthropic api target flags for custom endpoints * Update src/cli.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(proxy): warn when custom api targets are not in --allow-domains Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * fix(ci): skip agentic workflow activation for bot-triggered pull requests (#1250) * Initial plan * fix(ci): skip agentic workflow activation for bot-triggered pull requests Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * fix: resolve pid-tracker integration test failure and add missing test coverage for API target validation (#1251) * Initial plan * fix: resolve failing Build and Lint (Node 22) CI workflow Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * fix(ci): remove unused Setup Scripts step from update_cache_memory jobs (#1252) * Initial plan * fix(ci): remove unused Setup Scripts step from update_cache_memory jobs Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * docs(proxy): document --openai-api-target and --anthropic-api-target in api-proxy-sidecar.md Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> * fix: resolve test coverage regression and locked PR comment failure (#1254) * Initial plan * fix: resolve coverage regression and locked PR comment failure Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com> Co-authored-by: Landon Cox <landon.cox@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
This was referenced Mar 12, 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 "Test Coverage" CI job was failing for two independent reasons: a branch coverage regression introduced by the new
--openai-api-target/--anthropic-api-targetflags, and an unhandled403when trying to comment on a locked PR.Coverage regression fix
The new validation warning logic was inlined inside
program.action()— which is never exercised by unit tests — adding ~10 untested branches and dropping overall branch coverage from 74.82% → 74.03%.Extract into testable function (
src/cli.ts):Call site uses
logger.warn.bind(logger)(no new anonymous function added to the count):emitApiProxyTargetWarningscovering all branch pathsOPENAI_API_TARGET/ANTHROPIC_API_TARGETenv var forwarding ingenerateDockerComposeLocked PR comment fix
Added
continue-on-error: trueto the "Comment PR with coverage comparison" step intest-coverage.yml. Coverage data is still available via job summary and uploaded artifact.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.