Skip to content

feat: identify routing-cycle errors by code and pointer - #373

Merged
han4wluc merged 2 commits into
mainfrom
feat/routing-cycle-error-code
Oct 1, 2026
Merged

han4wluc merged 2 commits into
mainfrom
feat/routing-cycle-error-code

Conversation

@han4wluc

@han4wluc han4wluc commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

The error thrown when a dispatch exceeds 1,000 synchronous effect batches now carries code: "routing_cycle" and pointer: { sectionId, lineId } for the line where the limit was reached. The message is unchanged.

Why
Hosts need to tell an immediate routing cycle apart from other engine failures. Until now the only way was matching the message text. RouteVN Creator does that today (RouteVN/routevn-creator-client#1224) to show a specific "transitions keep repeating" alert in Preview. With a code it can check error.code, and with the pointer it can name the scene and section in that alert.

Changes

  • src/RouteEngine.js: sets code and pointer on the limit error.
  • docs/RouteEngine.md: documents both fields and says to identify the error by code.
  • spec/integration/projectRobustness.integration.test.js: the bounded routing tests assert code and pointer for the initialization loop and the Auto-tick loop. Adds a Section Transition self-loop case, which is how authors usually hit this in the creator.

Verified
bun run lint, bun run check:test-markers, Prettier on the changed files, and bun run test (90 files, 2,163 tests) pass. VT was not run; no rendering path changed.

Version
Bumps package.json to 1.46.5, in the same separate-commit style as earlier releases.

The error thrown when a dispatch exceeds 1,000 synchronous effect
batches carried only a message, so hosts had to match its text to tell
an immediate routing cycle apart from other failures.

It now also has code "routing_cycle" and pointer { sectionId, lineId }
for the line where the limit was reached. The message is unchanged.
Adds a Section Transition self-loop case to the bounded routing tests.
@han4wluc
han4wluc merged commit 5e32217 into main Oct 1, 2026
25 checks passed
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