lift_actions: KausalSpec::Constrains/Onchange + ComputedField.stored — AT-CARRY-2 Arme B+D#169
Merged
Merged
Conversation
`@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
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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_88e6c9e7-5ab6-486b-acaa-4abf32b68845) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
KausalSpec::Constrains{paths}/Onchange{paths}Varianten (ogar-vocab/src/lib.rs:608), populiert inlift_actions(ogar-from-ruff/src/lib.rs:612) ausFunction::constrains/onchange. Konflikt-Regel (SPEC §3b): nur wennkausal.is_none()— Depends (Arm A) gewinnt immer, Constrains vor Onchange. Provenance-ehrlich: nie aus reads/writes.ComputedField.storedausField::storedan beiden Konstruktionsstellen (:264project_odoo_fields,:351project_total_schema_fields).kausal_spec_match_is_exhaustiveum 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 warningsclean. Neue Tests: constrains/onchange→KausalSpec, depends-gewinnt-Konflikt, constrains-vor-onchange, Arm-A-Regression, stored (3 Literal-Fälle × 2 Stellen).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 brichtcargo build --workspaceinogar-from-rails(float-on-main,ruff_ruby_sporot). B+D selbst berührt ogar-from-rails nicht; die Ziel-Crates sind grün.Ledger-Eintrag D-ATC2-KAUSAL-RUFF-GATED (B+D komplett) folgt im Merge-Schritt.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cg8DSUz1U4AvKqXiy9Xx2f