Skip to content

feat(opy): complete compiler directives and replacements - #341

Merged
Teakowa merged 4 commits into
mainfrom
codex/issue-332
Sep 20, 2026
Merged

Teakowa merged 4 commits into
mainfrom
codex/issue-332

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Review fixes

  • print("") now lowers the empty HUD header and color as Null, matching the pinned OverPy 9.7.10 semantic-WIR contract.
  • #!debugElementCount now emits pinned-compatible counts: total 50, rules 32/18, conditions 3, and actions 14.
  • The synthetic/debug-element-count fixture remains a semantic-WIR comparison and now also declares the CI-enforced debug-element-count source-visible projection from pinned workshopExact output; semantic WIR remains the secondary check.
  • #!suppressWarnings filters matching preprocessing warning codes from tooling diagnostics.
  • The compatibility-only semantic-WIR parser ignores upstream source-visible comments while preserving comment text in the public compiler output.
  • Narrowed the top-level directive support wording and separated the remaining Complete OverPy translations and custom-game settings support #331 and unsupported directive boundaries.

Verification

  • cargo fmt --all -- --check
  • cargo test --locked -p opy-rs --all-targets --all-features — 414 passed, 1 ignored
  • cargo clippy --locked -p opy-rs --all-targets --all-features -- -D warnings
  • cargo clippy --locked -p opy-cli --features compatibility --all-targets -- -D warnings
  • python3 -m unittest discover -s tools/overpy/tests — 28 passed
  • Pinned synthetic/debug-element-count oracle snapshot: pass
  • Full pinned OverPy 9.7.10 differential: 66 match, 10 known-gap, 0 regression across 76 fixtures; source-visible stage: 1 match

Independent ablation

  • Removing the empty-print lowering correction regressed synthetic/directive-replacements semantic-WIR: 64 match, 10 known-gap, 1 regression.
  • Restoring debug directive rejection failed the focused debug directive test with backend-directive-unsupported.
  • Removing warning filtering failed the focused suppressWarnings test with a visible warning.
  • Removing condition annotations failed the focused debug test: 3 emitted inline comments versus 5 expected.
  • Removing summary sorting failed the focused debug test's descending-order assertion.
  • Removing compatibility comment stripping failed the pinned debug fixture with malformed: expected a top-level section.
  • Changing the pinned-compatible numeric/global-variable count from 2 to 1 caused the full differential to report synthetic/debug-element-count: source-visible regression (65 match, 1 regression).

Fixes #332

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking findings are inline. Also, #332 explicitly requires independent ablation of each substantive implementation change; the PR's Verification section currently lists only normal test/Clippy/differential runs. After fixing the blockers, record the requested ablation result so that acceptance criterion can be verified in the same follow-up review.

Comment thread docs/language-support/tooling-and-backend.md Outdated
Comment thread docs/language-support.md Outdated
Implement source-visible debug and warning directives, align empty print lowering with the pinned oracle, and record the review regressions with focused coverage.

Fixes #332
@e54-bot

e54-bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Review fixes are pushed in commit 2dba4a7. The pinned OverPy 9.7.10 differential now reports 65 match, 10 known-gap, 0 regression. Independent ablations recorded in the PR body show each substantive fix is necessary. Ready for re-review; hosted checks and reviewer approval remain separate.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review: the replacement regression is fixed, the compatibility gate is green, #!suppressWarnings is implemented, and the requested ablation results are now recorded. One blocker remains from the original debugElementCount finding.

Comment thread crates/opy-rs/src/compiler/mod.rs Outdated
Match pinned source-visible debug output by annotating conditions and sorting the rule summary. Add a pinned regression fixture and make the compatibility parser ignore upstream comments.

Fixes #332
@e54-bot

e54-bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up fixes are pushed in commit 0878f9a. debugElementCount now annotates conditions and sorts the summary by count; the pinned regression fixture covers two differently-sized rules. The compatibility-only parser now ignores upstream comments so the fixture runs through semantic-WIR comparison. Full differential is 66 match, 10 known-gap, 0 regression across 76 fixtures. Ready for re-review.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review: the implementation now covers condition/action comments and count-sorted summaries, and CI is green. One verification blocker remains: the new pinned fixture does not currently make the source-visible debug output part of the compiler gate.

Compare the debugElementCount source-visible projection against the pinned oracle in the compiler differential gate and align the emitted element counts.

Fixes #332
@e54-bot

e54-bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Review fix pushed in commit 6bb149a. The pinned debugElementCount source-visible projection is now wired into the semantic-WIR fixture comparison, with semantic WIR retained as the secondary check. Full differential: 66 match, 10 known-gap, 0 regression across 76 fixtures; the new source-visible stage is 1 match. The numeric-count ablation produced a source-visible regression as expected. Local Rust tests, clippy, Python tests, and the pinned oracle fixture all pass; hosted CI and reviewer reapproval remain separate.

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teakowa
Teakowa merged commit aab2d3c into main Sep 20, 2026
5 checks passed
@Teakowa
Teakowa deleted the codex/issue-332 branch September 20, 2026 17:14
@e54-bot e54-bot mentioned this pull request Sep 20, 2026
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.

Complete source-visible compiler directives and optimizer behavior

2 participants