refactor(config): audit API surface + deprecate ipinfo_* fields (O3)#27
Open
rennf93 wants to merge 1 commit into
Open
refactor(config): audit API surface + deprecate ipinfo_* fields (O3)#27rennf93 wants to merge 1 commit into
rennf93 wants to merge 1 commit into
Conversation
Add a scoped public-API-surface audit (docs/internals/api-surface-audit.md) inventorying all 90 SecurityConfig fields and both export lists, grouped by domain with a keep/deprecate/group/remove recommendation and file:line each. Wire the safe, non-breaking pieces flagged by the audit: - ipinfo_token and ipinfo_db_path, long self-described as deprecated, now emit a runtime DeprecationWarning when explicitly set (model_validator keyed on model_fields_set, so it fires once at construction, never on default/internal access). Both fields keep working; removal targeted for a future major. - Targeted filterwarnings entry keeps existing fixtures quiet; dedicated tests assert the warning still fires. The export single-source-of-truth recommendation is documented here; the fastapi-guard consumer side ships with that adapter. No field removed, no detection/middleware behavior changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design-partner feedback O3 — a scoped audit + targeted, non-breaking tightening of the guard-core public API surface. No field removed, no detection/middleware behavior changed.
Audit (
docs/internals/api-surface-audit.md)A full inventory of the public surface with a recommended action per item:
SecurityConfigfields, grouped by domain, each with a keep/deprecate/group/remove recommendation andmodels.pyline.to_agent_config.Safe wiring (non-breaking)
ipinfo_tokenandipinfo_db_path— long self-described as deprecated — now emit a runtimeDeprecationWarningwhen explicitly set (amodel_validatorkeyed onmodel_fields_set, so it fires once at construction, never on default or internal access). Both keep working; removal targeted for a future major.filterwarningsentry keeps existing fixtures quiet; dedicated tests assert the warning still fires.The export single-source-of-truth is implemented on the fastapi-guard consumer side (its O3 PR derives
__all__fromguard_core.__all__).Verification
Part of the coordinated guard-core 3.2.0 release (with O1/O2, O4, O5, O6).