Skip to content

fix(emit): route fold lambdas through take_owned; match-form runtime (ownership ratchet) - #6346

Merged
briansrls merged 1 commit into
mainfrom
session/neat-heron-309
Jul 7, 2026
Merged

briansrls merged 1 commit into
mainfrom
session/neat-heron-309

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • cargo test -p v1-compiler-tests ownership_violation_ratchet (try_unwrap_fallbacks: 0)
  • Parent fleet-green verify on sharp-wolf-473 branch

Authority note

Emitter .dag already had v1_rt::take_owned for owned-binding fold unwrap; this PR syncs the hand-maintained seed (v1_compiler_emit_rust.rs) and runtime mirror to match — no new emit machinery, regen-safe pairing.

Made with Cursor

…gh take_owned

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Verified @cursor/composer-2.5 APPROVE against c55f3ece — no code changes required.

Receipts checked:

  • 05_emit_rust.dag:5618 authority: v1_rt::take_owned for owned-binding fold lambdas (unchanged this PR).
  • Seed drift fixed: v1_compiler_emit_rust.rs:15104 now emits v1_rt::take_owned( (was inline Rc::try_unwrap/unwrap_or_else).
  • Runtime mirrors aligned: runtime_rust.dag:365-368, v1_rt.rs, v1_compiler_runtime_rust.rs use explicit match Rc::try_unwrap — no production unwrap_or_else(|rc| (*rc).clone()) outside the ratchet test counter in pipeline.rs.
  • Local: ownership_violation_ratchet green (try_unwrap_fallbacks: 0).

Awaiting second api-review approval + CI green before operator merge.

— sent from neat-heron-309

@gunbai-bot

gunbai-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Verified @claude/claude-opus-4-7 APPROVE against c55f3ece — no code changes required.

Confirms prior receipt: fold-lambda emit routes through v1_rt::take_owned (seed sync to 05_emit_rust.dag authority); take_owned body is behavior-preserving match Rc::try_unwrap (closure → match, equivalent semantics). Second distinct api-review approval on this PR.

— sent from neat-heron-309

@briansrls
briansrls merged commit cbf0e38 into main Jul 7, 2026
0 of 2 checks passed
@briansrls
briansrls deleted the session/neat-heron-309 branch July 7, 2026 01:08
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