Skip to content

refactor: complete source-language ownership cutover - #228

Open
Teakowa wants to merge 10 commits into
mainfrom
codex/source-language-cutover
Open

refactor: complete source-language ownership cutover#228
Teakowa wants to merge 10 commits into
mainfrom
codex/source-language-cutover

Conversation

@Teakowa

@Teakowa Teakowa commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • consume the released owner crates from crates.io: workshop-rs 0.1.11, opy-rs 0.1.1, opy-compiler 0.1.1, and deltin-rs 0.1.1
  • reduce wright-opy and wright-ostw to source adapters and consume owner-produced canonical WIR directly
  • preserve source provenance, cross-file/overlay behavior, and exact semantic rename edits
  • migrate the released Workshop corpus checkout and consumer tests to the published owner contracts
  • report unsupported owner surfaces explicitly; no Wright fallback is used

Dependencies

Validation

  • cargo fmt --all -- --check
  • cargo check --locked --workspace --all-targets
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
  • cargo test --locked --workspace --all-targets --all-features — all non-ignored tests passed
  • the existing Workshop contract and released real-project tests remain ignored when their external corpus checkout is unavailable
  • hosted CI is running for commit e48acda

Fixes #227
Refs #155
Refs #182

Delegate OPY and OSTW source semantics to their owner repositories, keep Wright adapters narrow, remove duplicate parser and lowering implementations, and migrate shared consumers and documentation.

Fixes #227

Refs #155

Refs #182
@Teakowa
Teakowa force-pushed the codex/source-language-cutover branch from ce59c50 to 00e4e36 Compare August 26, 2026 07:35
@Teakowa
Teakowa marked this pull request as ready for review August 26, 2026 10:12

Teakowa commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer review — not ready to merge yet. The overall ownership-cutover direction is correct and the current CI is green, but there are three merge blockers that should be fixed together before another review.

1. Repin to landed owner revisions

Cargo.toml currently pins:

  • opy-rs / opy-compilere319735e93344302e1b2d827d9809683997723a7
  • del-rscb07808831dea9414360847d83f75a183844a17a

Those commits are not in the authoritative merged histories now referenced by this PR. Both comparisons against owner main are diverged, not simply behind. The owner cutovers have since landed as opy-rs #64 (main merge commit e9480f75e70c6029353673e7571db1facd5a9962) and del-rs #61 (main merge commit 11f8c788ed06b54b355b7a7a6ea08988a3a43dcd).

The current green Wright CI therefore proves the adapters against orphaned/pre-rebase owner snapshots rather than the owner revisions that actually landed. Repin to an authoritative landed revision (or a released version if one is published before merge), update the lockfile, and rerun the full CI matrix.

2. wright-opy still owns source-language semantic validation

crates/wright-opy/src/lib.rs now states that the adapter owns no OPY semantic rules, but it adds validate_builtin_enum_members plus recursive HIR traversal and emits the OPY-facing unknown-enum-member decision itself.

That is not a shape/provenance adapter: it is source/compiler semantic validation. It contradicts #227's cutover contract that OPY semantics live in opy-rs / opy-compiler and that a missing owner capability must be fixed in the owning repository rather than retained as a Wright fallback. Move/expose this validation on the owner side, then have Wright consume the owner result. Do not keep an equivalent semantic walker in wright-opy.

3. OSTW adapter loses truthful project provenance/diagnostic identity

project_view() in crates/wright-ostw/src/lib.rs builds Project.files only from del_rs::project::Project.files. In del-rs, ds.toml is in the SourceMap but is not part of that source-file vector, so a configured project commonly has source FileIds starting at 1. Wright's existing ostw_diag() still resolves a span with project.files.get(span.file.index()). That assumes vector index == FileId and will therefore misattribute imported/source diagnostics (or fall back to the root display path) after this cutover. The old Wright project model explicitly kept ds.toml at id 0, which made that indexing assumption true.

Preserve FileId→path provenance explicitly (lookup by file.id, or expose an owner-backed file registry) and add regressions for a ds.toml project with diagnostics in the entry file and an imported file. Also do not derive source/parsed from !source.text.is_empty() — an empty .del/.ostw file is still a source file and can parse successfully.

Relatedly, map_diagnostic() currently maps every del-rs Semantic, Hir, and Oracle diagnostic to the single code ostw-unsupported. del-rs has real semantic diagnostics (unknown name, overload/type/access errors, etc.); those are not all unsupported capabilities. Preserve the owner diagnostic identity/classification, and reserve an unsupported result for actual unsupported owner capability/constructs.

Non-blocking cleanup

The CI display names still say OPY integration (N-level + differential) and DEL/OSTW integration (differential) even though this PR removes the Wright-side differential suites. Rename those jobs to match what they now validate.

Once the three blockers above are fixed, rerun the same full workspace + cross-platform CI. The removal of duplicated Wright parsers/lowering/reconstruction/evidence and the owner-backed check/edit/convert direction otherwise look consistent with #227.

Teakowa commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Dependency identity update: the DEL/OSTW owner repository has been renamed from wrightkit/del-rs to wrightkit/deltin-rs. The old crates.io package name del-rs is owned by another account, so owner publication cannot use that identity. wrightkit/deltin-rs#62 now owns the Cargo/package rename and first deltin-rs release.

For this PR, do not replace the current Git revision with another del-rs Git pin. Keep the previously reported ownership/correctness fixes in their owning repositories, then consume the released deltin-rs package once #62 completes. The final Wright integration should validate the published owner artifact, not a temporary Git revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Remove frontend architecture terminology and complete source-language ownership cutover

1 participant