Commit 97783f0
authored
docs: Remove unsupported payloadSizeThreshold from JSON stdin config (#808)
Documentation incorrectly showed `payloadSizeThreshold` as a supported
field in JSON stdin gateway configuration. The field exists in
`GatewayConfig` (TOML format) but is missing from `StdinGatewayConfig`
struct.
## Changes
- **Removed from JSON example**: Deleted `payloadSizeThreshold: 1024`
from gateway config example
- **Removed from field documentation**: Eliminated field description
from Gateway Configuration Fields section
- **Added configuration alternatives**: New section clarifying users
must use:
- CLI flag: `--payload-size-threshold <bytes>`
- Environment variable: `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=<bytes>`
## Before
```json
{
"gateway": {
"port": 8080,
"payloadDir": "/tmp/jq-payloads",
"payloadSizeThreshold": 1024 // ❌ Not supported in JSON stdin
}
}
```
## After
```json
{
"gateway": {
"port": 8080,
"payloadDir": "/tmp/jq-payloads"
}
}
```
**Configuration via CLI/env still works:**
```bash
awmg --config-stdin --payload-size-threshold 2048 < config.json
# or
MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=2048 awmg --config-stdin < config.json
```
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `example.com`
> - Triggering command: `/tmp/go-build3919639669/b275/launcher.test
/tmp/go-build3919639669/b275/launcher.test
-test.testlogfile=/tmp/go-build3919639669/b275/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true rtcfg --local
x_amd64/compile user.email` (dns block)
> - `invalid-host-that-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build3919639669/b263/config.test
/tmp/go-build3919639669/b263/config.test
-test.testlogfile=/tmp/go-build3919639669/b263/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo
64/src/unicode/casetables.go ache/go/1.25.6/x64/pkg/tool/linu-o
credential.usern/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/vet`
(dns block)
> - `nonexistent.local`
> - Triggering command: `/tmp/go-build3919639669/b275/launcher.test
/tmp/go-build3919639669/b275/launcher.test
-test.testlogfile=/tmp/go-build3919639669/b275/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true rtcfg --local
x_amd64/compile user.email` (dns block)
> - `slow.example.com`
> - Triggering command: `/tmp/go-build3919639669/b275/launcher.test
/tmp/go-build3919639669/b275/launcher.test
-test.testlogfile=/tmp/go-build3919639669/b275/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true rtcfg --local
x_amd64/compile user.email` (dns block)
> - `this-host-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build3919639669/b284/mcp.test
/tmp/go-build3919639669/b284/mcp.test
-test.testlogfile=/tmp/go-build3919639669/b284/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true /go-build main
x_amd64/vet` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/github/gh-aw-mcpg/settings/copilot/coding_agent)
(admins only)
>
> </details>
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
----
*This section details on the original issue you should resolve*
<issue_title>📚 Documentation Reconciliation Report - JSON Stdin Config
Missing payloadSizeThreshold Field</issue_title>
<issue_description>## Summary
Found **1 critical discrepancy** between documentation and
implementation during nightly reconciliation check (2026-02-07).
- Workflow Run:
[#21779574765](https://github.com/github/gh-aw-mcpg/actions/runs/21779574765)
- Date: 2026-02-07
- Branch: main
**Overall Assessment**: Documentation is **99% accurate** with excellent
quality. Only one configuration field is affected.
---
## Critical Issues 🔴
### 1. JSON Stdin Config Missing `payloadSizeThreshold` Field
**Location**: README.md lines 132, 201
**Problem**: Documentation shows `payloadSizeThreshold` as configurable
in JSON stdin format:
``````json
{
"gateway": {
"port": 8080,
"payloadDir": "/tmp/jq-payloads",
"payloadSizeThreshold": 1024 // ← This field is documented but not supported
}
}
``````
**Actual Behavior**: The field is missing from `StdinGatewayConfig`
struct:
``````go
// internal/config/config_stdin.go:27-34
type StdinGatewayConfig struct {
Port *int `json:"port,omitempty"`
APIKey string `json:"apiKey,omitempty"`
Domain string `json:"domain,omitempty"`
StartupTimeout *int `json:"startupTimeout,omitempty"`
ToolTimeout *int `json:"toolTimeout,omitempty"`
PayloadDir string `json:"payloadDir,omitempty"`
// PayloadSizeThreshold is MISSING
}
``````
**Impact**:
- Users cannot configure payload size threshold via JSON stdin
configuration
- **Workaround exists**: Default value (1024 bytes) is automatically
applied via `applyDefaults()` in `config_payload.go:20-22`
- Alternative configuration methods work: CLI flag
`--payload-size-threshold` and env var
`MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD`
**Suggested Fix**:
1. Add field to `StdinGatewayConfig`:
``````go
PayloadSizeThreshold *int `json:"payloadSizeThreshold,omitempty"`
``````
2. Update conversion in `convertStdinConfig()` (around line 154):
``````go
if stdinCfg.Gateway.PayloadSizeThreshold != nil {
cfg.Gateway.PayloadSizeThreshold =
*stdinCfg.Gateway.PayloadSizeThreshold
}
``````
**Code Reference**:
- Missing in: `internal/config/config_stdin.go:27-34`
- Exists in: `internal/config/config_core.go:61` (GatewayConfig has the
field)
- Documented in: README.md lines 132, 201
---
## Important Issues 🟡
### 2. External Documentation Link May Be Inaccessible
**Location**: README.md lines 7, 105, 186
**Link**:
https://github.com/github/gh-aw/blob/main/docs/src/content/docs/reference/mcp-gateway.md
**Problem**: Link appears to reference a private repository
(`github/gh-aw`), which returns a GitHub login page instead of
documentation content.
**Impact**: External users cannot access the "Full Configuration
Specification" reference that is prominently linked three times in
README.md.
**Recommendation**:
- If `github/gh-aw` is a private repository, consider mirroring
essential configuration documentation in this public repo
- Or clearly note that the link requires GitHub organization access
- Or provide an alternative public documentation source
---
## Documentation Completeness ✅
### Accurate Sections Verified
✅ **Docker Quick Start** (lines 32-77)
- Docker run command is correct and complete
- All required flags properly documented
- Environment variables match implementation
- Port mapping instructions accurate
✅ **TOML Configuration** (lines 85-102)
- Field names match code exactly
- Command/args pattern correctly explained
- Example configuration parses successfully
✅ **JSON Stdin Configuration** (lines 104-186)
- 99% accurate (only payloadSizeThreshold missing)
- Type field options correct (stdio/http/local)
- Container requirement correctly stated
- Command field restriction clearly documented
- Mount format validation matches implementation
- Environment variable expansion documented correctly
✅ **CLI Flags Documentation** (lines 214-243)
- **100% accurate** - All 15 flags verified
- Default values match source code
- Flag types correct
- Descriptions match implementation
✅ **Environment Variables** (lines 246-274)
- All 6 documented variables exist and work correctly:
- `MCP_GATEWAY_PORT`
- `MCP_GATEWAY_DOMAIN`
- `MCP_GATEWAY_API_KEY`
- `MCP_GATEWAY_LOG_DIR`
- `MCP_GATEWAY_PAYLOAD_DIR`
- `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD`
✅ **Features List** (lines 9-27)
- All 7 claimed features verified in codebase:
- Configuration Modes (TOML/JSON) ✓
- Spec-Compliant Validation ✓
- Variable Expansion ✓
- Type Normalization ✓
- Schema Normalization ✓ (`schema_normalization_test.go`)
- Routing Modes ✓ (`routed.go`, `unified.go`)
- Docker Support ✓
- Stdio Transport ✓
- Container Detection ✓ (`tty/container.go`)
- Enhanced Debugging ✓
- Per-ServerID Logs ✓
✅ **CONTRIBUTING.md**
- All make targets exist and work: `build`, `test...
</details>
> **Custom agent used: agentic-workflows**
> GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade
AI-powered workflows with intelligent prompt routing
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes #802
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
| |||
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
0 commit comments