OSIS _find dispatch drops typed FindParams — every filter returns the unfiltered union #140
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_blueprint#140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Every
<RootObject>_findcall against an OSIS service returns every row of the type regardless of the filter the caller passed. The dispatch adapter (crates/osis/src/rpc/rpc2_adapter.rs::extract_data) pre-dates the typed_findintroduced by hero_rpc#123 — it still extractsparams.query(the legacy text-search string), but the typed API sendsparams.params(a<RootObject>FindParamsobject).When the lookup misses,
extract_datareturns the empty string.handle_rpc_callthen parses that into an empty JSON object and forwards it to the generated<type>_rpc_findhandler, which doesparams.get("params")→None→ falls back toIndexedMultiFindParams::default()(all-Nonefilters).to_indexer_querylowers that to the discriminator-only_type = <type>query, which matches every row of that type.Symptom on the hero_service E2E suite: every
indexed_multi_find_*/indexed_single_find_*/indexed_non_str_find_*test returns the full seeded set. Bypassing the OSIS dispatch (crates/osis/tests/indexer_smoke.rs) works correctly — the bug is purely in the wire-to-handler hop.Goals
extract_data("find", ...)preserves the whole params wrapper (same shape as"new"/"set") so the typedFindParamsreaches the dispatcher intact.extract_data_find_pulls_queryunit test is replaced with a_preserves_typed_params_wrappertest that pins the new contract.cargo test --workspace --test indexed_multi_find_e2eagainst hero_service @fe8c78ad: 6/7 green (the remainingtitle_prefixfailure is a separate hero_indexer case-sensitivity bug, filed as hero_indexer#TBD).Completed
Fixed in PR #141 (squash-merged into
development).crates/osis/src/rpc/rpc2_adapter.rs::extract_datanow treats"find"like"new"/"set"— the whole params wrapper ({"ctx": null, "params": <FindParams-JSON>}) passes through to the dispatcher, which deserialises the typedFindParamsfromparams.params.extract_data_find_pulls_queryunit test withextract_data_find_preserves_typed_params_wrapper.Verification
cargo test --features rpc --lib rpc2_adapter— 9/9 pass.fe8c78adE2E:indexed_multi_find_*6/7 → 7/7 after pairing with hero_indexer#31;indexed_single_find_*andindexed_non_str_find_*likewise green.indexed_multi_full_lifecycle,greeter_*,bench_e2e— no regressions.