Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 6, 2026

Summary

  • Add explicit panic! for invalid stack states in materializer (Push, EndArr, Set, EndObj, EndEnum)
  • Replace .unwrap_or() with .expect() for node text extraction
  • Use exhaustive match patterns in VM instead of _ => catch-all

Why

These invariants should never fail at runtime. Converting silent failures to panics surfaces bugs during development rather than producing incorrect results.

@zharinov zharinov enabled auto-merge (squash) January 6, 2026 21:22
@zharinov zharinov merged commit 9c709ef into master Jan 6, 2026
4 checks passed
@zharinov zharinov deleted the refactor/engine-invariants branch January 6, 2026 21:23
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