Skip to content

Complete core language correctness conformance wave#13

Merged
Hyper66666 merged 7 commits into
mainfrom
codex/core-language-correctness
Jun 10, 2026
Merged

Complete core language correctness conformance wave#13
Hyper66666 merged 7 commits into
mainfrom
codex/core-language-correctness

Conversation

@Hyper66666

@Hyper66666 Hyper66666 commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • enforce explicit let mut assignment semantics with stable compiler, sgc, formatter, and LSP diagnostics
  • implement fieldless and payload enum construction/matching through HIR, MIR, textual LLVM, native execution, and JIT
  • add strict compile-link-execute conformance coverage, reproducible Rust inputs, migration guidance, and Linux CI gates
  • repair native async linkage discovered by Linux CI: complete scalar dispatch symbols plus SysV sret for 24-byte outcomes

Review fixes

  • size enum payload storage from the largest variant layout instead of a fixed integer slot
  • implement missing JIT enum, phi, switch, and unreachable lowering
  • route exhaustive match fallback edges through explicit unreachable blocks and teach async CFG analysis to accept them
  • preserve payloadless enum values across async frame spill/reload; keep payload-carrying enum locals across await explicitly rejected

Verification

  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --locked -- --test-threads=1
  • cargo fmt --all -- --check
  • openspec validate core-language-correctness --strict
  • openspec validate --all --strict (25 passed, 0 failed)
  • Linux core-language Actions gate passed on final head
  • Ubuntu/Windows realworld and graphics jobs passed on final head
  • independent code review: no remaining P0, P1, or P2 findings

Separate open gate

perf-smoke is the repository's existing P5 compile-scale calibration lane, not an acceptance criterion for this correctness-only OpenSpec. The hosted runner satisfies the absolute time/RSS budgets but the hard step still compares against a machine-specific frozen 10% baseline; that calibration remains tracked separately and is not weakened in this PR.

The core conformance wave now enforces explicit mutability, constructs enum
values across native and JIT backends, and runs strict compile-link-execute
coverage. The review fixes also align enum payload ABI with async frame
round-trips and route impossible match defaults through valid unreachable CFG
edges.

Constraint: Preserve existing public Sengoo syntax and defer payload-carrying enums across await.
Rejected: Keep fixed i64 enum payload slots | typed and multi-field payloads require layout-sized byte storage.
Rejected: Send exhaustive match defaults to the phi join | creates an invalid predecessor set and crashes LLVM codegen.
Confidence: high
Scope-risk: broad
Reversibility: clean
Directive: Treat enum payload layout, immutable-assignment diagnostics, and strict conformance failures as release contracts.
Tested: cargo build --workspace --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test --workspace --locked; cargo fmt --all -- --check; OpenSpec strict validation; independent review.
Not-tested: Linux GitHub Actions pending.
The unscoped openspec package is a placeholder without an executable, so both
core conformance and realworld validation now invoke the versioned official CLI
package directly.

Constraint: GitHub-hosted runners do not have the repository developer's global OpenSpec installation.
Rejected: Install the unscoped openspec package | npm publishes it as 0.0.0 without a CLI binary.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Pin OpenSpec workflow invocations to a verified @fission-ai/openspec release.
Tested: npx --yes @fission-ai/openspec@1.4.1 validate core-language-correctness --strict; npx --yes @fission-ai/openspec@1.4.1 validate package-release-defaults --strict; git diff --check.
Linux exposed host-specific snapshot and cfg assumptions, while the production
benchmark still generated mutable Sengoo locals without `mut`. Snapshot output
now normalizes only the host triple, cfg coverage uses a platform-independent
false predicate, and generated benchmark programs follow the explicit
mutability contract. The workspace CI gate is serialized because the native
network error ABI is intentionally process-global.

