Configure as a Go CLI tool#1
Closed
Copilot wants to merge 2 commits into
Closed
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Configure project as a Go CLI tool
Configure as a Go CLI tool
Dec 10, 2025
This was referenced Jan 13, 2026
22 tasks
Copilot AI
added a commit
that referenced
this pull request
Jan 20, 2026
- Add ExtractSessionID function to internal/auth/header.go - Update internal/server/auth.go to delegate to auth.ExtractSessionID - Add comprehensive tests for ExtractSessionID - Eliminates duplicate authorization parsing logic (Pattern #1 from issue #352) Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
This was referenced Jan 24, 2026
13 tasks
6 tasks
This was referenced May 25, 2026
This was referenced May 30, 2026
This was referenced Jun 1, 2026
lpcox
added a commit
that referenced
this pull request
Jun 1, 2026
…pan_helpers (#6853) 🤖 *This is a draft PR from Repo Assist, an automated AI assistant.* Addresses recommendation **#1** from the Go Fan review in #6841. ## Summary `span_helpers.go` and `span_helpers_test.go` imported `semconv/v1.27.0` while every other file in `internal/tracing/` used `semconv/v1.34.0`. This creates a mixed schema URL inconsistency in exported traces — spans from `StartDIFCPipelineSpan` and `StartProxyForwardSpan` would carry the v1.27.0 schema URL while all other spans use v1.34.0. ## Root Cause The `span_helpers.go` file was created when the project was on semconv v1.27.0, and wasn't updated when the rest of the tracing package was upgraded to v1.34.0. ## Fix Change the import alias in both files: ```go // Before: semconv "go.opentelemetry.io/otel/semconv/v1.27.0" // After: semconv "go.opentelemetry.io/otel/semconv/v1.34.0" ``` `URLPathKey` (`url.path`) is defined identically in both versions — this is a **zero-risk** change. No `go.mod` changes are needed: `semconv/v1.27.0` and `v1.34.0` are both sub-packages within the existing `go.opentelemetry.io/otel v1.43.0` module. ## Trade-offs - Pure import path change; no API differences at the call sites - Eliminates mixed schema URL in OTel traces (all spans now report `SchemaURL: semconv.SchemaURL` consistently) - `v1.27.0` sub-package becomes unused in the module and can be removed with `go mod tidy` in a future pass Related: #6841 ## Test Status⚠️ **Infrastructure limitation**: Network access to `proxy.golang.org` is blocked in this CI environment, preventing `go build` and `go test` from running. However: - `gofmt` parses both files without error - `URLPathKey` has been defined as `url.path` since semconv v1.20.0 and the definition is unchanged in v1.34.0 - Both versions are sub-packages of the same Go module at the same version, so no module resolution is needed - All other `internal/tracing/` source files already use `v1.34.0` successfully > Generated by [Repo Assist](https://github.com/github/gh-aw-mcpg/actions/runs/26761832881) > [!WARNING] > <details> > <summary>Firewall blocked 1 domain</summary> > > The following domain was blocked by the firewall during workflow execution: > > - `proxy.golang.org` >> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter: > > ```yaml > network: > allowed: > - defaults > - "proxy.golang.org" > ``` > > See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information. > > </details> > Generated by [Repo Assist](https://github.com/github/gh-aw-mcpg/actions/runs/26761832881) · sonnet46 3.8M · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw-mcpg+%22gh-aw-workflow-id%3A+repo-assist%22&type=pullrequests) > <details> <summary>Add this agentic workflows to your repo</summary> To install this agentic workflow, run ``` gh aw add githubnext/agentics@851905c ``` </details> <!-- gh-aw-agentic-workflow: Repo Assist, engine: copilot, version: 1.0.52, model: claude-sonnet-4.6, id: 26761832881, workflow_id: repo-assist, run: https://github.com/github/gh-aw-mcpg/actions/runs/26761832881 --> <!-- gh-aw-workflow-id: repo-assist -->
This was referenced Jun 8, 2026
lpcox
added a commit
that referenced
this pull request
Jun 9, 2026
…etOrLaunchForSession (#7268) 🤖 *This PR was created by [Repo Assist](https://github.com/github/gh-aw-mcpg/actions/runs/27209796205), an automated AI assistant.* ## Summary When `GetOrLaunchForSession` handles an HTTP backend, it previously called `getServerConfig` once (acquiring the read lock), then immediately delegated to `GetOrLaunch` which called `getServerConfig` a second time — acquiring the same read lock twice per HTTP request. ## Root Cause `GetOrLaunchForSession` needed to know the backend type before routing. For HTTP backends it called `GetOrLaunch`, which blindly re-fetched the config: ```go // Before: two lock acquisitions for HTTP func GetOrLaunchForSession(...) { serverCfg, _ := l.getServerConfig(serverID) // lock #1 if serverCfg.Type == "http" { return GetOrLaunch(l, serverID) // lock #2 inside } } ``` ## Fix Extract the inner logic of `GetOrLaunch` into a private `getOrLaunchWithConfig` helper that accepts a pre-fetched `*config.ServerConfig`. Both public functions now call this helper after their single config lookup: ```go // After: one lock acquisition per request func GetOrLaunchForSession(...) { serverCfg, _ := l.getServerConfig(serverID) // lock #1 only if serverCfg.Type == "http" { return getOrLaunchWithConfig(l, serverID, serverCfg) // no extra lock } } ``` ## Trade-offs - **No public API changes** — `GetOrLaunch` and `GetOrLaunchForSession` signatures are unchanged. - **No behaviour change** — The new `getOrLaunchWithConfig` is a verbatim extraction of the existing `syncutil.GetOrCreate` call body. - **Minor lock contention reduction** — For HTTP backends routed through `GetOrLaunchForSession`, the `getServerConfig` RLock is acquired once instead of twice. Addresses: #7254 ## Test Status⚠️ **Infrastructure failure**: `go build` and `go test` require downloading modules from `proxy.golang.org`, which is blocked by the network firewall in this environment. The code change is a straightforward extraction with no behavioural changes — the `getOrLaunchWithConfig` body is an exact verbatim copy of the original `syncutil.GetOrCreate` closure in `GetOrLaunch`. All existing tests for `GetOrLaunchForSession_HTTPBackend`, `GetOrLaunch_*`, and related launchers remain valid and unchanged. - ✅ `gofmt` — no formatting changes -⚠️ `go build` — blocked (proxy.golang.org unreachable in CI sandbox) -⚠️ `go test` — blocked (same reason) > [!WARNING] > <details> > <summary>Firewall blocked 1 domain</summary> > > The following domain was blocked by the firewall during workflow execution: > > - `proxy.golang.org` >> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter: > > ```yaml > network: > allowed: > - defaults > - "proxy.golang.org" > ``` > > See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information. > > </details> > Generated by [Repo Assist](https://github.com/github/gh-aw-mcpg/actions/runs/27209796205) · sonnet46 5.2M · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw-mcpg+%22gh-aw-workflow-id%3A+repo-assist%22&type=pullrequests) > <details> <summary>Add this agentic workflows to your repo</summary> To install this agentic workflow, run ``` gh aw add githubnext/agentics@851905c ``` </details> <!-- gh-aw-agentic-workflow: Repo Assist, engine: copilot, version: 1.0.52, model: claude-sonnet-4.6, id: 27209796205, workflow_id: repo-assist, run: https://github.com/github/gh-aw-mcpg/actions/runs/27209796205 --> <!-- gh-aw-workflow-id: repo-assist -->
This was referenced Jun 10, 2026
5 tasks
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.
Bootstraps the repository as a Go CLI tool with minimal boilerplate.
Changes
github.com/githubnext/gh-aw-mcpgwith Go 1.24.10main.gowith help/version commands using stdlibUsage
The CLI structure is ready for extension with additional commands and functionality.
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.