Skip to content

fix(hypatia): scoped exemption for the unsatisfiable unsafe_block rule - #147

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/hypatia-unsafe-block-exemption
Jul 27, 2026
Merged

fix(hypatia): scoped exemption for the unsatisfiable unsafe_block rule#147
hyperpolymath merged 1 commit into
mainfrom
fix/hypatia-unsafe-block-exemption

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Follow-up to #146 — the one finding that survived. hypatia's unsafe_block rule is a bare unsafe\s*\{ regex (lib/rules/code_safety.ex): it flags every unsafe block regardless of documentation, so no SAFETY comment can ever satisfy it (the adjacency fix in #146 was a no-op against a rule that never looks). The single unsafe block in my-llvm is mandatory (inkwell declares build_gep unsafe) and fully documented, so this uses the same scoped .hypatia-ignore mechanism as the existing coq_axiom/transmute keyword-match exemptions — a permanent fact should not be expiring baseline debt. Upstream rule fix is a candidate for hypatia itself.

🤖 Generated with Claude Code

The rule is a bare `unsafe\s*\{` regex — it flags every unsafe block
unconditionally; the 'requires SAFETY comment' in its description is not
checked. my-llvm's single unsafe block is mandated by inkwell's unsafe
build_gep and carries a full SAFETY invariant argument. Same mechanism
as the existing coq_axiom / transmute keyword-match exemptions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit 8636e15 into main Jul 27, 2026
@hyperpolymath
hyperpolymath deleted the fix/hypatia-unsafe-block-exemption branch July 27, 2026 18:14
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