Skip to content

fix(opy): converge parser source-form conformance - #163

Merged
Teakowa merged 3 commits into
mainfrom
codex/issue-160-parser-conformance
Sep 2, 2026
Merged

fix(opy): converge parser source-form conformance#163
Teakowa merged 3 commits into
mainfrom
codex/issue-160-parser-conformance

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --locked --workspace --all-targets --all-features
  • python3 -m unittest discover -s compatibility/tests
  • Offline conformance: syntax.lexing 5/5 match; syntax.parser-and-control-flow 17/17 match.
  • Native expectation runner: 63/63 compile-status match.

The remaining reported divergences are outside this issue's lexical/parser scope or have explicit Workshop/lowering ownership evidence.

Fixes #160

Align standalone lambda diagnostics with the pinned parse frontier and move Workshop-owned or lowering-only probes out of parser contracts.

Fixes #160

@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.

Major — crates/opy-rs/src/lower.rs:1092

Changing the public diagnostic code from lambda-context to generic parse-error weakens an existing stable diagnostic solely to satisfy the conformance frontier. #93 explicitly requires stable source-attributed diagnostics and forbids weakening diagnostics to obtain a pass; the conformance runner already classifies lambda-context as the parse stage. Preserve the lambda-context public diagnostic and align the conformance frontier without regressing that diagnostic contract.

Keep the stable lambda-context diagnostic while normalizing only the conformance frontier to the pinned parse-error construct.

@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.

Major — crates/opy-rs/tests/differential.rs:325

The production diagnostic is correctly restored to lambda-context, and the new conformance normalization now maps that code to the reference parse-error frontier. This differential expectation must therefore remain lambda-context; changing it to parse-error contradicts the still-authoritative compiler diagnostic contract (compatibility/compiler-expectations.json) and weakens the native stable-code check. Revert this expectation to lambda-context.

Preserve lambda-context in the native diagnostic expectation while the conformance runner compares its canonical parse frontier.
@Teakowa
Teakowa merged commit 6abd946 into main Sep 2, 2026
5 checks passed
@Teakowa
Teakowa deleted the codex/issue-160-parser-conformance branch September 2, 2026 06:50
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.

Converge parser and source-form conformance exposed by #158

2 participants