Skip to content

fix(core): address v6 transition, typing, inspection and graph feedback - #5817

Merged
davidkpiano merged 12 commits into
nextfrom
feature/v6-feedback-9-fixes
Oct 19, 2026
Merged

davidkpiano merged 12 commits into
nextfrom
feature/v6-feedback-9-fixes

Conversation

@davidkpiano

@davidkpiano davidkpiano commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Why

Transition selection could lose enqueued effects inside try/catch, schema inference accepted misspelled context keys, and inspection could misattribute events or turn observer exceptions into actor failures. Preserve those contracts and make graph evaluation failures actionable.

What changed

  • Record ordinary enqueue calls and apply their effects only for selected transitions. Preserve caught speculative actor operations and isolate parent sends from losing transitions.
  • Preserve schema context types in callbacks and snapshots, and infer invoke input mapper arguments for actors with unknown or any input.
  • Keep each queued event with its sender, isolate inspection observers, and include state, event, and original cause in graph evaluation errors.

Scope

  • Core XState and graph utilities, regression tests, related documentation, and a patch Changeset.
  • Devtools hooks remain deferred.

Tradeoffs

Reference-producing enqueue calls and direct parent sends retain speculative aborts and reevaluation to avoid initializing actors during selection. Catching those aborts no longer drops effects. Graph traversal still requires representative event payloads and does not infer every dynamic target.

Blast Radius

Changes transition selection, schema-derived context types, event provenance, and inspection callbacks. TypeScript now reports schema context misspellings that previously compiled.

Verification

  • The original five bug repros now report 0/5 issues reproduced against the built package. Runtime cases pass in production and development; type cases pass on TypeScript 5.9.3 and 6.0.3. Graph diagnostics retain the original cause and identify state and event.
  • pnpm typecheck, pnpm lint, pnpm format:check, pnpm build, and pnpm check:files pass. Independent correctness review completed; its enqueue-validation finding was fixed and rechecked.
  • pnpm test:core --maxWorkers=1 passes all 162 test files and 2,722 tests, including the declaration-emission tests.

@changeset-bot

changeset-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 63d10c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
xstate Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1814312b-d1f6-466c-84e4-f57caa97263c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@davidkpiano
davidkpiano merged commit 73b2edf into next Oct 19, 2026
4 checks passed
@davidkpiano
davidkpiano deleted the feature/v6-feedback-9-fixes branch October 19, 2026 20:47
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.

1 participant