Reconcile docs with MCP_GATEWAY_PORT runtime behavior and Rust guard test guidance#6039
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Update documentation for discrepancies found in reconciliation report
Reconcile docs with MCP_GATEWAY_PORT runtime behavior and Rust guard test guidance
May 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reconciles project documentation (and one config struct comment) with the current runtime behavior around MCP_GATEWAY_PORT, and adds contributor guidance for running Rust guard tests so contributor workflows match what the Make targets actually do.
Changes:
- Clarifies
MCP_GATEWAY_PORTsemantics indocs/ENVIRONMENT_VARIABLES.md, including script vs. binary behavior and aligning the example value with the scripts’ default (8000). - Adds a CONTRIBUTING section documenting how to run Rust guard tests via
make test-rust, and refines themake agent-finisheddescription. - Updates the agent quick reference and adds a clarifying comment for the stdin JSON server config format (no
commandfield).
Show a summary per file
| File | Description |
|---|---|
| internal/config/config_stdin.go | Adds an explanatory comment about stdin JSON server config intentionally omitting command in favor of container. |
| docs/ENVIRONMENT_VARIABLES.md | Updates MCP_GATEWAY_PORT documentation to reflect script usage vs. awmg --validate-env behavior and aligns example defaults. |
| CONTRIBUTING.md | Documents make test-rust and refines make agent-finished wording to match actual behavior. |
| AGENTS.md | Updates the quick reference description of make agent-finished test coverage. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 1
Comment on lines
40
to
+42
| | `RUNNING_IN_CONTAINER` | Manual override; set to `"true"` to force container detection when `/.dockerenv` and cgroup detection are unavailable | (unset) | | ||
|
|
||
| **Note:** `PORT`, `HOST`, and `MODE` are not read by the `awmg` binary directly. However, `run.sh` uses `HOST` (default: `0.0.0.0`), `MODE` (default: `--routed`), and falls back to `PORT` (when `MCP_GATEWAY_PORT` is unset) to set the bind address and routing mode. Use the `--listen` and `--routed`/`--unified` flags when running `awmg` directly. | ||
| **Note:** `PORT`, `HOST`, and `MODE` are not read by the `awmg` binary directly. `MCP_GATEWAY_PORT` is read by the binary for `--validate-env` port-mapping checks only; it does **not** auto-configure the listen address. `run.sh` uses `HOST` (default: `0.0.0.0`), `MODE` (default: `--routed`), and falls back to `PORT` (when `MCP_GATEWAY_PORT` is unset) to set the bind address and routing mode. Use the `--listen` and `--routed`/`--unified` flags when running `awmg` directly. |
Collaborator
|
@copilot address review feedback |
Contributor
Author
Addressed. I updated |
This was referenced May 20, 2026
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.
Nightly docs reconciliation found mismatches between documented env/test behavior and implementation, centered on
MCP_GATEWAY_PORTsemantics/defaults and incomplete contributor guidance. This PR aligns docs and one config comment with current runtime behavior.Environment variable semantics (
docs/ENVIRONMENT_VARIABLES.md)MCP_GATEWAY_PORTwording: it is used byrun.sh/run_containerized.shto construct--listen, and byawmgonly for--validate-envchecks.8000).HOST/PORT/MODE) from binary behavior.Contributor workflow clarity (
CONTRIBUTING.md)make test-rustand itscargorequirement.make agent-finishedwording to reflect what it actually runs (go test ./...+ Rust guard tests).Agent quick reference alignment (
AGENTS.md)Agent-Finisheddescription to explicitly include unit, integration, and Rust guard tests.JSON stdin config intent (
internal/config/config_stdin.go)StdinServerConfigcomment clarifying intentional omission ofcommandin JSON stdin format (stdio usescontainer).