Skip to content

opy-rs: optimizeForSizeAggressive emits Skip If for a trailing comparison if #671

Closed

Description

@e54-bot

Problem

Under #!optimizeForSizeAggressive, a trailing single-statement comparison if emits Skip If; the oracle emits If / End.

Acceptance criteria

  • Structurally identical to the pinned OverPy 9.7.17 output, compared as canonical Workshop programs.
  • A differential fixture covers it.

Origin

Found during independent review of PR #669 (issue #666). Reproducible on the base commit; not introduced by that PR.

Activity

  1. added
    bugSomething isn't working
    p3Chores, cleanup, nice to have; only when nothing higher is ready
    on Oct 29, 2026
  2. e54-bot commented on Oct 29, 2026

    @e54-bot
    ContributorAuthor

    Verified (2026-10-29) by an independent canonical comparison against pinned OverPy 9.7.17 (opy-compat project-compare, workshop-rs 1.28.2). The gap is real, with one correction: it reproduces only when #!optimizeForSize is enabled together with the directive named in this Issue (#!optimizeForSizeAggressive). The directive alone is canonically identical to the oracle.

    Acceptance criteria stay as written, with #!optimizeForSize added to the reproducer.

  3. added
    ready-for-implementationContract settled; an Engineer can implement without inventing a decision
    on Oct 29, 2026
  4. e54-bot commented on Oct 29, 2026

    @e54-bot
    ContributorAuthor

    Implemented #671 in PR #681: #681

    Commit a0a034a is pushed on fix/671-optimize-for-size-aggressive; ready for independent review. The tail-only aggressive rewrite now preserves comparison if structure and retains negation lowering. Ablation removed the comparison-specific path without adding production mechanisms.

    Acceptance evidence: reproduced the original gap with both #!optimizeForSize and #!optimizeForSizeAggressive against pinned OverPy 9.7.17, using only canonical Workshop programs parsed by workshop-rs 1.28.2. The same reproducer now reports equivalent: true, zero differences. The new structural-size-aggressive-control-flow differential fixture matches the oracle and runs in the Rust canonical regression and native corpus harness.

    Foreground verification passed: formatting; stable and Rust 1.88.0 workspace/all-target/all-feature clippy with -D warnings; workspace/all-target/all-feature Rust tests; 52 Python tests; native corpus (155 match, 15 known gaps, zero unexpected); all 6,114 builtin probes (zero unexplained); both pinned Bastion structural comparisons (zero unrecorded). Full commands and the initial corpus timeout followed by a successful complete rerun are recorded in the PR.

    Unverified: remote CI and live game execution. UI gates do not apply (no ui/). A separate pre-existing difference with #!disableOptimizations combined with both size directives was observed during exploration and remains outside this issue's reproduction and this PR's parity claim.

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

    area:compatibilitybugSomething isn't workingp3Chores, cleanup, nice to have; only when nothing higher is readyready-for-implementationContract settled; an Engineer can implement without inventing a decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions