Skip to content

docs(filters): refresh on_invalid type rendering - #613

Open
aslakknutsen wants to merge 1 commit into
praxis-proxy:mainfrom
aslakknutsen:doc_refresh
Open

docs(filters): refresh on_invalid type rendering#613
aslakknutsen wants to merge 1 commit into
praxis-proxy:mainfrom
aslakknutsen:doc_refresh

Conversation

@aslakknutsen

Copy link
Copy Markdown
Contributor

Summary

Regenerate filter docs so on_invalid fields use the OnInvalidBehavior type name instead of stale union literals.

Related issue

N/A

Validation

  • cargo xtask generate-filter-docs
  • cargo xtask lint-filter-docs (up to date)
  • make lint (green after regenerate)

Checklist

  • I reviewed every changed line and can explain the change.
  • Tests are added or updated when behavior changes.
  • New capabilities include an example config and functional example test.
  • User-facing behavior and generated documentation are updated.
  • Performance-sensitive changes include appropriate benchmark or load-test evidence.
  • Commits are signed and include a Signed-off-by trailer.

Breaking changes

None.

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>
@aslakknutsen
aslakknutsen requested review from a team and alexsnaps July 29, 2026 23:48

@praxis-bot praxis-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/filters/mcp.md
| `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. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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).

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.

2 participants