Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Conversation

@johnnyt
Copy link
Member

@johnnyt johnnyt commented Aug 25, 2025

Upgrades predicator from v2.0 to v3.0 and implements comprehensive assign element support:

Predicator v3.0 Integration:

  • Upgrades predicator dependency to v3.0 with enhanced nested property access
  • All existing tests pass with no breaking changes
  • Enables new features: context_location/2, value evaluation, mixed access patterns

New SC.ValueEvaluator Module:

  • Handles non-boolean expression evaluation using predicator v3.0 capabilities
  • Supports nested property access (user.profile.name)
  • Mixed bracket/dot notation (users['john'].active)
  • Location path validation for assignments via context_location/2
  • Comprehensive error handling and type-safe operations

SCXML Assign Element Support:

  • Full parsing and execution
  • Integrated assign action execution in onentry/onexit blocks
  • Location-based assignment with path validation
  • Expression evaluation with SCXML context (events, state, datamodel)
  • Graceful error handling with detailed logging

StateChart Data Model:

  • Added data_model field to StateChart for variable storage
  • Added current_event field for expression context
  • Helper methods for data model updates
  • Full integration with SCXML processing model

Parser Extensions:

  • Extended SCXML parser to handle assign elements
  • Added assign action building with location tracking
  • StateStack integration for action collection
  • Mixed action parsing (log, raise, assign together)

Feature Detection:

  • Updated assign_elements feature to :supported status
  • Tests now recognize assign capability

Test Coverage:

  • 556 tests pass with 92.9% coverage
  • 85 regression tests pass
  • Comprehensive unit and integration tests
  • Log capture for clean test output

This enables dynamic data model manipulation during state machine execution and provides the foundation for Phase 2 datamodel features.

🤖 Generated with Claude Code

Upgrades predicator from v2.0 to v3.0 and implements comprehensive assign element support:

**Predicator v3.0 Integration:**
- Upgrades predicator dependency to v3.0 with enhanced nested property access
- All existing tests pass with no breaking changes
- Enables new features: context_location/2, value evaluation, mixed access patterns

**New SC.ValueEvaluator Module:**
- Handles non-boolean expression evaluation using predicator v3.0 capabilities
- Supports nested property access (user.profile.name)
- Mixed bracket/dot notation (users['john'].active)
- Location path validation for assignments via context_location/2
- Comprehensive error handling and type-safe operations

**SCXML Assign Element Support:**
- Full <assign location="..." expr="..."/> parsing and execution
- Integrated assign action execution in onentry/onexit blocks
- Location-based assignment with path validation
- Expression evaluation with SCXML context (events, state, datamodel)
- Graceful error handling with detailed logging

**StateChart Data Model:**
- Added data_model field to StateChart for variable storage
- Added current_event field for expression context
- Helper methods for data model updates
- Full integration with SCXML processing model

**Parser Extensions:**
- Extended SCXML parser to handle assign elements
- Added assign action building with location tracking
- StateStack integration for action collection
- Mixed action parsing (log, raise, assign together)

**Feature Detection:**
- Updated assign_elements feature to :supported status
- Tests now recognize assign capability

**Test Coverage:**
- 556 tests pass with 92.9% coverage
- 85 regression tests pass
- Comprehensive unit and integration tests
- Log capture for clean test output

This enables dynamic data model manipulation during state machine execution and provides the foundation for Phase 2 datamodel features.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 84.33735% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/sc/value_evaluator.ex 87.50% 6 Missing ⚠️
lib/sc/actions/action_executor.ex 0.00% 3 Missing ⚠️
lib/sc/parser/scxml/state_stack.ex 60.00% 2 Missing ⚠️
lib/sc/state_chart.ex 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
lib/sc/actions/assign_action.ex 100.00% <100.00%> (ø)
lib/sc/feature_detector.ex 98.38% <ø> (ø)
lib/sc/parser/scxml/element_builder.ex 100.00% <100.00%> (ø)
lib/sc/parser/scxml/handler.ex 100.00% <100.00%> (ø)
lib/sc/parser/scxml/state_stack.ex 97.77% <60.00%> (-2.23%) ⬇️
lib/sc/state_chart.ex 84.61% <0.00%> (-15.39%) ⬇️
lib/sc/actions/action_executor.ex 88.23% <0.00%> (-8.54%) ⬇️
lib/sc/value_evaluator.ex 87.50% <87.50%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

**CHANGELOG.md:**
- Comprehensive unreleased section documenting Phase 1 Enhanced Expression Evaluation
- Details predicator v3.0 upgrade with enhanced nested property access capabilities
- Documents SC.ValueEvaluator module with all functions and capabilities
- Complete assign element support documentation with examples
- StateChart data model enhancements and parser extensions
- Updated dependency information and technical improvements
- Added practical examples for basic assign, mixed notation, and programmatic usage

**CLAUDE.md (Project Instructions):**
- Updated working features to include assign elements, value evaluation, and data model support
- Corrected predicator version references from v2.0 to v3.0 throughout
- Updated test counts (556 tests, 85 regression tests, 92.9% coverage)
- Added new Core Components section for Expression Evaluation and Data Model
- Added Actions and Executable Content section documenting SC.Actions modules
- Updated dependencies to reflect predicator v3.0
- Added comprehensive test documentation for new test modules
- Updated main failure categories to reflect assign support

**README.md:**
- Added assign elements, value evaluation, and data model integration to features
- Updated working features section with predicator v3.0 and enhanced capabilities
- Updated planned features to reflect assign element completion
- Added comprehensive assign elements example showing nested properties and mixed notation
- Updated executable content progress in Future Extensions section

All documentation now accurately reflects the current state with predicator v3.0 integration and complete assign element support, providing clear examples and comprehensive feature coverage for users and developers.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@johnnyt johnnyt merged commit 2e92cb6 into main Aug 25, 2025
16 of 17 checks passed
@johnnyt johnnyt deleted the value-evaluator branch August 25, 2025 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants