Skip to content

analysis(classify): make wildcard-discard flow detection whitespace-stable #3233

Closed

Description

@EffortlessSteven

Finding

Review of rejected source join EffortlessMetrics/ripr#1543 found a remaining lexical edge in value_is_swallowed. #2401 correctly added typed wildcard support, but the matcher still requires the exact prefixes let _ = or let _:.

Equivalent Rust tokenizations such as let _ : Ty = value; or let _= value; are not recognized even though whitespace is not semantically meaningful there. Rustfmt normally canonicalizes these forms, so this is a bounded robustness gap rather than evidence that ordinary formatted Rust is misclassified.

The mechanism is present unchanged in W7 (83217e97…) and current swarm main.

Required correction

Share or introduce one small lexical predicate for wildcard-discard bindings that tolerates legal whitespace while staying narrow to let + wildcard _ + :/=. Keep the infection and flow stages on the same predicate/contract so they cannot drift again.

Acceptance

  • let _ = expr, let _: Ty = expr, let _ : Ty = expr, and let _=expr are treated consistently by the flow/infection evidence paths.
  • Identifiers beginning with underscore (for example let _value = ...) are not treated as wildcard discards.
  • Partial/destructuring patterns remain outside scope unless deliberately added with separate evidence.
  • Existing analysis(classify): typed-wildcard let _: divergence — infection flags it as discard, flow does not #2401 regression behavior stays green.
  • Focused flow/infection tests and ordinary required gate pass.

0.11.0 disposition

Rolling robustness work. Qualified W7 should not be repinned for this lexical edge alone unless a required release corpus demonstrates a wrong public result on supported input.

Refs: #2401, EffortlessMetrics/ripr#1543, #2379.

Activity

  1. added
    status/needs-work
    on Aug 14, 2026
  2. EffortlessSteven commented on Aug 16, 2026

    @EffortlessSteven
    MemberAuthor

    Source release carry owner

    The rolling analyzer fix merged through #3243 / cca148eec9c7fb185fafdfcda55dead24af549b4. Frozen W7 predates it. EffortlessMetrics/ripr#1568 now owns the exact post-J source disposition: prove one shared whitespace-stable authority already exists or replay it narrowly with infection/flow production-path controls and zero unintended golden drift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/needs-work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions