Skip to content

allow unreachable, and expand when to use panic#13636

Open
ShahakShama wants to merge 1 commit intoshahak/style-guide-when-to-return-resultfrom
shahak/style-guide-expand-panic-and-unreachable
Open

allow unreachable, and expand when to use panic#13636
ShahakShama wants to merge 1 commit intoshahak/style-guide-when-to-return-resultfrom
shahak/style-guide-expand-panic-and-unreachable

Conversation

@ShahakShama
Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama commented Mar 31, 2026

Note

Low Risk
Low risk: documentation-only changes with no runtime or API impact. Main risk is behavioral inconsistency if teams interpret the new panic!/unreachable! guidance differently.

Overview
Clarifies the error-handling conventions in style.md by expanding when panic! is appropriate (unrecoverable states vs. bugs) and explicitly allowing unreachable! for provably unreachable code paths while discouraging unimplemented!.

Renames and broadens the messaging guideline section to cover unreachable! (and invariant-style expect) messages, emphasizing documenting why a failure is impossible rather than restating the error.

Written by Cursor Bugbot for commit 1cfd5b0. This will update automatically on new commits. Configure here.

@ShahakShama ShahakShama requested a review from Stavbe March 31, 2026 16:19
@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Collaborator Author

ShahakShama commented Mar 31, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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