docs(filters): refresh on_invalid type rendering - #613
Conversation
Regenerate filter docs so on_invalid fields show the OnInvalidBehavior type name instead of stale union literals. Signed-off-by: Aslak Knutsen <aslak@4fs.no>
praxis-bot
left a comment
There was a problem hiding this comment.
PR Review
Summary: Regenerates four filter doc files so the on_invalid field type column shows OnInvalidBehavior instead of inline union literals.
Overall: The change introduces a user-facing documentation regression. The previous rendering (`continue` \| `reject` \| `error`) immediately told users which YAML values are accepted. The new rendering (OnInvalidBehavior) is an internal Rust type name that has no meaning in a YAML configuration reference; users must read source code to discover the accepted values. This also creates an inconsistency within the same doc files: other enum fields (e.g. cache_scope, header_validation.mismatch, task_routing.store) still render as inline variants.
The root cause is likely that the xtask's parse_shared_config_items is not resolving the cross-crate OnInvalidBehavior enum from praxis-proxy-filter — possibly because the ai repo's dependency is pinned to a version that predates the on_invalid.rs shared module. The openai_responses_model_rewrite and prompt_enrich docs are unaffected because they define their own local OnInvalidBehavior enums, which the xtask resolves correctly.
| Severity | Count |
|---|---|
| Medium | 1 (across 4 files) |
No findings required placement outside inline comments.
| | `headers.session_present` | string | no | Header name for MCP session presence (e.g. `x-praxis-mcp-session-present`). | | ||
| | `max_body_bytes` | integer | no | Maximum body size in bytes for `StreamBuffer`. | | ||
| | `on_invalid` | `continue` \| `reject` \| `error` | no | Invalid input handling behavior. | | ||
| | `on_invalid` | OnInvalidBehavior | no | Invalid input handling behavior. | |
There was a problem hiding this comment.
[Medium] OnInvalidBehavior is an opaque Rust type name that tells users nothing about the accepted YAML values. The previous rendering (`continue` \| `reject` \| `error`) was immediately useful. The inconsistency is visible in this very table: the next line renders cache_scope as `public` \| `private`, and two rows above header_validation.mismatch renders as `reject` \| `ignore`.
The fix belongs in the xtask, not in the generated docs. parse_shared_config_items parses praxis/filter/src/builtins/http/payload_processing/ and should pick up on_invalid.rs where the enum lives. If the ai repo's praxis-proxy-filter dependency is pinned to a version that predates that file, updating the dependency and regenerating should restore the inline variants.
Same issue in a2a.md (line 26), anthropic_messages_format.md (line 12), and openai_responses_format.md (line 22).
Summary
Regenerate filter docs so
on_invalidfields use theOnInvalidBehaviortype name instead of stale union literals.Related issue
N/A
Validation
cargo xtask generate-filter-docscargo xtask lint-filter-docs(up to date)make lint(green after regenerate)Checklist
Signed-off-bytrailer.Breaking changes
None.