Skip to content

Reconcile docs with MCP_GATEWAY_PORT runtime behavior and Rust guard test guidance#6039

Merged
lpcox merged 3 commits into
mainfrom
copilot/update-documentation-reconciliation-report
May 20, 2026
Merged

Reconcile docs with MCP_GATEWAY_PORT runtime behavior and Rust guard test guidance#6039
lpcox merged 3 commits into
mainfrom
copilot/update-documentation-reconciliation-report

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

Nightly docs reconciliation found mismatches between documented env/test behavior and implementation, centered on MCP_GATEWAY_PORT semantics/defaults and incomplete contributor guidance. This PR aligns docs and one config comment with current runtime behavior.

  • Environment variable semantics (docs/ENVIRONMENT_VARIABLES.md)

    • Corrects MCP_GATEWAY_PORT wording: it is used by run.sh / run_containerized.sh to construct --listen, and by awmg only for --validate-env checks.
    • Removes conflicting value by aligning the production-table value with the script default (8000).
    • Expands the note to clearly separate script-read vars (HOST/PORT/MODE) from binary behavior.
  • Contributor workflow clarity (CONTRIBUTING.md)

    • Adds a dedicated Rust Guard Tests section for make test-rust and its cargo requirement.
    • Tightens make agent-finished wording to reflect what it actually runs (go test ./... + Rust guard tests).
  • Agent quick reference alignment (AGENTS.md)

    • Updates Agent-Finished description to explicitly include unit, integration, and Rust guard tests.
  • JSON stdin config intent (internal/config/config_stdin.go)

    • Adds a StdinServerConfig comment clarifying intentional omission of command in JSON stdin format (stdio uses container).
`MCP_GATEWAY_PORT` is read by the binary for `--validate-env` port-mapping checks only; it does **not** auto-configure the listen address.

Copilot AI linked an issue May 19, 2026 that may be closed by this pull request
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
Copilot AI requested a review from lpcox May 19, 2026 23:49
Copilot finished work on behalf of lpcox May 19, 2026 23:49
@lpcox lpcox marked this pull request as ready for review May 19, 2026 23:51
Copilot AI review requested due to automatic review settings May 19, 2026 23:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_PORT semantics in docs/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 the make agent-finished description.
  • Updates the agent quick reference and adds a clarifying comment for the stdin JSON server config format (no command field).
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.
@lpcox
Copy link
Copy Markdown
Collaborator

lpcox commented May 19, 2026

@copilot address review feedback

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 20, 2026

@copilot address review feedback

Addressed. I updated docs/ENVIRONMENT_VARIABLES.md so the optional table entry for MCP_GATEWAY_PORT now matches the clarified semantics (run.sh builds --listen; awmg --validate-env uses it for port-mapping checks). Included in commit c252aaa.

Copilot finished work on behalf of lpcox May 20, 2026 00:01
@lpcox lpcox merged commit a2aac30 into main May 20, 2026
12 checks passed
@lpcox lpcox deleted the copilot/update-documentation-reconciliation-report branch May 20, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📚 Documentation Reconciliation Report - 2026-05-19

3 participants