Skip to content

contract(class_view): execute_defaults — Default-recipe half of the ActionDef value executor (lane-3a inc 2)#690

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/review-medcare-rust-dt7MS
Jul 14, 2026
Merged

contract(class_view): execute_defaults — Default-recipe half of the ActionDef value executor (lane-3a inc 2)#690
AdaWorldAPI merged 1 commit into
mainfrom
claude/review-medcare-rust-dt7MS

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 14, 2026

Copy link
Copy Markdown
Owner

What

The medcare transpile arc's next value-executor increment after execute_compute_dag (inc 1, c7903d5c, merged via #689): the Default recipe — write-if-blank (RecipeCentroid::Default, the C# if (field == null) field = new … lazy-init idiom; 56 methods in the MedCare 2,748-ActionDef corpus, the cheapest-per-method recoverable band after Compute).

Same split of responsibilities as the Compute half: upstream owns the fire/skip decision, the consumer closure owns value semantics — zero formulas in this crate.

Surface

  • class_view::execute_defaults(targets, present, store, apply_default) -> Result<Vec<u8>, ExecuteComputeError<E>> — fires each target whose presence bit is clear, in slice order; skips present AND already-fired positions (duplicate-safe — after a default fires, the field IS populated; pins the C# GetOrCreateChartPanel init-only-on-create quirk, devcomponent_chart.cs:161-180); abort-at-target reusing ExecuteComputeError::Compute (Cyclic documented-unreachable — defaults have no dependency order; a default reading a computed field is a Compute recipe).
  • ClassView::default_targets(class) -> &[u8] — zero-fallback hook next to compute_dag.
  • Presence gate = WideFieldMask from birth: every u8 position addressable, no 64-field ceiling — the wide-mask lesson the a2ui screen-addressing feat: engine bridge + CMYK/RGB qualia transform #205 correction paid for, applied preemptively (test: positions 133/200 fire natively).
  • Phase rule documented, not interleaved: defaults run BEFORE the recompute DAG; the caller folds the fired list into its presence mask. No combined runner in this increment.

One more brick, not a parallel path (the screens_reachable_from precedent): existing mask, existing error, same abort semantics.

Ratified reading of the consumer seam (medcare commitment #5)

The medcare-rs ignored test's promise of an "upstream ActionDefExecutor" cannot land as-written — the consumer trait is serde-shaped (serde_json::Value) and this crate is hard zero-dep. The reading this PR follows (the inc-1 precedent): "upstream" = recipe-kind execution primitives in class_view.rs; ActionDefExecutor stays the consumer seam whose impls are thin encode → upstream-primitive → hand-port-dispatch → decode shims. Flagging explicitly for operator sign-off with this PR.

Verification

  • 7 new unit tests (slice-order fire, present-skip, abort-keeps-earlier-writes, empty-noop, wide-fire-past-64, duplicate-fires-once, hook-default-empty)
  • 898 lance-graph-contract tests green; cargo fmt + clippy --all-targets clean
  • Also carries the pending rustfmt reflow on grammar/thinking_styles.rs + style_family.rs (main was fmt-dirty on those two test files; formatting-only)

Board hygiene (same commit)

LATEST_STATE.md contract-inventory entry + PR_ARC_INVENTORY.md prepend (Locked: wide-mask-from-birth, one-error-type family, duplicate-fires-once, phase rule, consumer-seam ratification; Deferred: Guard/Cascade/Normalize + combined runner).

Next (consumer side, MedCare-rs, same arc — PR follows after this merges)

SonoComputeDagExecutor flips the #[ignore]d effect_structural_diff value test (commitment #5); chart_default_parity witnesses this primitive against the hand-ported GetOrCreateChartPanel oracle; DEFAULT-RECIPE-TARGETS.md commits the 56-method enumeration.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for executing configured default values for class fields.
    • Defaults respect existing values, preserve configured order, avoid duplicate writes, and support fields beyond 64 positions.
    • Added default configuration support for classes without requiring custom setup.
    • Default execution stops safely when a write fails while preserving earlier results.
  • Tests

    • Expanded coverage for ordering, skipping, duplicates, large field indexes, empty configurations, and error handling.
  • Documentation

    • Updated contract and release tracking documentation.

…he ActionDef value executor (lane-3a inc 2)

The medcare transpile arc's next value-executor increment after
execute_compute_dag (inc 1, c7903d5): the Default recipe is write-if-blank
(RecipeCentroid::Default — the C# `if (field == null) field = new …` lazy-init
idiom; 56 methods in the MedCare corpus). Same split of responsibilities as
the Compute half: upstream owns the fire/skip DECISION, the consumer closure
owns value semantics.

- `execute_defaults(targets, present, store, apply_default)`: fires each
  target whose presence bit is clear, in slice order; skips present AND
  already-fired positions (duplicate-safe — pins the C# GetOrCreateChartPanel
  init-only-on-create quirk, devcomponent_chart.cs:161-180); abort-at-target
  reusing ExecuteComputeError::Compute (Cyclic documented-unreachable:
  defaults have no dependency order — a default reading a computed field is a
  Compute recipe).
- Presence gate is the WIDE mask (WideFieldMask), not FieldMask: every u8
  position addressable, no 64-field ceiling — the wide-mask lesson the a2ui
  screen-addressing #205 correction paid for, applied at birth here.
- `ClassView::default_targets` hook next to `compute_dag` (zero-fallback
  `&[]`); phase rule documented (defaults BEFORE the recompute DAG), not
  interleaved — no combined runner in this increment.
- 7 unit tests; 898 contract tests green; fmt + clippy clean.

Also carries the pending rustfmt reflow on grammar/thinking_styles.rs +
style_family.rs (main was fmt-dirty on those two test files — cargo fmt
--check failed on a clean checkout; formatting-only, no semantic change).

Board hygiene same-commit: LATEST_STATE contract-inventory entry +
PR_ARC_INVENTORY prepend.

Consumer side (MedCare-rs, same arc): SonoComputeDagExecutor flips the
ignored effect_structural_diff value test; chart_default_parity witnesses
this primitive against the hand-ported GetOrCreateChartPanel oracle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b50c84a0-d30e-4ed8-be02-5f0733c4764a)

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9eec6d39-ec7a-4781-b066-cd2567d8e612

📥 Commits

Reviewing files that changed from the base of the PR and between a260ff9 and f597c03.

📒 Files selected for processing (5)
  • .claude/board/LATEST_STATE.md
  • .claude/board/PR_ARC_INVENTORY.md
  • crates/lance-graph-contract/src/class_view.rs
  • crates/lance-graph-contract/src/grammar/thinking_styles.rs
  • crates/lance-graph-contract/src/style_family.rs

📝 Walkthrough

Walkthrough

The PR adds ordered default-field execution to class_view, including presence and duplicate gating, error propagation, a default trait manifest, tests, and contract documentation. It also reformats three existing assertions without changing behavior.

Changes

Default Recipe Execution

Layer / File(s) Summary
Default execution contract and behavior
crates/lance-graph-contract/src/class_view.rs, .claude/board/*.md
Adds execute_defaults, ClassView::default_targets, comprehensive execution tests, and documentation of ordering, gating, and abort semantics.
Assertion formatting cleanup
crates/lance-graph-contract/src/grammar/thinking_styles.rs, crates/lance-graph-contract/src/style_family.rs
Reformats existing assertions while preserving their logic and expected values.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant execute_defaults
  participant WideFieldMask
  participant apply_default
  Caller->>execute_defaults: provide targets and present mask
  execute_defaults->>WideFieldMask: check target presence and duplicates
  execute_defaults->>apply_default: apply eligible targets in slice order
  apply_default-->>execute_defaults: return success or error
  execute_defaults-->>Caller: return fired targets or ExecuteComputeError
Loading

Poem

I’m a rabbit with defaults in line,
Masks keep the present fields just fine.
One by one, the blanks are filled,
Duplicate hops are gently stilled.
If one fails, the earlier writes stay—
Then I nibble docs and dash away!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding execute_defaults and the default-recipe half of the ActionDef value executor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI AdaWorldAPI merged commit 4fbf42e into main Jul 14, 2026
7 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jul 14, 2026
…mpute_dag/execute_defaults doc-comments (5+3 council R5)

A 5+3 council flagged that the ZERO-DEP contract's recipe-sequencing
primitives were branded "the ActionDef value executor" and carried one
consumer's provenance ("the medcare transpile arc's lane-3a increment", "the
sono Recal_* family", "RecipeCentroid::Default harvest") in their doc-comments
— which every consumer of the contract inherits. They are generic sequencing
primitives, NOT an ActionDef-body interpreter (that is OGAR's
ACTIONDEF-VALUE-DISPATCH-PROPOSAL.md concern).

- execute_compute_dag / execute_defaults doc-comments reworded to describe the
  primitive generically (topological-order / fire-if-absent sequencing over
  ComputeEdge / positions) + a scope-note drawing the ActionDef-interpreter
  boundary explicitly. Code unchanged; 48 class_view tests green.
- ClassView::default_targets + test section comments de-branded likewise.
- E-LAYER-CONFUSION-OGAR-VS-SPINE-1 (EPIPHANIES) + AGENT_LOG entry record the
  council run and the load-bearing result: #690's execute_defaults IS correctly
  placed (OGAR consumes lance_graph_contract::ClassView) — NOT reverted.
- Filed #692 for the highest residual: contract::action re-declares OGAR IR
  names with no shape-parity fuse.

Incidental: cargo fmt fixed a pre-existing fmt-dirty legacy_outliers.rs
(same as the thinking_styles/style_family reflow in #690).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants