Refactor cli-proxy feature into tools.github.mode (gh-proxy) with codemod migration#27707
Refactor cli-proxy feature into tools.github.mode (gh-proxy) with codemod migration#27707
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7b5d2440-7c1b-491b-bd25-f0d9392eb63c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7b5d2440-7c1b-491b-bd25-f0d9392eb63c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7b5d2440-7c1b-491b-bd25-f0d9392eb63c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot remove "mcp" mode entry since it is already present as "local" |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/471ad04d-dba6-44a3-b5a8-739ee709f5f9 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
✅ Smoke CI completed successfully! |
|
@copilot the mode update needs to be reflected in the main json schema |
|
🤖 smoke-ci: PR #27707 check passed. Run URL: https://github.com/github/gh-aw/actions/runs/24751468124 |
Generated by the Design Decision Gate workflow to document the architectural decision to consolidate GitHub access semantics from features.cli-proxy into tools.github.mode with cli/local/remote values. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Commit pushed:
|
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (479 new lines) but does not have a linked Architecture Decision Record (ADR). AI has analyzed the PR diff and generated a draft ADR to help you get started: 📄 Draft ADR: What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. Draft SummaryThe generated ADR captures the following decision:
📋 Key trade-offs captured in the draftPositive
Negative
📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
References: §24751474414
|
🧪 Test Quality Sentinel ReportTest Quality Score: 86/100✅ Excellent test quality
Test Classification DetailsView all 8 test cases
Flagged Tests — Requires Review
|
| Test file | Test lines added | Prod file | Prod lines added | Ratio |
|---|---|---|---|---|
compiler_difc_proxy_test.go |
37 | compiler_difc_proxy.go |
2 | 18.5:1 |
unified_prompt_step_test.go |
24 | unified_prompt_step.go |
2 | 12:1 |
Context: These tests cover behavioral changes driven by mcp_github_config.go (+44 lines) and the new tools.github.mode semantics spread across several files. The inflation is an artefact of the refactoring distributing logic across files rather than a sign of low-value test generation. The tests themselves are high quality.
Language Support
Tests analyzed:
- 🐹 Go (
*_test.go): 8 test cases — all unit (//go:build !integration) ✅ - 🟨 JavaScript (
*.test.cjs,*.test.js): 0 tests in this PR
Verdict
✅ Check passed. 0% of new tests are implementation tests (threshold: 30%). All 8 new test cases verify behavioral contracts with good edge-case coverage. One advisory: add descriptive assertion messages to
TestCliProxyFeatureToGitHubModeCodemodper project guidelines.
📖 Understanding Test Classifications
Design Tests (High Value) verify what the system does:
- Assert on observable outputs, return values, or state changes
- Cover error paths and boundary conditions
- Would catch a behavioral regression if deleted
- Remain valid even after internal refactoring
Implementation Tests (Low Value) verify how the system does it:
- Assert on internal function calls (mocking internals)
- Only test the happy path with typical inputs
- Break during legitimate refactoring even when behavior is correct
- Give false assurance: they pass even when the system is wrong
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.
References: §24751474387
🧪 Test quality analysis by Test Quality Sentinel · ● 696.6K · ◷
There was a problem hiding this comment.
✅ Test Quality Sentinel: 86/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 8 new test cases verify behavioral contracts. One advisory: add descriptive assertion messages to TestCliProxyFeatureToGitHubModeCodemod per project guidelines.
|
@copilot rename mode "cli" to mode "gh-proxy" |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/14702ad8-f051-435e-bf54-3d602a5ec42d Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in fb80598. 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:
|
|
@copilot review changes, add integration workflow test |
|
@copilot update instructions to favor gh-proxy for performance reasons. |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/46b8d71c-54a4-4f6b-a629-7b6e61b10f31 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/46b8d71c-54a4-4f6b-a629-7b6e61b10f31 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Implemented in 00f8ef3 (integration test added in 17c78e0). I reviewed and hardened the changes by normalizing/validating 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:
|
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6d365dc2-a8b2-41e6-82fe-41fb8ea02c2c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in 87c43d8. I changed the 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:
|
|
@copilot remove mentions of features.cli-proxy in a instructions. |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1ec49304-0632-437d-bbb7-18564b8508b6 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in 978afa2. I removed 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:
|
Add new glossary entries for terms introduced in recent changes: - GitHub Access Mode (tools.github.mode / gh-proxy) from PR #27707 - Comment Memory (tools.comment-memory) from PR #27479 - Supersede Older Reviews (supersede-older-reviews) from PR #27662 - Update AWF entry to mention sandbox.agent.version from PR #27626 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The tools.github.mode field now accepts three values: local (default), remote, and gh-proxy. The gh-proxy mode was introduced in #27707 as the preferred alternative to the legacy features.cli-proxy flag, but was not yet reflected in the github-tools.md reference page. Expands the "GitHub Tools Remote Mode" section into "GitHub Tools Access Modes" with a summary table and prose for each of the three modes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
features.cli-proxybehavior intotools.github.modewithgh-proxy|local|remotesemantics.tools.github.mode: gh-proxy(with legacy fallback preserved only when mode is unset).mcpfromtools.github.modeand aligned MCP behavior withmode: local.tools.github.typesupport for MCP transport (local|remote) while preserving legacymode: local|remotecompatibility.features.cli-proxy: truetotools.github.mode: gh-proxy.tools.github.mode: cliwhile standardizing ongh-proxy.tools.github.typeand legacymodevalues are trimmed/lowercased and invalid values safely fall back to defaultlocal.tools.github.mode: gh-proxywith a new fixture workflow (pkg/cli/workflows/test-copilot-gh-proxy.md) and integration test (pkg/workflow/github_mode_gh_proxy_integration_test.go).v0.25.17+).tools.github.mode: gh-proxyfor performance reasons.Validation
go test -v -run "TestGitHubRemoteModeHelperFunctions" ./pkg/workflowgo test -tags=integration -v -run "TestGitHubProxyModeIntegration" ./pkg/workflowmake buildgo test -v -run "TestMainWorkflowSchema_WorkflowDispatchNumberTypeDocumentation|TestValidateWithSchema" ./pkg/parsermake agent-finishwas run and still fails on pre-existingsecurity-gosecfindings unrelated to this change.smoke-ci: run https://github.com/github/gh-aw/actions/runs/24751468124
> Generated by Smoke CI for issue #27707 · ● 438.4K · ◷