Repository navigation
S0 edge: Loop admits one ^loop_domain_edge; every loop-edge consumer reads it through one role (MQ-5 prerequisite) - #12548
Conversation
…reads it through one role Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…kers; roster consistency with #12548 / MQ-5 S3 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…reader lands with S3) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review 72278 is right that |
…its reader Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ions over LoopEdgeRole Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rget gate reads Loop edges by role Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review 72329: both findings are right, and both are fixed in the head that follows this comment.
|
…44d98f; heal-publish queue stalled) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review 72344 (at 1b0bcc8): right, and it is fixed at the current head b09bbd3. That commit regenerates |
…nk, S3 additions kept over main's S0 content) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
S0, substrate half, of
gunbc.plans.for_while_loop_sugar(§2.2 and §9). This is the prerequisite for MQ-5, which is that plan's S3: the fold seam Loop must carry its collection andinit. Per gentle-koi-724's ruling, the plan's encoding is the authority:fold = Bind { acc := init, body: Loop { domain: xs, carrier: acc, bound, body } }. This PR lands only the domain edge that encoding needs. PR2 (S3) movesfold_call_seam_looponto it.What changes
v2.std.node: one closedLoopEdgeRole(iterated body, domain value, bound measure, carrier binder, unrecognized), read in one place (loop_edge_role).loop_behavior_edges_conformadmits at most one^loop_domain_edge.loop_edge_contributes_to_iteration_foldandedge_contributes_to_cost_foldnow read the role, and the domain is excluded from both: it is evaluated once, not iterated.loop_edge_priced_oncenames the domain as once-priced work.v2.lens.cost: the domain is priced once, beside the iteration:linear(bound) × body + domain. It is neither multiplied into the iteration nor dropped. The fold state carries it in its ownonceaccumulator becausefold_nodevisits edges in authored order, and an inline sum would make the price depend on where the producer placed the edge.v2.std.compilers.target_modeltarget_value_expr_loop_gate:target_project_looprealizes only unaryloop e, which it does by reading positional child 0. It would have emitted a domain Loop or a carrier Loop asloop { break body }, a plausible wrong program. The gate now refuses both. For the carrier this closes an existing latent fail-open, since fold seam Loops already carry a carrier.Every reader of the loop edge labels
Grep of
loop_bound_edge|loop_carrier_edge|behavior: Loopoversrcanddag:v2.std.node(conformance, iteration fold, cost fold).v2.lens.costcost_fold_step.v2.std.compilers.target_modeltarget_value_expr_loop_gate.canonicalize_loop_labeledsorts the domain among the named edges, with the bound last. This is stable, and a claim below covers it.v2.std.cardinalityloop_measure_nodegoes through conformance.v2.lens.complexity_accumulator_copyreads the carrier only.v2.compiler.infergoes through the iteration fold.v2.extdeps.languages.dag,v2.lens.cost.copied_port_citationsandv2.lens.enforcement.receiptssites are producers of unary Loops.v2.compiler.fold_loweringis PR2.v2.compiler.evaleval_loop_nodedelegates tostep_loop.Consistency with #12473 (typed EdgeLabel coproduct)
^loop_domain_edgeis a language-independent substrate marker, so it is aCoreEdgeLabelarm besideLoopBoundandLoopCarrier(neat-boar-16's condition). The rule, coordinated with quiet-koi-814: whichever PR lands second adds the other's label to its roster. If #12473's cut lands first, this label is constructed through its Core arm.loop_edge_roleis the one reader of Loop labels, which gives that cut a single site to convert.Named remainder of S0 (out of scope)
The interpreter half is not in this PR.
v2.extdeps.runtimes.v2_evaluatorv2_eval_step_loopandv2.programprogram_step_loopstill reject every Loop, exactly as today. A domain Loop is not executed by anything yet.Controls
v2.test.claim.loop_domain_edge:v2.test.lens_cost.loop_domain_priced_once: the cost is exactlySumCost { LinearCost(bound), 1 }with the domain first and with it last. Both wrong arms fail this: multiplying the domain into the iteration collapses toLinearCost, and so does dropping it.Execution: these claims have not been executed outside CI. This container has no gunbc binary, and remote
claim_batchdispatches have been OOM-killed after corpus warm since 2026-09-27. Thefloorlane is their first execution.🤖 Generated with Claude Code