Constraint: Preserve process-visible network error semantics across threads.
Rejected: Make LAST_NET_ERROR thread-local | contradicts the existing public runtime contract and its cross-thread test.
Rejected: Rebaseline snapshots separately per host | duplicates snapshots for one non-semantic target-triple line.
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Generated Sengoo fixtures that assign locals must declare them with `let mut`; snapshot tests must not record host triples verbatim.
Tested: cargo test --workspace --locked -- --test-threads=1; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo fmt --all -- --check; focused snapshot/cfg tests; generated benchmark fixture validation; OpenSpec strict validation.
Not-tested: Full local advanced benchmark exceeded 30 minutes after progressing beyond the previous failure into reachability measurement; GitHub production gate pending.
Pull requests already validate every feature-branch update, so direct push
triggers are now reserved for main. This keeps the expensive compile-scale and
cross-platform realworld gates from running twice for the same commit.

Constraint: Preserve both pre-merge PR validation and post-merge main validation.
Rejected: Keep codex branch push triggers | every synchronized PR update schedules duplicate jobs.
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Add feature-branch push filters only for workflows that do not also listen to pull_request.
Tested: git diff --check; workflow trigger structure reviewed against core-conformance.yml.
Not-tested: actionlint is not installed locally; GitHub Actions parser pending.
Rust's native runtime staticlib groups scalar select entry points into one archive member, so Unix linkers require every generated result-dispatch symbol once any async runtime path pulls that member in. Async lowering now emits the complete scalar dispatch surface for every async program, with a regression test covering the symbol contract.

Constraint: The runtime staticlib is linked with compiler-generated dispatch functions.

Rejected: Make runtime dispatch symbols optional | the native select ABI directly references the generated extern symbols.

Rejected: Depend on Windows linker behavior | GNU and LLD correctly expose the incomplete symbol surface.

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep the generated async dispatch symbol family aligned with runtime/src/async_runtime/select.rs.

Tested: red/green compiler dispatch-surface regression; cargo test --workspace --locked -- --test-threads=1; cargo clippy --workspace --all-targets --locked -- -D warnings; Windows native async sleep execution.

Not-tested: Linux native link path pending GitHub Actions.
Linux exposed a native channel receive failure after the async dispatch link surface was repaired. The Rust runtime returns 24-byte C-layout outcomes through a hidden result pointer under SysV, while generated LLVM IR incorrectly treated them as direct register returns. Codegen now applies the supported target ABI consistently to both declarations and calls.

Constraint: Compiler-generated LLVM declarations must match the Rust extern C ABI used by the native runtime.

Rejected: Relax the channel result assertion | the observed value was an ABI decode failure, not nondeterministic channel behavior.

Rejected: Force every non-Windows aggregate through sret | the 16-byte send outcome is returned directly under SysV.

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep async result declaration and call ABI decisions centralized in async_result_uses_sret.

Tested: clang x86_64 SysV ABI probe; Linux-target LLVM declaration/call regression; ABI rule unit test; cargo test --workspace --locked -- --test-threads=1; cargo clippy --workspace --all-targets --locked -- -D warnings; Windows channel and sleep native runtime tests.

Not-tested: End-to-end Linux native runtime execution pending GitHub Actions.
The conformance and deterministic workspace gates now pass on the final Linux implementation, including the native async dispatch and SysV aggregate-result repairs discovered by CI. The change checklist and verification record now point to the exact successful runs and distinguish the repository's separate performance-baseline calibration issue.

Constraint: Archive claims require reproducible Linux evidence, not only local Windows results.

Rejected: Mark the performance baseline workflow as part of this change | the proposal explicitly excludes performance targets and its absolute budgets are already satisfied.

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Preserve the linked GitHub Actions runs when archiving this change.

Tested: openspec validate core-language-correctness --strict; openspec validate --all --strict (25/25); @fission-ai/openspec 1.4.1 strict validation; GitHub core-conformance run 27275073812; GitHub realworld-e2e run 27275073863.

Not-tested: Repository-wide hosted-runner performance baseline calibration remains outside this correctness change.
@Hyper66666 Hyper66666 merged commit ecf5e18 into main Jun 10, 2026
5 of 6 checks passed
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.

1 participant