Repository navigation
fix(warnings): reject unsafe short-circuit bindings - #61
Merged
Merged
Conversation
mremond
force-pushed
the
fm/task-21440f13
branch
2 times, most recently
from
November 15, 2026 20:46
af58465 to
32377b0
Compare
mremond
force-pushed
the
fm/task-21440f13
branch
from
November 15, 2026 21:56
32377b0 to
58397bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A short-circuit right operand may not execute; unsafe names must be rejected without breaking valid inputs or formatting.
What changed
Before and after
Before: The two examples produced unbound errors, some unsafe consumers compiled, and formatting could remove required operand parentheses.
After: Both commands now identify unsafe operators across all 120 differential programs, and formatting preserves diagnostics and valid native execution.
This changes compiler text diagnostics, not an application view; command transcripts demonstrate the behavior.
Checked
Live validation: Demonstrated for this version. 4 of 4 scenarios driven live in the product.
How it was checked
Validated on macOS arm64 with Rust 1.99.0 and OTP 29.
cargo clippy --workspace --all-targets --locked -j 2 -- -D warnings
cargo test --workspace --locked --no-fail-fast -j 2
cargo build --release --locked -j 2
python3 scripts/test-allocator-config.py
./target/release/nera test -j 1 --timeout 30
python3 scripts/test-stacktrace-order.py
Repeated ten times without retries: cargo test -p nera-ir --lib --locked -j 2 warnings::tests; cargo test -p nera-fmt --test binary_operand_grouping --locked -j 2; ./target/release/nera test '*unsafe_binding' -j 1.
The final formatter probe uses disposable in-place formatting and disk reads, avoiding the existing unchanged-stdout limitation.
The evidence retains unchanged comparisons and formatting checks. Local validation refreshed 24 comprehension cases and the runtime controls after the overlapping compiler update.
Risk
Risk above low: Blast radius, medium — Touches shared compiler diagnostics and the formatter binary-operand helper.; Novelty, medium — Extends existing recursive scope and reference analysis to more consumers.
Full risk assessment
Pipeline
Updates from git push no-mistakes
Infinitary checked this version: an independent review that also judged the documents, and live validation the review accepted.