Skip to content

fix(ir): preserve leading comprehension filters - #51

Merged
mremond merged 1 commit into
mainfrom
fm/task-d20dba4e
Nov 15, 2026
Merged

mremond merged 1 commit into
mainfrom
fm/task-d20dba4e

Conversation

@mremond

@mremond mremond commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Why

List and binary comprehensions must honor filters before their first generator and support filter-only forms, matching BEAM.

What changed

  • Leading filters run once, in order, before any generator source.
  • Filter-only comprehensions produce one body when filters pass, or an empty result otherwise.
  • Leading-filter bindings and binary-body exceptions reach the correct scope and handler.

Before and after

Before: Both false-prefix forms produced two values, and filter-only comprehensions failed to compile.

After: Both false-prefix forms return empty; filter-only forms produce one body, matching BEAM.

This changes compiled Erlang results, not a graphical view.

Checked

Live validation: Demonstrated for this version. 3 of 3 scenarios driven live in the product.

Scenario Result Evidence
Reported list and binary cases ✅ Passed live The same real sources produce {[],<<>>} and {[ok],<<1>>} on native Nera and BEAM.
Shared regression and affected-scope refresh ✅ Passed live Preserved accepted full-suite proof; the refreshed Rust gate, 23 affected journeys and ten native fixture runs passed.
Incoming self-exit interactions ✅ Passed live Twelve native/BEAM cases agree: false filters skip fatal exits, and fatal paths preserve exit reasons without continuation or handlers.
  • Whitespace and patch validation: Passed with a clean working copy.
How it was checked

Runtime-first release build and strict workspace lint passed.

The complete Rust workspace passed 2,193 tests; one existing release-only measurement remains ignored.

Preserved the accepted complete native run of 501 passes and two existing external-project skips; all 23 affected journeys passed after the self-exit update.

The fresh stacktrace check passed; earlier allocator and complete verifier/BEAM repetition proof remains preserved for unchanged scope.

The shared fixture passed ten fresh native runs; all twelve disposable self-exit/comprehension cases passed on native and BEAM.

Risk

Risk above low: Novelty, medium — Adds prefix control flow using existing lowering and exception primitives.

Full risk assessment
Dimension Level Why
Blast radius low Only shared comprehension prefix lowering and its binding analysis change.
Behavior low Corrects ignored filters and rejected filter-only programs.
Undo low A revert restores prior compiler behavior; no stored data changes.
Evidence low Real native and BEAM programs agree; affected refresh and prior full proof pass.
Sensitivity low No sign-ins, credentials, payments or saved user data change.
Novelty medium Adds prefix control flow using existing lowering and exception primitives.
Dependencies low No dependency changes.

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.

@github-actions github-actions Bot added this to the 0.1.1 milestone Nov 14, 2026
@mremond
mremond force-pushed the fm/task-d20dba4e branch 2 times, most recently from 271022a to 8ecffe0 Compare November 15, 2026 10:34
@mremond
mremond merged commit da0f5b4 into main Nov 15, 2026
21 checks passed
@mremond
mremond deleted the fm/task-d20dba4e branch November 15, 2026 14:05
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