Skip to content

lift_actions: KausalSpec::Constrains/Onchange + ComputedField.stored — AT-CARRY-2 Arme B+D#169

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/atc2-kausal-ruff-gated
Jul 6, 2026
Merged

lift_actions: KausalSpec::Constrains/Onchange + ComputedField.stored — AT-CARRY-2 Arme B+D#169
AdaWorldAPI merged 2 commits into
mainfrom
claude/atc2-kausal-ruff-gated

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Was

Die ruff-gated Hälfte von AT-CARRY-2, nach dem Merge der ruff-Felder (#49). Ergänzt die autarken Arme A+C (#168):

  • Arm B: neue KausalSpec::Constrains{paths} / Onchange{paths} Varianten (ogar-vocab/src/lib.rs:608), populiert in lift_actions (ogar-from-ruff/src/lib.rs:612) aus Function::constrains/onchange. Konflikt-Regel (SPEC §3b): nur wenn kausal.is_none() — Depends (Arm A) gewinnt immer, Constrains vor Onchange. Provenance-ehrlich: nie aus reads/writes.
  • Arm D: ComputedField.stored aus Field::stored an beiden Konstruktionsstellen (:264 project_odoo_fields, :351 project_total_schema_fields).
  • Governance-Fuse kausal_spec_match_is_exhaustive um die neuen Varianten erweitert (der wildcard-freie Match brach zur Compile-Zeit wie designed — geschlossen durch ERWEITERN, nicht Wildcard).

Tests

77 ogar-from-ruff + 109 ogar-vocab (serde) + 3 woa_parity_probe + 8 Doctests, 0 failed; clippy --all-features -D warnings clean. Neue Tests: constrains/onchange→KausalSpec, depends-gewinnt-Konflikt, constrains-vor-onchange, Arm-A-Regression, stored (3 Literal-Fälle × 2 Stellen).

⚠️ Merge-Reihenfolge & offene Reviews

  1. Zuerst der ruff-Hotfix (ruff claude/atc2-ruby-spo-hotfix, completes docs(synergies): REVERT §3 OLED exciton leg [H]→[S] — close the live canon fork on main #49) muss auf ruff main — sonst bricht cargo build --workspace in ogar-from-rails (float-on-main, ruff_ruby_spo rot). B+D selbst berührt ogar-from-rails nicht; die Ziel-Crates sind grün.
  2. Opus-Review dieses Diffs steht noch aus — anders als A+C (lift_actions: kausal (Depends) + ActionDef.raises — AT-CARRY-2 autarke Arme A+C #168, vor Merge reviewt) wurde B+D vom Grinder self-verifiziert, aber noch nicht adversarial gegengelesen. Vor Merge bitte reviewen (Konflikt-Reihenfolge, Last-wins-Index-Annahme aus D-ATC2-KAUSAL-AUTARK).

Ledger-Eintrag D-ATC2-KAUSAL-RUFF-GATED (B+D komplett) folgt im Merge-Schritt.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cg8DSUz1U4AvKqXiy9Xx2f

claude added 2 commits July 6, 2026 21:36
`@api.constrains` is a validation trigger and `@api.onchange` is a
UI-side recompute trigger — both distinct from the persisted
`Depends` recompute trigger, so they get their own sum-type variants
rather than being folded into `Depends`.

Extends the intra-crate exhaustive `kausal_spec_match_is_exhaustive`
governance test (the COUNT_FUSE substitute for `#[non_exhaustive]`) to
cover both new arms — this is the loud, by-design compile break the
spec calls for when a new KausalSpec variant is added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cg8DSUz1U4AvKqXiy9Xx2f
Arm B: `lift_actions` now reads `Function::constrains` / `::onchange`
(ruff main) into `KausalSpec::Constrains` / `::Onchange`, recording the
matching decorator name (`api.constrains` / `api.onchange`) on
`ActionDef::decorators`. Gated on `a.kausal.is_none()` so Arm A's
`Depends` (a persisted recompute trigger) always outranks a
validation/UI-recompute trigger on the same method; `constrains` is
checked before `onchange` for the rarer case a method carries both.

Arm D: `ComputedField.stored` is now wired from `Field::stored`
(ruff main, `Option<bool>`) at both construction sites
(`project_odoo_fields` and `project_total_schema_fields`) —
`field.stored.unwrap_or(false)`, matching Odoo's own "not stored"
default for computed fields.

New tests cover: constrains -> Constrains, onchange -> Onchange, the
Depends-wins-over-Constrains/Onchange conflict rule, the
constrains-wins-over-onchange sub-case, an explicit Arm A regression,
and all three `stored` literal cases (None/Some(false)/Some(true)) at
both ComputedField construction sites.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cg8DSUz1U4AvKqXiy9Xx2f
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@cursor

cursor Bot commented Jul 6, 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_88e6c9e7-5ab6-486b-acaa-4abf32b68845)

@AdaWorldAPI AdaWorldAPI merged commit 9bfb77e into main Jul 6, 2026
2 checks passed
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