feat(intent): op=method contract — nil_intent can express workflow actions#65
Open
Basheirkh wants to merge 1 commit into
Open
feat(intent): op=method contract — nil_intent can express workflow actions#65Basheirkh wants to merge 1 commit into
Basheirkh wants to merge 1 commit into
Conversation
…tions Extend the intent write contract so the single nil_intent payload covers workflow methods (post an invoice, validate a picking, confirm an order), not just CRUD: - Change gains `method` + `params` (for op="method"). - OP_TO_RESOURCE["method"] = "resource.method" — maps to the adapter's generic, allow-list-governed (default-deny) method spine, so no per-action verb is needed. Contract readiness only: the write-execution provider that consumes `change` (CRUD and method) over propose→commit is the intent-unification phase. Reads are unchanged. Backward-compatible (new fields default-empty). Adapter side (odoo resource.method + per-(model,method) allow-list) already shipped.
2b571c0 to
2023143
Compare
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.
Summary
Extends the
nil_intentwrite contract so the single payload covers workflow methods (post an invoice, validate a picking, confirm an order), not just CRUD — completing the model-facing surface for Odoo full coverage.Changegainsmethod+params(used whenop="method").OP_TO_RESOURCE["method"] = "resource.method"→ the adapter's generic, allow-list-governed (default-deny) method spine. No per-action verb needed.Scope / honesty
Contract readiness only. The kernel resolver does reads today; the write-execution provider that consumes
change(CRUD and method) over propose→commit is the intent-unification phase (PLAN-intent-unification-and-durability, kept local). This PR makes the contract complete so that provider — and the already-shipped Odoo adapterresource.method(PR odoo#10/#11) — line up the moment it lands.Backward-compatible: new fields default-empty; reads unchanged.
Test plan
pytest tests/ -k "intent or router"— greentest_change_contract_supports_method_op