contract(class_view): execute_defaults — Default-recipe half of the ActionDef value executor (lane-3a inc 2)#690
Conversation
…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>
Bugbot couldn't run - usage limit reachedBugbot 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) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds ordered default-field execution to ChangesDefault Recipe Execution
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
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
…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>
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#GetOrCreateChartPanelinit-only-on-create quirk,devcomponent_chart.cs:161-180); abort-at-target reusingExecuteComputeError::Compute(Cyclicdocumented-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 tocompute_dag.WideFieldMaskfrom 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).One more brick, not a parallel path (the
screens_reachable_fromprecedent): 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 inclass_view.rs;ActionDefExecutorstays 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
cargo fmt+clippy --all-targetscleangrammar/thinking_styles.rs+style_family.rs(main was fmt-dirty on those two test files; formatting-only)Board hygiene (same commit)
LATEST_STATE.mdcontract-inventory entry +PR_ARC_INVENTORY.mdprepend (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)
SonoComputeDagExecutorflips the#[ignore]deffect_structural_diffvalue test (commitment #5);chart_default_paritywitnesses this primitive against the hand-portedGetOrCreateChartPaneloracle;DEFAULT-RECIPE-TARGETS.mdcommits the 56-method enumeration.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit
New Features
Tests
Documentation