Repository navigation
Lpcox/initial implementation - #2
Merged
Merged
Conversation
This was referenced Jan 13, 2026
This was referenced Jan 19, 2026
Copilot AI
added a commit
that referenced
this pull request
Jan 20, 2026
- Add generic trySDKTransport function to handle common connection logic - Refactor tryStreamableHTTPTransport to use trySDKTransport - Refactor trySSETransport to use trySDKTransport - Reduces code duplication by ~40 lines (Pattern #2 from issue #353) Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
This was referenced Jan 20, 2026
This was referenced Jan 24, 2026
This was referenced Jan 31, 2026
This was referenced Feb 5, 2026
Closed
9 tasks
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 15, 2026
This was referenced Jun 24, 2026
This was referenced Jul 4, 2026
This was referenced Jul 6, 2026
6 tasks
Copilot AI
added a commit
that referenced
this pull request
Jul 25, 2026
- README.md: clarify `--otlp-sample-rate` has no env-var fallback (#1) - README.md: state CLI enforces --config or --config-stdin via MarkFlagsOneRequired (#3) - README.md: improve schema-required fields phrasing to be more precise (#4) - CONTRIBUTING.md: change 'Go 1.26.4 or later' to 'Go 1.26.4' (#5) - CONTRIBUTING.md: qualify container port-mapping validation as conditional (#2) - CONTRIBUTING.md: update JSON stdin example to include required gateway fields (#6) Closes #10028
This was referenced Jul 30, 2026
lpcox
added a commit
that referenced
this pull request
Jul 31, 2026
…ort (#10409) Nightly reconciliation identified 7 gaps between README/CONTRIBUTING docs and actual implementation. Addresses all critical and important findings; confirms one finding (issue #2, `sample_rate`) was a false alarm — the field exists in `TracingConfig` with `toml:"sample_rate"`. ## Changes **README.md — Quick Start note (Issue 1)** - Replaced misleading "JSON schema _requires_ `gateway.port`, `domain`, and `agentId`" with accurate statement: all fields and the entire `gateway` section are optional; when present, only included fields are validated - Added inline reference to optional server fields (`entrypoint`, `entrypointArgs`, `mounts`, `args`, `connectTimeout`, `toolTimeout`) with link to `docs/CONFIGURATION.md` **README.md — Gateway Configuration table (Issues 1, 4, 7)** - Added four undocumented fields from `StdinGatewayConfig`: `dockerless` (annotated **JSON stdin only** — has `toml:"-"`), `container_runtime`/`containerRuntime`, `container_runtime_command`/`containerRuntimeCommand`, `container_runtime_args`/`containerRuntimeArgs` - Updated footer note to distinguish shared fields (`registry`) from TOML-only fields (`rate_limit_threshold`, `rate_limit_cooldown`) **README.md — Environment variables (Issue 6)** - Added `OTEL_EXPORTER_OTLP_ENDPOINT` (sets `--otlp-endpoint` default; already in Tracing table but missing from the key env-vars list) - Added `GITHUB_REPOSITORY` (drives `MCP_GATEWAY_FORCE_PUBLIC_REPOS` guard logic) **CONTRIBUTING.md — Integration test description (Issue 3)** - Removed incorrect "requires building the binary first (`make build`)" — `make test-integration` auto-builds if the binary is absent - Clarified `make test-all` as the target that _always_ rebuilds before running both suites <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #10373
lpcox
added a commit
that referenced
this pull request
Jul 31, 2026
`CONTRIBUTING.md` incorrectly attributed `DOCKER_API_VERSION` detection to `run_containerized.sh`. The logic actually lives in `run.sh` (`set_docker_api_version()`, lines 97–114). ## Changes - **`CONTRIBUTING.md:633`** — Changed `run_containerized.sh` → `run.sh` in the `DOCKER_API_VERSION` note > Note: Issue #2 (line 273 `NOT ******`) required no change — the file already contains `NOT ****** The masked display in the reconciliation report was the CI environment redacting the word "Bearer" in its output. <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #10415
Contributor
|
Third comment attempt 31597786429.
|
lpcox
added a commit
that referenced
this pull request
Sep 27, 2026
…act-or-sanitize log helpers (#13987) 🤖 *This PR was created by Repo Assist, an automated AI assistant, as part of its scheduled Task 8 (Performance Improvements) and a related Task 5-style follow-up.* ## What changed **1. Performance fix (`internal/server/http_helpers.go`)** `logHTTPRequestBody` always ran the full `sanitize.SanitizeString` regex pass over the request body *before* checking whether the enclave-redacted path was about to discard that result. For every enclave-scoped request, the regex work was wasted. Reordered so `SanitizeString` only runs on the non-redacted path — mirroring the pattern already used in `tool_registry.go` (and the fix applied there in a prior Repo Assist PR, `perf-avoid-redundant-sanitize-toolregistry-20260920`). **2. Dedup follow-up (`internal/sanitize`, `internal/server`)** While fixing (1), the same "redact-or-sanitize payload" branch and two near-identical "redact error/message for log" helper functions were flagged by the repo's own Duplicate Code Detector (#13965, sub-issues #13966 and #13967). Consolidated: - `redactErrorIf` (backend_call.go) and `sdkErrorMessageForLog` (sdk_logging.go) → `sanitize.RedactErrorOrPlain(bool, error)` and `sanitize.RedactMessageForLog(string, bool)` respectively, added to `internal/sanitize/payload_redaction.go`. - The repeated `if redact { RedactedPayloadText(...) } else { SanitizeString(...) }` branch (http_helpers.go, tool_registry.go) → `sanitize.PayloadTextForLog(payload []byte, redact bool) string`. Closes #13966, closes #13967. ## Rationale / trade-offs - `RedactErrorOrPlain` and `RedactMessageForLog` are kept as two functions (not merged into one) because error-typed callers need `RedactErrorForLog`'s coarse-category short-circuit (`timeout`, `canceled`) that a plain string input can't provide — collapsing them would lose that distinction for `backend_call.go`'s callers. - Left the `sdk_logging.go` non-JSON-response truncation branch as-is per issue #13967's own recommendation #2 (it mixes truncation logic in with the base branch and isn't a literal duplicate). - No behavior change: same redaction decision, same digest format, just fewer copies and fewer wasted regex passes on the enclave path. ## Test Status - `go build ./...` — pass - `go vet ./...` — clean - `gofmt -l .` — no diffs - `go test ./internal/server/... ./internal/sanitize/...` — pass (updated 2 tests in `sdk_logging_test.go` that referenced the removed `sdkErrorMessageForLog` to call `sanitize.RedactMessageForLog` instead; no test behavior changes) - `make agent-finished` (full Go + Rust guard suite, format, build, lint) — all green ## AI Disclosure This PR was authored by Repo Assist, GitHub's automated repository assistant. A human maintainer should review before merging. > [!WARNING] > <details> > <summary>Firewall blocked 10 domains</summary> > > The following domains were blocked by the firewall during workflow execution: > > - `api.github.com` > - `example.com` > - `index.crates.io` > - `nonexistent.local` > - `proxy.golang.org` > - `slow.example.com` > - `static.crates.io` > - `storage.googleapis.com` > - `sum.golang.org` > - `thishostdoesnotexist12345.com` > > [!TIP] > `api.github.com` is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding `api.github.com` to `network.allowed`, use `tools.github.mode: gh-proxy` for direct pre-authenticated GitHub CLI access without requiring network access to `api.github.com`: > > ```yaml > tools: > github: > mode: gh-proxy > ``` > > See [GitHub Tools](https://github.github.com/gh-aw/reference/github-tools/) for more information on `gh-proxy` mode. > > To allow these domains, add them to the `network.allowed` list in your workflow frontmatter: > > ```yaml > network: > allowed: > - defaults > - "api.github.com" > - "example.com" > - "index.crates.io" > - "nonexistent.local" > - "proxy.golang.org" > - "slow.example.com" > - "static.crates.io" > - "storage.googleapis.com" > - "sum.golang.org" > - "thishostdoesnotexist12345.com" > ``` > > 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/36320227694) · copilot · auto · 273.1 AIC · ⊞ 18.8K · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw-mcpg+%22gh-aw-workflow-id%3A+repo-assist%22&type=pullrequests) > <sub>Comment <em>/repo-assist</em> to run again</sub> > <details> <summary><sub>Add this agentic workflow to your repo</sub></summary> To install this agentic workflow, run ``` gh aw add githubnext/agentics@851905c ``` </details> <!-- gh-aw-agentic-workflow: Repo Assist, engine: copilot, model: auto, id: 36320227694, workflow_id: repo-assist, run: https://github.com/github/gh-aw-mcpg/actions/runs/36320227694 --> <!-- gh-aw-workflow-id: repo-assist --> <!-- gh-aw-workflow-call-id: github/gh-aw-mcpg/repo-assist -->
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.
Initial implementation of mcp gateway.