Skip to content

Preserve checked caller ownership in native lowering - #279

Merged
vycdev merged 3 commits into
codex/native-codegenfrom
codex/native-caller-ownership-repairs
Oct 17, 2026
Merged

vycdev merged 3 commits into
codex/native-codegenfrom
codex/native-caller-ownership-repairs

Conversation

@vycdev

@vycdev vycdev commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Native lowering previously lost checked caller ownership when conversions,
handled expressions, or physical View operands changed an argument's shape.
This change carries exact source disposition, origin and lexical evaluation
order through the checker, HIR, MIR and native acquisition validation.

  • Preserve ordinary-data snapshots and flow-qualified machine projections
    without granting ownership or clone authority from a physical signature.
  • Retain constructor-owned lexical context for extracted breakpoint conditions,
    including canonical sequence and uninhabited-sum preparation.
  • Normalize intrinsic View roles before owning-transfer staging, and make
    collection observer fixtures use the required explicit views.

Validation: formatted checker304, HIR188, MIR181, backend67, object63 and the
MIR doctest pass. Ten breakpoint and three MapGet ownership regression groups
pass. Focused native replays pass the original nested breakpoint, three
interface/secret groups, and all64 scalar fixture comparisons. The last full
Windows native snapshot passed472/479 before these final five repairs.

This is an intermediate draft toward complete native parity. Builder replacement
while an earlier call view is live and reflected handled-view staging remain
unrepaired. A fresh full native/workspace/inventory run and supported-host
acceptance are pending. Resource providers and lifetimes, async/actor lifetimes
and remaining capture/reflection shapes remain in scope for the full objective.

vycdev added 3 commits October 4, 2026 10:27
Carry the existing caller disposition through exact typed checker, HIR, MIR and native handoffs. Bare move-only arguments transfer or relinquish ownership independently of the callee's access mode; written views retain the owner. Reject forged or stale source/generated call, staging, viewed-loop and handled-default ownership facts before native publication.

Preserve Rule25 data snapshots through interface conversion, repair generated refinement replay and sum-default backing proofs, and recover invalid calls without erasing independent dependency diagnostics. Update JSON facades and fixture retention sites to use explicit views. Build one immutable signature projection per complete MIR ownership validation pass while retaining every function and disconnected-block check.

Validation: cargo fmt, git diff --check, format checks for 16 changed Jett files, 293 checker tests, 598 frontend fixtures, 168 HIR tests, 147 MIR tests, 67 backend unit tests, 63 object tests and the HIR doctest pass. All 15 native caller groups pass in both profiles after source deletion; both previously failed driver property replays pass independently. Complete frozen-workspace, native inventory and supported-host validation remain pending for this candidate.
Preserve exact source origins, physical occurrences, flow-qualified machine
projections, and retained endpoint snapshots through HIR and MIR staging.
Keep extracted breakpoint conditions in constructor-owned lexical regions,
and normalize intrinsic View roles before the common owning-transfer check.
Use explicit views in collection observer fixtures and identify failed oracle
fixtures by name. Update architecture and acceptance records with scoped results.

Validation: formatted checker304/HIR188/MIR181/backend67/object63 plus MIR
doctest pass. Ten breakpoint and three MapGet ownership regression groups
pass. The original nested breakpoint, three map/interface/secret groups,
and all64 scalar native fixture comparisons pass in focused replays.

The last full native snapshot passed472/479 before the final five fixes.
Builder replacement and reflected handled-view staging remain open, along
with full workspace, inventory, platform and Resource acceptance. This is
an intermediate repair toward whole-language native coverage.
…cement

Keep exact checked handled producers and owned interface boxes alive through
call staging. Preserve a captured mutable plain TypeConstruction generation
while later arguments replace the current binding, with independent RHS
acquisition and cleanup on completion or abort.

Retain private Source, full local header, CFG and occurrence identity checks
through canonical preparation; do not grant general view escapes or cloning.
Align design, architecture and active parity notes with the bounded behavior.

Validation: 304 checker, 188 HIR, 196 MIR, 70 backend, 63 object-emission
tests and the MIR doctest pass. Seven generation and 66 acquisition tests pass;
the original builder failure and both-profile source-erased converted/reflected
native regressions pass. Rust and Jett formatting checks pass.

Full native480/workspace/fixed-inventory/platform acceptance remains pending.
Resource providers/cleanup and concurrency breadth remain whole-goal work.
@vycdev
vycdev merged commit a63f891 into codex/native-codegen Oct 17, 2026
4 checks passed
@vycdev

vycdev commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

Superseded for review by #281, the consolidated draft from codex/native-codegen to main. This PR was already merged into the stack branch; the replacement remains a draft for review and has not been merged into main. All six landing commands pass at dd0d415.

@vycdev
vycdev deleted the codex/native-caller-ownership-repairs branch October 17, 2026 17:05
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