Skip to content

opy-rs: replace0By directive changes arr.index(0) slot emission #670

Closed

Description

@e54-bot

Problem

Under #!replace0ByCapturePercentage, arr.index(0) emits Point Capture Percentage; the oracle emits Null. Rule-body slot-versus-directive precedence differs from upstream.

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 (#!replace0ByCapturePercentage). 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 in PR #680, ready for independent review. Commit 133c24b is pushed on fix/670-optimize-for-size-capture.

    Reproduced the corrected input (both #!optimizeForSize and #!replace0ByCapturePercentage) against pinned OverPy 9.7.17 using opy-compat project-compare and canonical programs parsed by workshop-rs 1.28.2. The base differed; the fixed output is canonically identical with zero differences. A new differential fixture covers the reported index slot plus nested calls, Null/False precedence, directive fallback, and directive-only behavior; its canonical assertion failed before the fix and passes afterward.

    Foreground verification passed: formatting; stable and Rust 1.88.0 Clippy with warnings denied; workspace tests (835 passed, one existing manual resource baseline ignored); 52 Python tests; native corpus (155 matches, 15 recorded gaps, zero unexpected); all 6,114 builtin probes (zero unexplained); both pinned Bastion structural entries (zero differences). One ablation/simplification pass retained only reuse of the existing slot policy and the precedence guard.

    GitHub CI and live-game execution have not been verified. The existing manual resource baseline was not run; UI gates do not apply. Full commands and verification details are in the PR body. No merge performed.

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