Repository navigation
wrap_decision_predicate: fix Instantiation-wire caller bypass (v2-translate correctness) - #7264
Merged
Merged
Conversation
…tion-kind caller bypass translate_apply_use_site_ownership_to_projected_boundary previously fell through _ => outcome_accepted(projected) for any TargetTypeExprInstantiation wire (Option<T>/Rc<T>/List<T> shapes), silently skipping the ownership-wrap gate on composite type arguments. The prior commit added the TargetTypeExprInstantiation arm; this adds the witness that proves it: verified red against the pre-fix caller (bypass returns the arg unwrapped, still TargetTypeExprAtom) and green against the fix (arg comes back wrapped, decodes as TargetTypeExprInstantiation). Closes the RE-OPENED wrap_decision_predicate migration trigger in v1_deletion_plan.dag. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
run_host_process/_with_cache/_admitted are wired (build_transport_admissible admission + emit_host_run_transport dispatch); emit_host_transport_not_wired no longer exists in emit_host.dag. Flagged during Kernel-D frontier review (sharp-bee-290) — the pure-eval emit seam this section describes as a gap is landed, not open. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Correctness fix (construction), not an E0308 burn-down.
translate_apply_use_site_ownership_to_projected_boundaryinsrc/v2/compiler/06_translate.dagrouted onlyTargetTypeExprAtom-kind wires throughwrap_decision_gate; anyTargetTypeExprInstantiation-kind wire (Option<T>,Rc<T>,Witness<T>,List<T>) fell through a catch-all_ => outcome_accepted(projected)bypass, silently skipping the ownership-wrap decision for composite type arguments at the v2-translate boundary. This closes the RE-OPENEDwrap_decision_predicatemigration trigger indag/gunbc/v1_deletion_plan.dag.This is the v2-translate half of OWNERSHIP; the seed emitter half (
05_emit_rustchokepoint, the metric-moving side) is #7223 (witty-wolf-289). No file overlap confirmed (checked06_translate.dag/wrap_decision.dag/ this PR's test file against #7223's diff — additive-only in the sharedrust.dagfile, no shared callers).New function
translate_apply_use_site_ownership_to_instantiation_boundary: head/tail-splits both the projected and source-binding nodes, zips positional type arguments, recurses the boundary gate per argument (fail-fast viasequence_outcome/ShortCircuit), and rebuilds the node — making the unwrapped-composite state unwritable at this boundary rather than silently passing it through.Test plan
src/v2/test/claim/wrap_decision_predicate_test.dag: addedwrap_decision_instantiation_arg_is_wrapped, a discriminating witness that builds anOption<Node>-shaped compositeTargetTypeExprInstantiationwire and asserts the wrapped result's inner argument decodes asTargetTypeExprInstantiation(Box-wrapped) rather than staying bareTargetTypeExprAtom.06_translate.dagto the parent commit locally, re-ran):FAIL wrap_decision_instantiation_arg_is_wrapped.PASS wrap_decision_predicate_witness_holds,PASS wrap_decision_instantiation_arg_is_wrapped—cargo run --release --bin claim_batch -- --entry src/v2/test/claim/wrap_decision_predicate_test.dag --function wrap_decision_predicate_witness_holds --function wrap_decision_instantiation_arg_is_wrapped --source-root src/v2 --source-root dag.gunbc compile --source-root dag --source-root src/v2 --entry src/v2/compiler/06_translate.dag --target dag: 0 blocking errors.05_emit_rust, not06_translate.dag; this fix moves the v2-translate boundary metric, which the probe doesn't sample). No E0308-delta claim is made for this PR.Also included: a stale-doc correction in
docs/plans/interpreter-kernel-d.md— the "fail-closed emit_host" note is out of date;run_host_process/_with_cache/_admittedare already wired against live transport dispatch.