Skip to content

test(compat): gate real projects on structural convergence with pinned OverPy - #379

Merged
Teakowa merged 4 commits into
mainfrom
feat/364-structural-gate
Sep 25, 2026
Merged

Teakowa merged 4 commits into
mainfrom
feat/364-structural-gate

Conversation

@e54-bot

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

Copy link
Copy Markdown
Contributor

Summary

  • Add tools/overpy/structural_gate.py: compiles each entry of a pinned real project with pinned OverPy 9.7.10 and with opy-rs, parses both with workshop-rs, and fails on any structural difference that is not a recorded exception.
  • Differences are reported by section, item name and canonical path with both values, never as a text diff. Recorded exceptions that match nothing fail the full run as stale.
  • opy-compat gains project-compare; the corpus semantic-WIR stage now carries the same difference list.
  • structural-gate.json pins Bastion (src/main.opy, src/externalMain.opy) by full commit SHA. It is fetched at test time, not vendored, because of its non-commercial terms.
  • CI installs the pinned oracle and runs the gate.

Verification

  • Both Bastion entries: 0 differences at the pinned revision.
  • A tampered reference reports the rule and path; unit tests cover merged conditions and the 扩展 { block shape (no difference).
  • opy-compat tests, 36 Python tests, clippy -D warnings, differential and run_native.py pass locally. The new CI steps have not run on CI yet.

Fixes #364

…d OverPy

Compile each entry of a pinned real project with pinned OverPy 9.7.10 and
with opy-rs, parse both outputs with workshop-rs, and fail on any structural
difference that is not a recorded exception. Differences are reported by
section, item name and canonical path, not as text diffs.

- opy-compat gains project-compare and a structural difference report; the
  semantic-WIR stage now carries the same differences.
- structural-gate.json pins Bastion by full commit SHA (fetched at test
  time, not vendored, because of its non-commercial terms) and holds the
  exception records; stale exceptions fail the full run.
- CI installs the pinned oracle and runs the gate.

Fixes #364

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

One blocking correctness issue in the exception path.

Comment thread crates/opy-cli/src/bin/opy-compat/structural.rs Outdated
A recorded difference could hide a later unrecorded one in the same rule or settings item.

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

The previous blocker is fixed. One remaining exception-path correctness issue still allows an unapproved regression to pass.

Comment thread tools/overpy/structural_gate.py
@Teakowa
Teakowa merged commit 24c2f59 into main Sep 25, 2026
5 checks passed
@Teakowa
Teakowa deleted the feat/364-structural-gate branch September 25, 2026 15:41
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.

Gate compilation on structural convergence with pinned OverPy for real projects

2 participants