Repository navigation
fix: align initializer context and unary plus acceptance with OverPy - #678
Conversation
Validate global declaration values through the existing HIR visitor, including nested and spanless receiver expressions. Preserve player initializer context and cover rejection parity with the pinned OverPy differential fixture. Refs #673
Treat unary plus as an identity, including adjacent signs combined by the lexer, while preserving postfix assignments and prefix-statement rejection. Add a separate oracle-backed fixture comparing canonical Workshop programs for initializer values, mixed signs, exponentiation and nonnumeric operands. Fixes #673
|
Implementation and verification handoff for #673 at Ready for independent review of:
All local foreground gates passed: formatting; workspace Clippy on current Rust and 1.88.0; workspace tests; 52 Python tests; all 161 pinned oracle snapshots; native corpus comparison (146 matches, 15 recorded gaps, no regressions); 6,114 builtin probes (zero unexplained findings); and both pinned Bastion structural comparisons (zero unrecorded differences). Re-ran the Rust gates and native canonical corpus after the final parser extraction. The ablation pass introduced no additional semantic mechanism. GitHub CI and independent review remain pending. The existing ignored manual compiler resource baseline was not run; UI gates do not apply to this Rust-only change. No merge performed. |
Follow constant values and expression macro bodies when checking global initializer event context, with a visited set to stop recursive references. Add separate pinned differential rejection fixtures for constants and macros. Refs #673
Classify completed statements before rejecting prefix increment syntax, allowing repeated unary plus on assignment and postfix targets. Preserve bare-value rejection and the existing embedded-postfix diagnostic span. Add a canonical differential fixture covering the four reported forms. Refs #673
|
Addressed both findings from the review of issue #673.
Verification completed locally in the foreground:
No findings remain unaddressed, and no issue/architecture mismatch was found. There are no GitHub review threads to reply to or resolve. The fixes are pushed to the PR branch, and this PR is ready for follow-up review. |
|
Fixed the round-2 finding for #673 in commit d9d0eda (
Verification passed locally in the foreground:
The correction is pushed to GitHub CI and independent follow-up review remain pending. The existing ignored manual resource baseline was not run. No merge performed. |
Global variable initializers could emit
Event Playerwhere pinned OverPy 9.7.17 rejects the input, while valid unary+expressions failed in the native parser. This PR aligns both acceptance behaviors with the oracle.cf71af7rejectseventPlayerin global initializers, including callable, nested and member-receiver forms, with a source-locatedrule-event-gatediagnostic. Player initializers retain their valid event context. A separate negative differential fixture protects rejection parity.b33fb6cparses unary+as the upstream identity operation, including adjacent signs, while preserving arithmetic precedence and existing increment/decrement statement behavior. Its differential fixture compares canonical Workshop programs for global/player initializers, literals, variables, vectors, player values, mixed signs, exponentiation and postfix controls.Before editing, reproduced oracle rejection/native acceptance of the global initializer and oracle acceptance/native parse failure of unary plus through
opy-compat project-compare. The player-initializer/each-player control already matched canonically. After the fix, both fixtures match their independent pinned reference.Fixes #673
Verification (run locally in the foreground):
pnpm install --dir tools/overpy/oracle— installed pinned OverPy 9.7.17.cargo fmt --all -- --check— passed.CARGO_INCREMENTAL=0 cargo clippy --workspace --all-targets --all-features -- -D warnings— passed.CARGO_INCREMENTAL=0 cargo +1.88.0 clippy --workspace --all-targets --all-features -- -D warnings— passed; pre-push gate also passed.CARGO_INCREMENTAL=0 cargo test --workspace --all-targets --all-features— passed, including the differential corpus and existing prefix/postfix regressions; one existing manual resource baseline remains ignored.CARGO_INCREMENTAL=0 cargo test -p opy-rs --test differentialandcargo test -p opy-rs --lib variable_initializers— passed.python3 -m unittest discover -s tools/overpy/tests— 52 passed.python3 tools/overpy/run_oracle.py— all 161 snapshots reproduce against the pinned oracle.CARGO_INCREMENTAL=0 cargo build --locked -p opy-cli --features compatibility --bins— passed.python3 tools/overpy/run_native.py --binary target/debug/opy-cli --semantic-binary target/debug/opy-compat— 146 matches, 15 recorded gaps, zero regressions; both new fixtures match, including canonical Workshop equality for unary plus.python3 tools/overpy/probe_builtins.py --binary target/debug/opy-compat --jobs 4 --report <scratch>/probe-report.json— 6,114 probes, zero unexplained findings.python3 tools/overpy/structural_gate.py --binary target/debug/opy-compat— both pinned Bastion entry points match, zero unrecorded differences.git diff --check— passed.Python commands used
TMPDIR=/Users/teakowa/Repos/wrightkit/.task-scratch/orch/scratch-673; transient reports stay outside the tracked source.Ablation: single pass without subagents across reuse, simplification, efficiency and placement. Reused the HIR visitor and existing arithmetic pipeline; removed per-node span conversion in favor of the initializer source span. No extra AST/HIR node, dependency, configuration or compiler lowering mechanism was needed. Retained the two bounded module extractions to satisfy the repository size guard.
Unverified: GitHub CI and independent PR review have not completed at submission. The existing ignored manual compiler resource baseline was not run. UI gates are not applicable because this PR changes no UI files.