fix: Panic on missing operator in Reload handler#1439
fix: Panic on missing operator in Reload handler#1439ashnaaseth2325-oss wants to merge 1 commit into
Conversation
Prevents a panic when a Reload event arrives with an unknown operator_id. Uses the same let-else pattern already applied to Event::Input and Event::InputClosed in the same match block. Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
16cfae8 to
452a2dd
Compare
|
Hello @phil-opp, |
|
Hi @phil-opp, following up on this PR . |
|
Hi @phil-opp, |
|
Sorry for the delay, but please don't ping me so often. Needs a rebase, then we can merge |
|
Hi @ashnaaseth2325-oss — thanks for spotting this panic and the clean fix. Closing this PR but the fix is being rescued and the credit is preserved in #1850. Your analysis was right: the @phil-opp approved on 2026-03-29 with one ask — "Needs a rebase, then we can merge" — but you didn't get back to it. I'm sorry if the review tone discouraged you from following up; the rebase ask was just a mechanical update against main, not a substantive concern, and the work itself was solid. #1850 is your commit cherry-picked onto current main verbatim — the git Author field stays as you (cherry-pick preserves authorship), and the rescue commit body explicitly references this PR. When #1850 lands, your name is on the merge commit history as the original author. Two notes for next time, both small:
Reopen anything you'd like to revisit, or pick another good first issue when you have time. Thanks again for the contribution. |
…ue of #1439) (#1850) fix(runtime): replace unwrap with guard in Reload event handler Prevents a panic when a Reload event arrives with an unknown operator_id. Uses the same let-else pattern already applied to Event::Input and Event::InputClosed in the same match block. Rescue of #1439 (ashnaaseth2325-oss). Phil-opp approved the original PR on 2026-03-29 with one ask -- "Needs a rebase, then we can merge" -- but the author hasn't returned in 7 weeks. The fix is unchanged from the approved version (the only conflict was merge-base drift; the actual hunk applies cleanly to current main and lines up exactly with the let-else pattern at binaries/runtime/src/lib.rs:264, 291). Co-authored-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1. SUMMARY
This PR fixes a runtime panic in the
Reloadevent handler by safely handling missing operator channels instead of unwrapping. The change is localized tobinaries/runtime/src/lib.rsin therun()function and aligns behavior with existing patterns used in other event handlers.2. FIX
3. VERIFICATION
Triggered a
Reloadevent with a missingoperator_id. Previously, this caused a panic; now it logs a warning and continues execution, confirming the fix.