Skip to content

chore(cli/bundle): make null-ctx dispatcher panic explicit#292

Merged
indaco merged 1 commit intomainfrom
chore/explicit-bundle-dispatcher-null-panic
May 7, 2026
Merged

chore(cli/bundle): make null-ctx dispatcher panic explicit#292
indaco merged 1 commit intomainfrom
chore/explicit-bundle-dispatcher-null-panic

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented May 7, 2026

Description

The bundle dispatcher's opaque ctx slot is ?*anyopaque for ABI symmetry with the runner, but every cli call path sets it before invoking. The cast helper used ctx.?, so a future site that wires the dispatcher without going through runDispatcher/cleanupDispatcher would crash with a bare "safety unreachable" panic instead of a message that names the contract that was broken.

This swaps the unwrap for orelse @panic with a wiring-bug message. Behaviour is unchanged on every current call path - the panic is reachable only from a misuse that today's code cannot produce. Release binary is byte-identical.

Related Issue

  • None

Notes for Reviewers

  • None

@indaco indaco merged commit f9c0fde into main May 7, 2026
3 checks passed
@indaco indaco deleted the chore/explicit-bundle-dispatcher-null-panic branch May 7, 2026 15:49
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