Skip to content

lift_actions: kausal (Depends) + ActionDef.raises — AT-CARRY-2 autarke Arme A+C#168

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/atc2-kausal-autark
Jul 6, 2026
Merged

lift_actions: kausal (Depends) + ActionDef.raises — AT-CARRY-2 autarke Arme A+C#168
AdaWorldAPI merged 3 commits into
mainfrom
claude/atc2-kausal-autark

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Was

Die OGAR-autarke Hälfte von AT-CARRY-2 (KausalSpec-Population), aus der odoo-rs-Triangulation destilliert und gegen Primärquellen verifiziert. Wichtigste Korrektur gegenüber der relayed Studie: der depends-Arm hat keine ruff-Voraussetzung — die Daten fließen längst über Field::emitted_byField::depends_on.

  • Arm A: lift_actions populiert kausal = KausalSpec::Depends aus einem emitted_bydepends_on-Index über model.fields — dem ogar-from-schema-Präzedenz (do_arm.rs::kausal_from_entity) folgend, copy not design. Provenance-ehrlich: nie aus reads fabriziert; die Regression lift_actions_plain_read_still_no_kausal beweist, dass ein Read eines computed Fields dem Leser kein kausal unterschiebt (Fixture liest amount_total, das von einer ANDEREN Methode emitted wird).
  • Arm C: additiver ActionDef.raises-Slot (Function::raises, Authoritative, exc:-Namespace), serde(default) nach vocab-Konvention inkl. Missing-Key-Round-trip-Test.
  • Governance-Fuse: kausal_spec_match_is_exhaustive — wildcard-freier intra-crate Match, der zur COMPILE-Zeit bricht, sobald Arm B Varianten ergänzt. COUNT_FUSE-Encoding, kein Pin (D-NEVER-PIN-BUMP).
  • Ledger: D-ATC2-KAUSAL-AUTARK appended (inkl. benannter Last-wins-Index-Annahme: co-computed Fields tragen unter Odoo-Semantik identisches depends_on).

Was NICHT

Arme B (constrains/onchange→neue KausalSpec-Varianten) + D (computed.stored) — die brauchen ruff #49 auf ruff main und folgen als eigener PR danach (float-on-main, der laute Break bis dahin ist Doktrin).

Tests

109 ogar-vocab (inkl. serde-Feature) + 71 ogar-from-ruff + 3 woa_parity_probe, 0 failed; Clippy --all-features -D warnings clean. Opus-Review: MERGE-READY, 2×P2 — beide adressiert (serde(default) + Round-trip-Test; Index-Annahme im Ledger benannt). Reviewer hat zusätzlich alle 9 Downstream-ActionDef-Consumer gegen den additiven Slot kompiliert: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cg8DSUz1U4AvKqXiy9Xx2f

claude added 3 commits July 6, 2026 21:10
Function::raises already exists in ruff_spo_triplet (core-7) but had no
ActionDef slot to land in. Add `pub raises: Vec<String>` right after the
existing `calls` effect annotation, mirroring its shape exactly -
additive, Default-derived, no existing `ActionDef::new(...)`/`..Default::
default()` construction site needs to change.

Also add the exhaustive-match governance test for KausalSpec
(`kausal_spec_match_is_exhaustive`) required by SPEC-ATC2-OGAR §7: a
wildcard-free match over all five current variants that will fail to
compile the moment Arm B (Constrains/Onchange) lands without updating
this match - the COUNT_FUSE-style loud break the doctrine asks for
instead of leaning on #[non_exhaustive] alone.
… + C)

Arm A: build a compute-method -> @api.depends-paths index from
Model::fields (Field::emitted_by / Field::depends_on - both already
flow through ruff, no ruff change needed) and populate
ActionDef::kausal = Some(KausalSpec::depends(paths)) for exactly the
methods that are a field's compute target. Provenance-honest: `reads`
never fabricates a `kausal` trigger, only the real @api.depends fact
does; a method with no matching Field::emitted_by keeps kausal == None
(pins lift_actions_plain_read_still_no_kausal).

Arm C: a.raises = f.raises.clone() - straight verbatim carry now that
ActionDef has the slot.

Updates the two stale doc comments that said kausal/raises had no path
onto ActionDef. New tests: lift_actions_depends_field_yields_kausal_
depends, lift_actions_plain_read_still_no_kausal,
lift_actions_raises_carried_on_actiondef. Existing lift_actions_is_facts_
only / lift_actions_carries_read_write_call_effect_facts stay green
unchanged (their fixtures declare no compute fields).

Arms B (Constrains/Onchange) and D (ComputedField.stored) are out of
scope - they need ruff_spo_triplet::Function::constrains/onchange and
Field::stored, which do not exist yet on ruff main (confirmed by
reading ruff_spo_triplet's Function/Field structs in the resolved git
dependency checkout).
…key round-trip test, D-ATC2-KAUSAL-AUTARK

- ActionDef.raises now carries #[cfg_attr(feature = "serde", serde(default))]
  per the vocab's own additive-field convention; pre-raises JSON
  deserializes (new feature-gated test, serde_json dev-dep added).
- DISCOVERY-MAP: D-ATC2-KAUSAL-AUTARK appended (arms A+C autark, B+D
  gated on ruff #49, last-wins index assumption named).
@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_b367ff53-0271-44ca-80c5-1b84ab356528)

@AdaWorldAPI AdaWorldAPI merged commit f8420b9 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