Skip to content

fix(world): log swallowed applyWorldCommand errors - #436

Merged
scrimshawlife-ctrl merged 1 commit into
mainfrom
fix/successor-enter-internal
Aug 21, 2026
Merged

scrimshawlife-ctrl merged 1 commit into
mainfrom
fix/successor-enter-internal

Conversation

@scrimshawlife-ctrl

Copy link
Copy Markdown
Contributor

COMMAND_FAILED after #435 still has no stack. Log the throw. No reseed.

@scrimshawlife-ctrl
scrimshawlife-ctrl requested a review from a team as a code owner August 21, 2026 02:39
@scrimshawlife-ctrl
scrimshawlife-ctrl force-pushed the fix/successor-enter-internal branch from f994bbf to f0040ca Compare August 21, 2026 02:40
@scrimshawlife-ctrl
scrimshawlife-ctrl merged commit 2e16976 into main Aug 21, 2026

@prabu-openclaw prabu-openclaw 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.

Scope is broader than the title suggests ("log swallowed applyWorldCommand errors"): this also (1) resets this.world/this.meta to null when a preview health-bind isn't admitted, to stop PLAY from reusing a stale in-memory world on the same isolate, and (2) wraps applyCommand in try/catch in the DO's /command handler so uncaught exceptions become a structured COMMAND_FAILED response instead of a 500. Both changes look correct and are well covered by the new enter-command-do.test.ts (which specifically exercises the stale-world-reuse and no-500-on-ENTER scenarios), and the FROZEN_GENESIS_ID inlining matches the current constant value in genesis.ts.

However, the worker CI check is currently failing for real reasons introduced by this PR, not pre-existing noise: test/enter-command-do.test.ts builds PlayerPrincipal objects missing the now-required protocol_version and authentication_context fields (lines 80, 135), which fails typecheck. (test/genesis-successor.test.ts:106 also fails on a missing request_id in CommandEnvelope, but that file isn't touched by this diff, so that one may be pre-existing on main -- worth confirming separately.) The test and llm-agent jobs pass fine since they don't run the strict tsc --noEmit step.

Given the DO-level exception handling and in-memory-state-reset behavior here directly affects world-state consistency, I'd rather a human confirm the fix is complete once the typecheck failure in the new test file is resolved, rather than approve with a known-broken worker build.

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