docs: fix three README inaccuracies found by nightly reconciliation#1514
docs: fix three README inaccuracies found by nightly reconciliation#1514
Conversation
…iation - Fix guard-policies JSON example: remove invalid `owner` field, prefix repos with owner/ pattern, add required `min-integrity` field - Add RUNNING_IN_CONTAINER env var to Optional environment variables table - Update script-only variables note to include PORT alongside HOST and MODE Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR corrects three inaccuracies in README.md that were identified by the nightly documentation reconciliation check. The changes bring the documentation in sync with the actual implementation.
Changes:
- Guard-policies JSON example: Removes the invalid
"owner"field, fixes bare repo names to useowner/repopatterns, and adds the missing"min-integrity"field to match the implementation. RUNNING_IN_CONTAINERenv var: Adds a missing row to the environment variables table for this variable read byinternal/tty/container.go.- Script-only variables note: Adds
PORTto the note, alongsideHOSTandMODE, as it is only consumed byrun.shas a fallback and not by the Go binary directly.
Comments suppressed due to low confidence (1)
README.md:380
- The "Default" column entry for
RUNNING_IN_CONTAINERshowstrue, which is inaccurate.trueis not the default value of the variable — when the variable is unset (its actual default state),IsRunningInContainer()falls back to checking/.dockerenvand/proc/1/cgroup. The valuetrueis a trigger value that a user sets to force container detection, similar to how the "Example" column is used in the "Required for Production" table above. This column header should show something like(not set)for the default, or the column header should be changed to "Trigger Value".
| `RUNNING_IN_CONTAINER` | Signals the gateway is running inside a container (set automatically by container runtimes) | `true` |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD` | Size threshold in bytes for payload storage (sets default for `--payload-size-threshold` flag) | `524288` | | ||
| | `DEBUG` | Enable debug logging with pattern matching (e.g., `*`, `server:*,launcher:*`) | (disabled) | | ||
| | `DEBUG_COLORS` | Control colored debug output (0 to disable, auto-disabled when piping) | Auto-detect | | ||
| | `RUNNING_IN_CONTAINER` | Signals the gateway is running inside a container (set automatically by container runtimes) | `true` | |
There was a problem hiding this comment.
The RUNNING_IN_CONTAINER row has been placed in the "Optional (Non-Containerized Mode)" section, whose heading explicitly says "When running locally (run.sh), these variables are optional." However, RUNNING_IN_CONTAINER is a container-detection variable read by the Go binary (internal/tty/container.go:30) that is specifically relevant to containerized environments, and it is not related to run.sh or non-containerized operation. It would be a better fit in the "Containerized Deployment Variables" section (alongside MCP_GATEWAY_HOST and MCP_GATEWAY_MODE), where the context of containerized execution is already established.
This issue also appears on line 380 of the same file.
Three discrepancies between README documentation and actual implementation, surfaced by the nightly documentation reconciler.
Changes
Guard-policies JSON example: remove invalid
"owner"field, fix bare repo names →owner/repopattern, add missing"min-integrity"fieldRUNNING_IN_CONTAINERenv var: add missing row to the Optional env vars table — this variable is read byinternal/tty/container.goto detect containerised environments but was absent from the docsScript-only variables note: extend the existing note to include
PORTalongsideHOSTandMODE;PORTis only consumed byrun.shas a fallback forMCP_GATEWAY_PORT, not by the Go binaryWarning
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:
example.com/tmp/go-build1260020530/b298/launcher.test /tmp/go-build1260020530/b298/launcher.test -test.testlogfile=/tmp/go-build1260020530/b298/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true go --local x_amd64/compile user.name /math(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build1260020530/b280/config.test /tmp/go-build1260020530/b280/config.test -test.testlogfile=/tmp/go-build1260020530/b280/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo transform/transform.go ache/go/1.25.7/x64/pkg/tool/linu-lang=go1.25 credential.helpe/opt/hostedtoolcache/go/1.25.7/x64/pkg/tool/linux_amd64/vet(dns block)nonexistent.local/tmp/go-build1260020530/b298/launcher.test /tmp/go-build1260020530/b298/launcher.test -test.testlogfile=/tmp/go-build1260020530/b298/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true go --local x_amd64/compile user.name /math(dns block)slow.example.com/tmp/go-build1260020530/b298/launcher.test /tmp/go-build1260020530/b298/launcher.test -test.testlogfile=/tmp/go-build1260020530/b298/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true go --local x_amd64/compile user.name /math(dns block)this-host-does-not-exist-12345.com/tmp/go-build1260020530/b307/mcp.test /tmp/go-build1260020530/b307/mcp.test -test.testlogfile=/tmp/go-build1260020530/b307/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 1571780/b029/_pkg_.a ternal/fips140hash/hash.go x_amd64/asm user.email(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>📚 Documentation Reconciliation Report - 2026-02-28</issue_title>
<issue_description>## Summary
Found 3 discrepancies between documentation and implementation during nightly reconciliation check.
Critical Issues 🔴
1. Guard-Policies JSON Example Uses Incorrect Schema
Location:
README.md, line 134–140 (JSON stdin format example)Problem: The JSON configuration example shows an
"owner"field insideguard-policiesthat does not exist in the implementation. Additionally, thereposarray contains bare repo names ("gh-aw-mcpg","gh-aw") instead of the requiredowner/repopatterns. The example also omits themin-integrityfield.Current (incorrect) example:
Correct format (consistent with implementation and tests):
Impact: Any user following this example will produce an unrecognised
ownerfield and bare repo names that don't match theowner/repopattern required by the guard policy evaluator. This would silently misconfigure access control.Suggested Fix: Replace the
guard-policiesblock in the JSON example with the correct structure: remove"owner", prefix all repo names withowner/, and add"min-integrity".Code References:
internal/config/config_guardpolicies_test.go:14–35— tests confirm noownerfield; repos use"all","public", or"owner/repo"patternsinternal/config/config_stdin.go:83—GuardPoliciesdefined asmap[string]interface{}with noownerkeyREADME.md:191–215— the documentation section correctly describes the format (noowner, fullowner/repopatterns) — only the example is wrongMinor Issues 🔵
2.
RUNNING_IN_CONTAINEREnvironment Variable Not DocumentedLocation:
README.md(Environment Variables section, ~line 351)Problem: The
RUNNING_IN_CONTAINERenvironment variable is read by the gateway application (internal/tty/container.go:30) to detect containerised environments and emit security warnings, but it is not listed in the README environment variables table.Actual Behaviour: When
RUNNING_IN_CONTAINER=trueis set, the gateway detects it is running inside a container and adjusts its behaviour accordingly.Suggested Fix: Add a row to the Optional/Containerised variables table:
|
RUNNING_IN_CONTAINER| Signals the gateway is running inside a container (set automatically by container runtimes) |true|Code Reference:
internal/tty/container.go:303. Note About Script-Only Variables Is Missing
PORTLocation:
README.md, line 381Problem: The note reads: "The
HOSTandMODEenvironment variables are not used by the gateway application." — but the unqualifiedPORTvariable (without theMCP_GATEWAY_prefix) is also a script-only variable, not read by the Go binary directly.Actual Behaviour:
run.shusesPORTas a fallback forMCP_GATEWAY_PORT(line 128:PORT="\$\{MCP_GATEWAY_PORT:-\$\{PORT:-8000}}"), but the Go application only readsMCP_GATEWAY_PORT.Suggested Fix: Update the note to include
PORT:Code References:
run.sh:128,internal/config/config_env.go:13(onlyMCP_GATEWAY_PORTread)Accurate Sections ✅
type,container,entrypoint,entrypointArgs,args,mounts,env,url,headers) — verified againstinternal/config/config_stdin.goport,apiKey,domain,startupTimeout,toolTimeout,payloadDir) — verified camelCase matchesStdinGatewayConfigJSON tagspayloadSizeThreshold,payloadPathPrefix) — verified accurateMCP_GATEWAY_LOG_DIR,MCP_GATEWAY_PAYLOAD_DIR,MCP_GATEWAY_PAYLOAD_PATH_PREFIX,MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD,DEBUG,DEBUG_COLORSall correctly documentedbuild,test,test-unit,test-integration,test-all,lint,coverage,format,clean,install,release) verified against Makefilego.modawmgcorrectly documentedTested Commands
make --dry-run build— dry-run succeedsmake --dry-run test-unit— dry-run succeedsmake --dry-run test-integration— dry-run succeeds🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.