Skip to content

test(cel): pin stdlib-vs-custom and namespace-vs-scalar collision pre… - #83

Open
aviavissar wants to merge 1 commit into
praxis-proxy:mainfrom
aviavissar:test/cel-pin-collision-precedence-#3
Open

test(cel): pin stdlib-vs-custom and namespace-vs-scalar collision pre…#83
aviavissar wants to merge 1 commit into
praxis-proxy:mainfrom
aviavissar:test/cel-pin-collision-precedence-#3

Conversation

@aviavissar

Copy link
Copy Markdown

Closes #3

Pins CEL PDP collision-precedence that already exists in code. Tests only; no behavior change.

  • Custom size vs stdlib: matching stdlib overload runs (size('hello') == 5); custom runs only when stdlib has no matching form (size(42) == 777).
  • Bag tree: namespace wins over scalar on the same path, in both insert orders.

Supersedes #58 (same commit; branch was renamed).

…cedence

Signed-off-by: aviavissar <aviavissar@gmail.com>
@aviavissar
aviavissar requested a review from a team September 6, 2026 13:32

@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.

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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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.

test(CEL PDP): collision-precedence rules (stdlib shadowing, bag namespace-vs-scalar) lack test coverage

2 participants