Skip to content

docs: correct API & config reference to match source#91

Merged
rennf93 merged 4 commits into
masterfrom
fix/clarity-integrity-remediation
Jun 22, 2026
Merged

docs: correct API & config reference to match source#91
rennf93 merged 4 commits into
masterfrom
fix/clarity-integrity-remediation

Conversation

@rennf93

@rennf93 rennf93 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Runtime-grounded documentation accuracy pass (part of the cross-repo clarity/integrity remediation).

Fixes inaccuracies that would break a copy-pasting user or silently no-op under Pydantic extra='ignore':

  • Real SecurityConfig field names/defaults; enforce_https (not enable_https); correct detection-exclusion field names.
  • Async signatures: extract_client_ip (async, agent_handler), cloud refresh, setup_custom_logging.
  • IPBanManager.ban_ip reason param, RedisManager int | None returns, keyword-only middleware config.
  • Pydantic v2 serialization API; removed a non-existent env-var system and four non-existent models; nav orphan linked.

Docs-only; every claim verified against guard_core/guard source.

rennf93 added 3 commits June 2, 2026 19:36
Use the bare agent_endpoint host and remove the deprecated manual
AgentConfig/guard_agent()/lifespan wiring; the SecurityMiddleware drives
the agent lifecycle. Adding the /api/v1 suffix or a second agent caused
silent telemetry loss.
…T37)

A missing guard-agent package previously fell through to the misleading
"configuration is invalid / Check agent_api_key" message. Try the import
first so a missing package logs "pip install guard-agent", and only read
to_agent_config() after a successful import, where a None result now
unambiguously means a genuine missing-key/config error (logged at ERROR).
Fix runtime inaccuracies from a cross-repo docs audit: real SecurityConfig field names/defaults, async signatures (extract_client_ip, cloud refresh), enforce_https (not enable_https), IPBanManager/RedisManager signatures, detection-exclusion field names, Pydantic v2 serialization, and the nav orphan.
@github-actions github-actions Bot added documentation Docs, README, CHANGELOG, governance files area: middleware Touches guard/middleware.py (ASGI middleware adapter) labels Jun 22, 2026
@rennf93 rennf93 merged commit eea8dbe into master Jun 22, 2026
10 checks passed
@rennf93 rennf93 deleted the fix/clarity-integrity-remediation branch June 22, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: middleware Touches guard/middleware.py (ASGI middleware adapter) documentation Docs, README, CHANGELOG, governance files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant