Panic-prone shortcut blocked before write

A repository-written `expect(...)` shortcut in the websocket stream reached the pre-write lane and was blocked through `RUST-ANTI-PANIC-001`, with a concrete rule, file path, and remediation before the write could land.

Last checked 2026-03-26Musha, SadaveRUST-ANTI-PANIC-001

Panic-prone shortcut blocked before write

Summary

A repository-written expect(...) reached the write lane and was rejected before it could land in shared Rust code, with the rule, file, and remediation preserved at the moment of rejection.

Trigger

let last = session.last_response.as_ref().expect("last_response");

The shortcut itself was the problem. It introduced a panic edge into repository-written Rust instead of returning an explicit error.

System response

The hook emitted BLOCK with RUST-ANTI-PANIC-001, named the offending file, and pointed remediation toward explicit error handling such as ?, ok_or_else, or typed errors. The preserved report and mirror MCR keep the same rule, location, and fragment together.

Outcome

The write did not proceed. The rejection stayed attached to a concrete report trail, and the exact shortcut remained easy to inspect later.

Why it mattered

Error-handling discipline stayed close to the event: the shortcut never became accepted code, and later readers do not have to reconstruct why it was rejected from memory.

Current note

The exact snippet is no longer present in current source, but the rejection remains verified through the preserved report trail.