Skip to content

docs(filter): add build-time filter registry proposal - #463

Merged
shaneutt merged 7 commits into
praxis-proxy:mainfrom
leseb:leseb/agentic-api-filter-integration
Jun 8, 2026
Merged

shaneutt merged 7 commits into
praxis-proxy:mainfrom
leseb:leseb/agentic-api-filter-integration

Conversation

@leseb

@leseb leseb commented Jun 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Proposal for a build-time auto-registration mechanism that lets external filter crates self-register into the FilterRegistry. Operators add a Cargo.toml dependency and write YAML config with zero Rust code changes to Praxis. Uses build.rs + cargo metadata discovery with a [package.metadata.praxis-filters] convention and an export_filters! macro.

Test plan

  • Review proposal structure and content
  • Validate design against existing register_filters! and ext-proc patterns
  • Confirm cargo metadata approach handles workspace members and external deps

Signed-off-by: Sébastien Han [email protected]

@leseb
leseb requested review from a team June 2, 2026 14:30
Propose a build.rs + cargo metadata discovery mechanism
that lets external filter crates self-register into the
FilterRegistry at build time. Operators add a Cargo.toml
dependency and write YAML config with zero Rust code
changes to Praxis.

Signed-off-by: Sébastien Han <[email protected]>
@leseb
leseb force-pushed the leseb/agentic-api-filter-integration branch from 5ce8116 to 1a63ad7 Compare June 2, 2026 14:31
@praxis-bot

Copy link
Copy Markdown

Missing Signed-off-by: a432c4f. All commits require sign-off (via git commit --signoff).

@praxis-bot

Copy link
Copy Markdown

Proposal validation failed:

  • docs/proposals/00xxx_build-time-filter-registry.md: missing discussion field in frontmatter
  • docs/proposals/00xxx_build-time-filter-registry.md: new proposals must not include the ## How? section in the first PR. Submit What? and Why? first; add How? in a follow-up.
    See proposal process for requirements. Fix and re-open.

@praxis-bot praxis-bot closed this Jun 2, 2026
@leseb leseb added the skip/proposals Proposal validation bypass label Jun 2, 2026
@leseb leseb reopened this Jun 2, 2026
Submit What? and Why? first. How? will be added in a
follow-up after the proposal direction is accepted.
Also add missing discussion field to frontmatter.

Signed-off-by: Sébastien Han <[email protected]>
@leseb leseb removed the skip/proposals Proposal validation bypass label Jun 2, 2026

@praxis-bot praxis-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PR Review

Summary: Adds a proposal for build-time auto-registration of external filter crates via build.rs + cargo metadata discovery.

Overall: The proposal clearly motivates the problem (step 2 in external filter integration is boilerplate) and is structured correctly as a What? + Why? submission without a premature How? section. A few items need attention: file naming, convention compliance, and some technical clarifications.

Severity Count
Critical 0
Large 0
Medium 3
Small 2
Nit 2

Findings without inline placement

  • [Medium] docs/proposals/00xxx_build-time-filter-registry.md (filename): The file uses a placeholder 00xxx for the proposal number. Every other proposal in this directory uses the corresponding issue number (e.g., 00063_plugins.md, 00354_responses-api-filters.md). An issue should be created first and the file renamed to match.

  • [Small] docs/proposals/00xxx_build-time-filter-registry.md (frontmatter): The issue: and discussion: fields are # TBD (YAML comments, so they parse as null). Other proposals populate these with actual URLs. If no issue exists yet, leave them as empty strings or create the issue first.

@shaneutt shaneutt added this to the v0.4.0 milestone Jun 2, 2026
Remove remaining em-dashes per project conventions.
Clarify that auto-registered duplicates panic because
there is no caller to propagate the Result to, while
manual registry.register() continues to return Result.
Add boundary note distinguishing filter registration
from plugin/hook discovery (praxis-proxy#63).

Signed-off-by: Sébastien Han <[email protected]>
@shaneutt
shaneutt requested a review from usize June 3, 2026 12:13

@shaneutt shaneutt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems reasonable to park and keep considering as a future need, thank you @leseb

@shaneutt
shaneutt merged commit 6348f4c into praxis-proxy:main Jun 8, 2026
19 checks passed
@leseb
leseb deleted the leseb/agentic-api-filter-integration branch June 9, 2026 07:51
mkoushni pushed a commit to mkoushni/praxis that referenced this pull request Jun 10, 2026
* fix(ci): fix bash syntax error and regex bug in conventions workflow (praxis-proxy#456)

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): add build-time filter registry proposal

Propose a build.rs + cargo metadata discovery mechanism
that lets external filter crates self-register into the
FilterRegistry at build time. Operators add a Cargo.toml
dependency and write YAML config with zero Rust code
changes to Praxis.

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): remove How? section per proposal guidelines

Submit What? and Why? first. How? will be added in a
follow-up after the proposal direction is accepted.
Also add missing discussion field to frontmatter.

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): address PR review feedback

Remove remaining em-dashes per project conventions.
Clarify that auto-registered duplicates panic because
there is no caller to propagate the Result to, while
manual registry.register() continues to return Result.
Add boundary note distinguishing filter registration
from plugin/hook discovery (praxis-proxy#63).

Signed-off-by: Sébastien Han <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants