-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Summary
Found 2 minor discrepancies between documentation and implementation during nightly reconciliation check.
- Workflow Run: §22251021298
- Date: 2026-02-21
- Branch: main
Minor Issues 🔵
1. payloadSizeThreshold Configuration Alternatives missing TOML config option
Location: README.md, Gateway Configuration Fields — "Configuration Alternatives" section (~line 220)
Problem: The note explains how to set payloadSizeThreshold but lists only the CLI flag and environment variable. The TOML config file's payload_size_threshold field is not listed as an option.
Current documentation:
- **`payloadSizeThreshold`** is not supported in JSON stdin format. Use:
- CLI flag: `--payload-size-threshold (bytes)` (default: 10240)
- Environment variable: `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=(bytes)`Actual behavior: The TOML config file also supports this via payload_size_threshold in the [gateway] section — as shown in config.example-payload-threshold.toml (which lists "Config file: payload_size_threshold = 2048" as option #3) and confirmed in internal/config/config_core.go line 84:
PayloadSizeThreshold int `toml:"payload_size_threshold" json:"payload_size_threshold,omitempty"`Impact: Users reading README.md may not realize TOML config supports this setting, missing an available configuration method.
Suggested Fix:
- **`payloadSizeThreshold`** is not supported in JSON stdin format. Use:
- CLI flag: `--payload-size-threshold (bytes)` (default: 10240)
- Environment variable: `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=(bytes)`
- TOML config file: `payload_size_threshold = (bytes)` in `[gateway]` sectionCode Reference: internal/config/config_core.go:84, config.example-payload-threshold.toml:7
2. DOCKER_API_VERSION description inaccurate in environment variables table
Location: README.md, Docker Configuration table (~line 353)
Problem: The "Default" column for DOCKER_API_VERSION says "Set by run.sh based on architecture" but the actual primary approach queries the Docker daemon's current API version first; architecture-based selection is only a fallback label (and both branches currently set 1.44).
Current documentation:
| `DOCKER_API_VERSION` | Docker API version (set by helper scripts, Docker client auto-negotiates) | Set by run.sh based on architecture |
```
**Actual behavior** (from `run.sh` lines 93–110):
1. First queries Docker daemon: `docker version --format '\{\{.Server.APIVersion}}'`
2. If successful, uses the daemon's current API version
3. If detection fails, falls back to `1.44` for all architectures
`CONTRIBUTING.md` already describes this correctly:
> "set automatically by `run_containerized.sh` using the Docker daemon's current API version (falls back to `1.44` for all architectures if detection fails)"
**Impact:** Users may expect the version to vary by CPU architecture (arm64 vs amd64), but it is actually daemon-version-driven. Minor confusion potential.
**Suggested Fix:**
```
| `DOCKER_API_VERSION` | Docker API version (set by helper scripts, Docker client auto-negotiates) | Set by querying Docker daemon's current API version; falls back to `1.44` if detection fails |
Code Reference: run.sh:93-110, run_containerized.sh:228-245
Accurate Sections ✅
All the following were verified against implementation and found accurate:
- Features list — All claimed features confirmed in code (
internal/cmd/,internal/config/,internal/server/,internal/launcher/,internal/tty/) - TOML configuration format — Fields
command,args,type,urlverified againstServerConfigstruct - JSON stdin configuration format — All fields in the example (
type,container,entrypoint,entrypointArgs,mounts,env,args) verified againstStdinServerConfigstruct - Gateway configuration fields —
port,apiKey,domain,startupTimeout,toolTimeout,payloadDirall verified inStdinGatewayConfig - Validation rules — Container required for stdio, URL required for HTTP,
commandnot supported in JSON stdin — all confirmed invalidation.go - Variable expansion —
\$\{VAR_NAME}syntax confirmed invalidation.go "local"type normalization — Confirmed innormalizeLocalType()inconfig_stdin.go- Auth format (plain API key, NOT Bearer) — Confirmed in
internal/auth/package - Default values — Port
3000, startupTimeout60, toolTimeout120, payloadSizeThreshold10240all match code maketargets — All documented targets (build,test,test-unit,test-integration,test-all,lint,coverage,install,test-ci) verified present inMakefile- Binary name —
awmgconfirmed inMakefile:BINARY_NAME=awmg - Go version —
1.25.0matchesgo.mod - All dependencies — Listed in CONTRIBUTING.md match
go.mod - Project structure — All documented
internal/packages verified to exist - Config example files —
config.example.tomlandconfig.example-payload-threshold.tomlmatch documented TOML format
Tested Commands
- ✅
make --dry-run build— runsgo build -o awmg . - ✅
make --dry-run test— alias fortest-unit - ✅
make --dry-run test-unit— runsgo test -v ./internal/... - ✅
make --dry-run test-integration— builds binary then runsgo test -v ./test/integration/... - ✅
make --dry-run test-all— runsgo test -v ./... - ✅
make --dry-run lint— runsgo vet,gofmt,golangci-lint - ✅
make --dry-run coverage— runs with-coverprofile - ✅
make --dry-run install— verifies Go + golangci-lint, downloads deps
Code References
- Configuration structs:
internal/config/config_core.go,internal/config/config_stdin.go - Validation logic:
internal/config/validation.go - CLI flags:
internal/cmd/flags_core.go,internal/cmd/flags_logging.go,internal/cmd/flags_launch.go - Run scripts:
run.sh,run_containerized.sh
Generated by Nightly Documentation Reconciler
- expires on Feb 24, 2026, 5:25 AM UTC