Skip to content

feat(filter): improve store filter init, scoping, and shared constants#646

Open
leseb wants to merge 2 commits into
praxis-proxy:mainfrom
leseb:leseb/store-infra-635
Open

feat(filter): improve store filter init, scoping, and shared constants#646
leseb wants to merge 2 commits into
praxis-proxy:mainfrom
leseb:leseb/store-infra-635

Conversation

@leseb

@leseb leseb commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Wire ResponseStoreRegistry through the server reload/watcher pipeline so hot-reload preserves store state
  • Eagerly init response store in on_request_body for StreamBuffer pre-read compatibility
  • Replace init_store() with get_or_init_store() retry logic
  • Dedup shared constants (DEFAULT_STORE_NAME, TENANT_METADATA_KEY, DEFAULT_TENANT_ID) to responses/mod.rs
  • Update integration test assertions for the new messages schema (input + output)

Context

This extracts store infrastructure improvements from #604 (rehydrate filter) into a standalone PR. These changes are prerequisites for the rehydrate filter but independently valuable — they fix store initialization ordering, improve hot-reload support, and prepare shared constants for cross-filter use.

Stacked on #635 (ResponsesState).

Test plan

  • make lint passes
  • cargo test -p praxis-proxy-filter --features ai-inference passes
  • CI passes (store unit tests, integration tests)

Signed-off-by: Sébastien Han seb@redhat.com

@leseb leseb requested review from a team June 22, 2026 13:33
@praxis-bot-app

Copy link
Copy Markdown

PR too large: 962 lines added (limit: 750, excludes Cargo files, tests, docs, examples, and benchmarks). Please split into smaller PRs. Add skip/pr-conventions label to override.

@leseb leseb added the skip/pr-conventions Skip conventions checks for PRs label Jun 22, 2026
@leseb leseb marked this pull request as draft June 22, 2026 13:35
@leseb

leseb commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

draft because on top #635

@leseb leseb force-pushed the leseb/store-infra-635 branch from 7e2b775 to 8872c82 Compare June 22, 2026 14:25
leseb added 2 commits June 22, 2026 16:51
Wire ResponseStoreRegistry through server reload/watcher pipeline.
Eagerly init store in on_request_body for StreamBuffer pre-read,
replace init_store with get_or_init_store retry logic, dedup shared
constants to responses/mod.rs, and update integration test assertions
for the new messages schema.

Signed-off-by: Sébastien Han <seb@redhat.com>
The pipeline_persists_rehydrated_messages_when_response_omits_input
test depends on the openai_responses_rehydrate filter which lives in
the rehydrate PR (praxis-proxy#604). Move it there.

Signed-off-by: Sébastien Han <seb@redhat.com>
@leseb leseb force-pushed the leseb/store-infra-635 branch from 8872c82 to c3a6e2e Compare June 22, 2026 14:52
@leseb leseb marked this pull request as ready for review June 22, 2026 14:52
@leseb leseb enabled auto-merge June 22, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip/pr-conventions Skip conventions checks for PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant