Skip to content

fix(model): fail closed when a validation condition cannot be evaluated - #3398

Merged
bpamiri merged 2 commits into
developfrom
cursor/model-eval-condition-fail-closed-ceb0
Aug 24, 2026
Merged

fix(model): fail closed when a validation condition cannot be evaluated#3398
bpamiri merged 2 commits into
developfrom
cursor/model-eval-condition-fail-closed-ceb0

Conversation

@bpamiri

@bpamiri bpamiri commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

$evaluateCondition was fail-open when showErrorInformation is false: an unevaluable condition / unless expression was logged and the helper returned false, which $validate treats as “skip this validation.” A broken expression therefore skipped the guard in production.

This PR always throws Wheels.InvalidValidationCondition (same type and message shape as the existing development path) regardless of showErrorInformation.

Type of Change

  • Bug fix
  • New feature
  • Enhancement to existing feature
  • Documentation update
  • Refactoring

Feature Completeness Checklist

  • DCO sign-off -- Every commit carries Signed-off-by:
  • Tests -- Specs in vendor/wheels/tests/specs/model/validationsSpec.cfc assert throw on unevaluable condition and unless when showErrorInformation=false
  • Framework Docs -- No public API change; not required
  • AI Reference Docs -- Not required
  • CLAUDE.md -- Not required
  • Changelog fragment -- changelog.d/evaluate-condition-fail-closed.fixed.md
  • Test runner passes -- Red then green on the named filter

Test Plan

Driver (directory scope — a single-file directory= discovers 0 bundles):

wheels test --core --ci --filter=wheels.tests.specs.model
  1. Red (test-only commit 7220553c2): 967 passed, 2 failed. Both new specs: “The incoming function did not throw an expected exception. Type=[Wheels.InvalidValidationCondition]”.
  2. Green (after 8c1af9c5f): 969 passed.

Hardener M1

ID Claim Status Filter / evidence
M1 $evaluateCondition fail-closed when showErrorInformation=false PROVEN (after green) wheels test --core --ci --filter=wheels.tests.specs.model — red 967/2, green 969

HEAD: 8c1af9c5f5331d3c1907f5ffd3a6e20698c64c69

Does not close unrelated issues. Does not start M2–M10.

Open in Web Open in Cursor 

…o evaluate

Prove-red for M1: unevaluable condition/unless must throw
Wheels.InvalidValidationCondition even when showErrorInformation is false.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Peter Amiri <peter@alurium.com>
Always throw Wheels.InvalidValidationCondition when condition/unless
cannot be evaluated, including when showErrorInformation is false.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Peter Amiri <peter@alurium.com>
@github-actions github-actions Bot added the docs label Aug 24, 2026
@bpamiri
bpamiri marked this pull request as ready for review August 24, 2026 03:37
@bpamiri
bpamiri merged commit 5365a13 into develop Aug 24, 2026
13 checks passed
@bpamiri
bpamiri deleted the cursor/model-eval-condition-fail-closed-ceb0 branch August 24, 2026 03:37
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.

2 participants