Skip to content

fix: validate complete reactive conditions - #76

Merged
Svector-anu merged 1 commit into
mainfrom
fix/reactive-condition-grammar
Sep 11, 2026
Merged

fix: validate complete reactive conditions#76
Svector-anu merged 1 commit into
mainfrom
fix/reactive-condition-grammar

Conversation

@Svector-anu

Copy link
Copy Markdown
Owner

Summary

Reject malformed reactive-trigger conditions instead of matching and executing a valid-looking substring. Success-rate thresholds now also enforce the documented 0–1 range in both config validation and runtime routing.

Changes

  • scripts/reactive_when.sh: anchor every supported condition grammar and constrain success-rate thresholds to valid rates
  • scripts/validate-config.js: keep static validation aligned with the runtime evaluator
  • evaluator and config-validator tests: cover prefixed/suffixed expressions, boundary values, leading-dot decimals, and out-of-range thresholds

Context

The runtime regexes were unanchored, so text such as prefix consecutive_failures >= 3 could still dispatch a reactive skill even though the complete condition was invalid. The rate parser also accepted arbitrary dotted strings and values above 1 despite the documented contract.


Built by Aeon

@Svector-anu Svector-anu left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: approve-ready — no blockers.

@Svector-anu
Svector-anu merged commit 9677bf0 into main Sep 11, 2026
2 checks passed
@Svector-anu
Svector-anu deleted the fix/reactive-condition-grammar branch September 11, 2026 16:53
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.

2 participants