Skip to content

Reconcile guard-policy tags with docs and clarify stdin config behavior in Quick Start#6434

Merged
lpcox merged 2 commits into
mainfrom
copilot/audit-1-fix-toml-tags
May 25, 2026
Merged

Reconcile guard-policy tags with docs and clarify stdin config behavior in Quick Start#6434
lpcox merged 2 commits into
mainfrom
copilot/audit-1-fix-toml-tags

Conversation

Copilot AI commented May 25, 2026

Copy link
Copy Markdown
Contributor

Nightly docs reconciliation flagged two high-impact mismatches: guard policy structs advertised PascalCase TOML tags while docs/examples use kebab-case, and Quick Start implied stdin JSON works universally without clarifying the direct awmg requirement for --config-stdin. This PR aligns configuration metadata with documented keys and removes ambiguity in direct vs containerized startup behavior.

  • Guard policy tag normalization (internal/config/guard_policy.go)

    • Updated TOML tags from PascalCase to documented kebab-case/lowercase keys:
      • AllowOnlyallow-only
      • WriteSinkwrite-sink
      • Acceptaccept
      • MinIntegritymin-integrity
      • plus all related allow-only subfields (blocked-users, approval-labels, etc.)
    • Result: struct metadata now matches docs/examples and future direct TOML decoding expectations.
  • README Quick Start clarification (README.md)

    • Added a callout that run_containerized.sh injects --config-stdin automatically.
    • Added explicit direct-CLI guidance that piped JSON requires --config-stdin.
    • Added a concise cross-reference for containerized-only env vars (MCP_GATEWAY_HOST, MCP_GATEWAY_MODE) to docs/ENVIRONMENT_VARIABLES.md.
  • Focused test fixture update (internal/config/config_guardpolicies_test.go)

    • Updated TOML write-sink fixture/assertion key from Accept to accept to match normalized tags and documented config shape.
[servers.safeoutputs.guard_policies.write-sink]
accept = ["private:github/gh-aw*"]

Copilot AI linked an issue May 25, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix TOML tags in guard_policy.go for compliance Reconcile guard-policy tags with docs and clarify stdin config behavior in Quick Start May 25, 2026
Copilot finished work on behalf of lpcox May 25, 2026 02:56
Copilot AI requested a review from lpcox May 25, 2026 02:56
@lpcox lpcox marked this pull request as ready for review May 25, 2026 02:56
Copilot AI review requested due to automatic review settings May 25, 2026 02:57
@lpcox lpcox merged commit 9a2fee4 into main May 25, 2026
24 of 25 checks passed
@lpcox lpcox deleted the copilot/audit-1-fix-toml-tags branch May 25, 2026 02:58
Copilot AI removed the request for review from Copilot May 25, 2026 03:20
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-24

2 participants