Skip to content

docs: document trusted-users, --trusted-bots/--trusted-users flags, and PORT fallback#2789

Merged
lpcox merged 2 commits intomainfrom
copilot/fix-undocumented-trusted-users-field
Mar 29, 2026
Merged

docs: document trusted-users, --trusted-bots/--trusted-users flags, and PORT fallback#2789
lpcox merged 2 commits intomainfrom
copilot/fix-undocumented-trusted-users-field

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 29, 2026

Three fields/flags present in code were missing from user-facing docs, discovered by nightly reconciliation.

Changes

  • README.md + docs/CONFIGURATION.md — Document trusted-users in the allow-only guard policy section alongside blocked-users and approval-labels. The field elevates specific GitHub usernames to approved integrity without lowering min-integrity globally:

    "allow-only": {
      "repos": ["myorg/*"],
      "min-integrity": "approved",
      "blocked-users": ["spam-bot"],
      "approval-labels": ["human-reviewed"],
      "trusted-users": ["alice", "trusted-contributor"]
    }
  • docs/PROXY_MODE.md — Add --trusted-bots and --trusted-users to the flags table (both registered in internal/cmd/proxy.go but absent from the table).

  • docs/ENVIRONMENT_VARIABLES.md — Extend the PORT/HOST/MODE note to mention that run.sh falls back to bare PORT when MCP_GATEWAY_PORT is unset.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix documentation for trusted-users field in allow-only policy docs: document trusted-users, --trusted-bots/--trusted-users flags, and PORT fallback Mar 29, 2026
Copilot AI requested a review from lpcox March 29, 2026 17:06
@lpcox lpcox marked this pull request as ready for review March 29, 2026 17:11
Copilot AI review requested due to automatic review settings March 29, 2026 17:11
@lpcox lpcox merged commit c7c15f1 into main Mar 29, 2026
9 checks passed
@lpcox lpcox deleted the copilot/fix-undocumented-trusted-users-field branch March 29, 2026 17:11
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

Updates user-facing documentation to cover previously undocumented guard-policy fields and proxy flags, aligning docs with implemented configuration behavior in the gateway and proxy tooling.

Changes:

  • Document trusted-users under the allow-only guard policy, including JSON examples.
  • Add --trusted-bots and --trusted-users to the proxy mode flags table.
  • Clarify run.sh environment behavior: fallback to PORT when MCP_GATEWAY_PORT is unset.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
docs/PROXY_MODE.md Adds missing proxy CLI flags to the documented flags table.
docs/ENVIRONMENT_VARIABLES.md Documents run.sh’s PORT fallback behavior alongside HOST/MODE.
docs/CONFIGURATION.md Documents allow-only policy fields: blocked-users, approval-labels, and trusted-users.
README.md Adds trusted-users to the guard policy quick reference and example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines 87 to +91
**`blocked-users`** *(optional)* — Array of GitHub usernames whose content is unconditionally blocked. Items from these users receive `blocked` integrity (below `none`) and are always denied, even when `min-integrity` is `"none"`. Cannot be overridden by `approval-labels`.

**`approval-labels`** *(optional)* — Array of GitHub label names that promote a content item's effective integrity to `approved` when present. Enables human-review gates where a maintainer labels an item to allow it through. Uses `max(base, approved)` so it never lowers integrity. Does not override `blocked-users`.

**`trusted-users`** *(optional)* — Array of GitHub usernames whose content is unconditionally elevated to `approved` integrity. Useful for granting specific external contributors (e.g., trusted open-source maintainers) the same treatment as repository members, without lowering `min-integrity` globally. Uses `max(base, approved)` so it never lowers integrity. Does not override `blocked-users`.
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

The blocked-users description says it cannot be overridden by approval-labels, but with trusted-users now documented it would be clearer to also state that blocked-users takes precedence over trusted-users as well (this matches guard behavior: blocked-users overrides trusted-users). Otherwise readers may assume trusted-users can re-approve a blocked login.

Copilot uses AI. Check for mistakes.
Comment thread docs/PROXY_MODE.md
Comment on lines 71 to +75
| `--github-api-url` | `https://api.github.com` | Upstream GitHub API URL |
| `--tls` | `false` | Enable HTTPS with auto-generated self-signed certificates |
| `--tls-dir` | `<log-dir>/proxy-tls` | Directory for generated TLS certificate files |
| `--trusted-bots` | *(disabled)* | Additional trusted bot usernames (comma-separated, extends built-in list) |
| `--trusted-users` | *(disabled)* | User logins that receive approved integrity (comma-separated) |
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

In the flags table, the --github-api-url default is shown as https://api.github.com, but the actual behavior is: empty by default, then auto-derived from GITHUB_API_URL/GITHUB_SERVER_URL, and only then falls back to https://api.github.com (see internal/cmd/proxy.go flag help + runProxy resolution). Update the Default column to reflect this auto-derive behavior so the table matches runtime behavior.

Copilot uses AI. Check for mistakes.
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-03-29

3 participants