Name:
[ADD] viin_ai_approval(+account,+sale,+ops_brain): P-OPS-2 approval governance + AI advisory on human approvals
State:
Killed
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#47
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
d2d037ea75a68c03ddfd89ae5b065659cf7f60bf
Description:
[REF] viin_ai_approval: data-driven state sync via approval-type code_* hooks
Follow the viin_approval idiom: do NOT override action_validate/refuse/cancel in
Python to trigger side-effects. Instead the seeded approval.request.type carries
code_validate_post / code_refuse_post / code_cancel_post inline hooks (safe_eval)
that call the proposal's public callbacks _on_approval_validated/refused/cancelled.
- viin_approval_request.py: remove the action_* overrides + _propagate_to_work_item;
keep only the evidence/link fields (ai_proposal_id, ai_trace_id, ai_prompt_snapshot,
ai_iteration_index).
- action_proposal.py: add the public callbacks (approved + work-item start + honest
single-step execute; rejected; back-to-draft).
- data/approval_request_type.xml: the three code_* hooks dispatch to the callbacks
via ai_proposal_id.
Verified identical green (0 failed of 10) in BOTH Community and full-EE addons sets;
grep confirms no action_* override remains. Tests assert business outcomes (proposal
approved/rejected/draft after the decision), mechanism-agnostic.
Branch:
17.0
Instance ID:
0
Age:
Up-time:
Not finished