Skip to content

§1.5 stage-fold: dissolve v4.compiler.value_expression upward into target_model value-tier rows (file deleted) - #4809

Merged
briansrls merged 6 commits into
mainfrom
session/loyal-newt-107-impl
Jun 13, 2026
Merged

briansrls merged 6 commits into
mainfrom
session/loyal-newt-107-impl

Conversation

@briansrls

@briansrls briansrls commented Jun 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Dissolves src/v4/compiler/06_value_expression.dag (the Transform-for-add arm) upward into src/v4/std/compilers/target_model.dag as value-tier projection rows (§1.5, last §1 stage-fold item). The file is deleted; 06_translate and all consumers are repointed in the same PR.

Architectural note: The dissolution mark authority: canonical_operation_from_wire_node was imprecise — canonical_operation_from_wire_node decodes the wire discriminant format, not the surface token. The true authority is a composition: surface-decode (compiler/ extdep) → canonical_op → target_model apply (pre-decoded). Mark corrected in the new target_model.dag comment block per parent ruling.

Layering: target_model.dag stays extdep-free. 06_translate adds a surface-decode shim translate_project_transform_in_arrow_scope that calls dag_surface_operator_canonicalization_member (dag.dag extdep), decodes the CanonicalOperation, then delegates to target_project_transform_primitive_apply_in_arrow_scope in target_model (which takes the pre-decoded canonical_op). Higher-order handle_transform callback threads the shim through the value-expression projection.

Done = 06_value_expression.dag deleted. Consumers repointed: 06_translate.dag, branch_if_then_else_emit.dag, comprep_value_expression_fold_typescript.dag.

Stacking note: This PR is stacked on #4741 (Branch EMIT row). Will rebase onto clean main after #4741 merges before marking ready for review.

Test plan

  • cargo test -p v2-compiler-tests "pipeline::dag_emit_from_resolved_matches_compile_sources_for_v4_slice" → ok (180s, green)
  • CI running on pushed commits

Worker attestation

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why.
  • Tests run: cargo test -p v2-compiler-tests "pipeline::dag_emit_from_resolved_matches_compile_sources_for_v4_slice" → ok.
  • After rebase: verify CLEAN merge state and flip to ready.
  • No commits on this branch are surprises.
  • No secrets / credentials / large binaries staged.

@briansrls briansrls changed the title §1.5 stage-fold tail (leaf, LAST §1 item): dissolve 06_value_expression.dag (387L skeleton, Transform-for-add arm only) upward into translate_algebra value-tier rows — done = file deleted or data-only. SEQUENCE AFTER the Branch emit row lands (same emit surface as adhoc-fdd9ccb8-b54's worker; sharp- §1.5 stage-fold: dissolve v4.compiler.value_expression upward into target_model value-tier rows (file deleted) Jun 13, 2026
@briansrls
briansrls force-pushed the session/loyal-newt-107-impl branch from 628bd5f to 4039896 Compare June 13, 2026 06:57
@briansrls
briansrls force-pushed the session/loyal-newt-107-impl branch from 6e6f2b7 to 4039896 Compare June 13, 2026 09:53
Brian Searls and others added 4 commits June 13, 2026 14:49
…sion

branch_if_then_else_emit.dag: value_expr_branch_bool_gate → target_value_expr_branch_bool_gate (target_model)
comprep_value_expression_fold_typescript.dag: update project/projection/tokens imports to target_model;
thread translate_project_transform_in_arrow_scope as handle_transform callback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t_at_optional

target_value_expr_branch_bool_gate matched list_at_optional's Present { value: cond }
and then accessed cond.kind directly — type checker resolved cond as T (not Node),
failing with 'no field kind on type T'. Extract target_value_expr_cond_is_bool_atom(node: Node)
as a typed helper; pass cond through it so the call site constrains T = Node.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@briansrls
briansrls marked this pull request as ready for review June 13, 2026 14:50
@briansrls
briansrls force-pushed the session/loyal-newt-107-impl branch from 2a944a7 to d4c41b5 Compare June 13, 2026 14:50
Brian Searls and others added 2 commits June 13, 2026 15:04
…ession

Missed consumer in §1.5 dissolution — program_partition.dag still
imported arrow_has_transform_body from translate and the deleted
value_expression module. Repoints to target_model equivalents and
wires translate_project_transform_in_arrow_scope as handle_transform
in the body-emit seam, matching the pattern used in
comprep_value_expression_fold_typescript.dag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansrls pushed a commit that referenced this pull request Jun 13, 2026
… 🟡 marks

Close incomplete-merge residual from #4807: add bind/loop eval keystone rows
(25→27, shard rebalance 14/13), restore dag.dag pick-arm binding whitelist mark,
typescript.dag Cost-of-Change comment + conditional_form stub mark. All new rows
verified ExpectPass by execution locally. Merge gated on #4809.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls merged commit b8ed903 into main Jun 13, 2026
15 checks passed
@briansrls
briansrls deleted the session/loyal-newt-107-impl branch June 13, 2026 15:24
@briansrls

Copy link
Copy Markdown
Contributor Author

Dispositioning the claude-opus-4-7 review findings (all non-blocking; verified against the head):

  1. target_model.dag target_value_expr_binding_in_declared_param_list (fold_list→Bool membership predicate): confirmed it already carries the full 3-part 🟡 Practice-10 mark (owner T6 / lane compiler 06_value_expression / dissolve-on-arrival: std.collection symbol-list contains accessor). So it is tracked, not a permanent license — agreed the std.collection contains accessor is the obvious dissolution target; that is exactly the recorded dissolve trigger. No change needed for this PR.
  2. arrow_has_*_body predicates: also 🟡-marked with concrete dissolve triggers (grammar relation-row / connective dispatch) — acceptable interim, as the reviewer notes.
  3. cross-module handle_transform callback + the corrected 7409–7415 framing comment: positive, no action.
  4. imports/exports (translate_project_transform_in_arrow_scope def/consumers): confirmed lined up.

All four are non-blocking observations on an APPROVE; the two predicate-shape items are already dispositioned by their 🟡 marks (the dissolution work is tracked, not owed by this PR). No code change. Merge-readiness unchanged: 2/2 distinct approvals (claude + cursor), 0 REQUEST_CHANGES, mergeable=CLEAN — awaiting CI settle + operator merge.

— sent from sharp-fox-370

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