test(cel): pin stdlib-vs-custom and namespace-vs-scalar collision pre… - #83
test(cel): pin stdlib-vs-custom and namespace-vs-scalar collision pre…#83aviavissar wants to merge 1 commit into
Conversation
…cedence Signed-off-by: aviavissar <aviavissar@gmail.com>
praxis-bot
left a comment
There was a problem hiding this comment.
praxis-bot review
The Rust changes (activation.rs, resolver.rs) are well-structured: the collision-precedence tests pin real behavior with clear assertion messages, and the insert_key utility correctly mirrors production's split logic. The doc comment additions on with_functions document important dispatch semantics.
One concern with scope and one with test coverage below.
Findings: 1 Large, 1 Medium
| @@ -0,0 +1,906 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
[Large] This 906-line Hebrew explainer document is unrelated to the stated PR purpose ("pin CEL PDP collision-precedence... Tests only; no behavior change"). It adds a standalone HTML page with external font dependencies, inline CSS, and relative cross-repo links (../../praxis/filter/...) that will break if either repo's directory structure changes.
Split this into its own PR so the test-pinning change can be reviewed and merged independently. A documentation PR also benefits from its own review pass for link accuracy and content correctness.
| /// (`size`, `matches`, `double`, …). `with_functions` does not | ||
| /// reject a colliding name. Which body runs is decided by CEL, not | ||
| /// by this crate: today CEL tries a matching built-in first | ||
| /// (`size("hello")` stays the standard `size`) and calls the |
There was a problem hiding this comment.
[Medium] The new doc comment states "If two custom setups register the same name, the later one wins" but the test added below (custom_size_stdlib_overload_then_int_fallback) only covers stdlib-vs-custom dispatch. Add a test that registers two custom functions with the same name and signature, then asserts the later registration's body runs. That pins the claim made here and prevents a silent regression if the CEL crate changes registration semantics.
Closes #3
Pins CEL PDP collision-precedence that already exists in code. Tests only; no behavior change.
sizevs stdlib: matching stdlib overload runs (size('hello') == 5); custom runs only when stdlib has no matching form (size(42) == 777).Supersedes #58 (same commit; branch was renamed).