Skip to content

Reconcile config/docs for TOML-only rate-limit fields and legacy JSON stdin aliases#6916

Merged
lpcox merged 3 commits into
mainfrom
copilot/fix-serverconfig-json-tags
Jun 2, 2026
Merged

Reconcile config/docs for TOML-only rate-limit fields and legacy JSON stdin aliases#6916
lpcox merged 3 commits into
mainfrom
copilot/fix-serverconfig-json-tags

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

Nightly docs reconciliation flagged three drift points: TOML-only rate-limit fields in ServerConfig still advertised JSON tags, TAVILY_API_KEY missing from AGENTS.md, and undocumented legacy JSON stdin timeout aliases. This PR aligns implementation metadata and operator-facing docs with current behavior.

  • Config metadata: make TOML-only intent explicit

    • Updated ServerConfig.RateLimitThreshold and ServerConfig.RateLimitCooldown to json:"-" in internal/config/config_core.go.
    • Keeps TOML support unchanged while removing misleading JSON deserialization signals.
  • Behavior guardrail: assert tag contract

    • Added a focused test in internal/config/rate_limit_config_test.go to assert both rate-limit fields are excluded from JSON tags.
  • Docs: close gaps in agent/operator references

    • Added TAVILY_API_KEY to the environment variable list in AGENTS.md.
    • Documented accepted legacy JSON stdin aliases connect_timeout and tool_timeout (preferred: connectTimeout/toolTimeout) in:
      • README.md
      • AGENTS.md
// internal/config/config_core.go
RateLimitThreshold int `toml:"rate_limit_threshold" json:"-"`
RateLimitCooldown  int `toml:"rate_limit_cooldown" json:"-"`

Copilot AI linked an issue Jun 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix misleading json tags on TOML-only fields in ServerConfig Reconcile config/docs for TOML-only rate-limit fields and legacy JSON stdin aliases Jun 2, 2026
Copilot finished work on behalf of lpcox June 2, 2026 23:19
Copilot AI requested a review from lpcox June 2, 2026 23:19
@lpcox lpcox marked this pull request as ready for review June 2, 2026 23:21
Copilot AI review requested due to automatic review settings June 2, 2026 23:21
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

Aligns configuration metadata and operator/agent documentation with the gateway’s actual behavior around TOML-only rate-limit fields and legacy JSON stdin timeout aliases, reducing drift flagged by nightly docs reconciliation.

Changes:

  • Mark ServerConfig rate-limit fields as TOML-only by excluding them from JSON tags (json:"-").
  • Add a unit test asserting the JSON tag exclusion contract for those rate-limit fields.
  • Update README/AGENTS docs to mention legacy JSON stdin timeout aliases and add TAVILY_API_KEY to the environment variable list.
Show a summary per file
File Description
README.md Documents legacy JSON stdin timeout aliases for backward compatibility.
internal/config/rate_limit_config_test.go Adds a reflection-based test asserting rate-limit fields are excluded from JSON tags.
internal/config/config_core.go Updates rate-limit struct tags to json:"-" to reflect TOML-only support.
AGENTS.md Documents legacy JSON stdin timeout aliases and adds TAVILY_API_KEY to env var list.

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 thread AGENTS.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@lpcox lpcox merged commit 6556123 into main Jun 2, 2026
16 checks passed
@lpcox lpcox deleted the copilot/fix-serverconfig-json-tags branch June 2, 2026 23:27
@github-actions github-actions Bot mentioned this pull request Jun 5, 2026
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-06-01

3 participants