feat(status): on-behalf v→V/d→D assertion and Vendor-implies-V invariant - #3102
Open
sei-ahouseholder wants to merge 3 commits into
Open
feat(status): on-behalf v→V/d→D assertion and Vendor-implies-V invariant#3102sei-ahouseholder wants to merge 3 commits into
sei-ahouseholder wants to merge 3 commits into
Conversation
…ant (closes #3057) Implements ADR-0084's narrow externally-evidenced on-behalf exceptions and the Vendor-participation-implies-V invariant: - AC-1/AC-2: SvcAddOnBehalfStatusUseCase + AddOnBehalfStatusTriggerRequest let a Case Manager or Case Owner assert v→V (CS_vf.Vf) or d→D on behalf of a notified-but-not-joined vendor/deployer. - AC-3: f→F (CS_vf.VF) is rejected at the request boundary. - AC-4: vendor_vf_invariant_ok predicate enforced on both trigger and BT paths. - AC-5: PRM-06 group added to specs/participant-role-management.yaml. - AC-6: Tests in test_participants.py and test_add_on_behalf_status.py. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- FAIL: EnsureOnBehalfParticipantExistsNode required_role → required_roles (list) so combined vf+d on-behalf requests create a participant with both VENDOR and DEPLOYER roles instead of silently failing the DEPLOYER check. - FAIL: AddOnBehalfStatusTriggerRequest now requires at least one of vf_state or d_state to be non-None; an all-None request is rejected at the model boundary with a clear ValidationError. - IMPROVE: _create_and_attach_participant import moved from tick-time (inside update()) to module level in vfd_role_guards.py so renames are visible to static analysis. Filed #3100 (cross_machine_violations bypass paths) and #3101 (stale BB_LEDGER_PAYLOAD_OBJECT_OVERRIDE) as pre-existing DEFER findings. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…VultronValidationError (#3100, #3103) Under the new completeness doctrine these first-order findings in files already touched by this PR are fixed now rather than deferred. - #3100: CreateParticipantStatusNode._validate_transitions() now calls cross_machine_violations() after per-dimension checks, so bypass callers (DevelopFixNode, DeployFixNode, etc.) cannot persist a state that ValidateTriggerTransitionsNode._validate_entailments() would have refused. Adds eff_rm parameter through the call chain. - #3103: ValidateTriggerTransitionsNode.update() now catches VultronValidationError from resolve_participant_state_from_dl() via a _resolve_current_state() helper, returning Status.FAILURE with a diagnostic message. The PXA check is also extracted to _check_pxa_transition() to keep update()'s McCabe complexity at or below the project limit of 10. - 2 new regression tests in test_add_participant_status.py. Deferred: #3101 (BB_LEDGER_PAYLOAD_OBJECT_OVERRIDE stale on case-not-found path) is second-order and entangled with open concern #2711; requires careful port-ownership reasoning beyond this PR's scope. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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
Implements ADR-0084's narrow externally-evidenced on-behalf assertion exceptions
and the Vendor-participation-implies-V invariant, closing the vendor-awareness
gap (CONCERN-2087).
Changes
vultron/core/predicates/participants.py:vendor_vf_invariant_ok(roles, vf_state)predicate — returnsFalsewhen a VENDOR-role actor assertsCS_vf.vf(AC-4, PRM-06-002)vultron/core/behaviors/case/nodes/vfd_role_guards.py:CheckOnBehalfAuthorizedNode(gates CM/CO for on-behalf path) andEnsureOnBehalfParticipantExistsNode(creates minimal CaseParticipant with required roles when absent) (AC-1/AC-2)vultron/core/behaviors/case/nodes/participant/trigger_validation.py:_check_vf_roleenforces Vendor-implies-V invariant via predicate (AC-4)vultron/core/behaviors/case/nodes/participant/status.py:_check_vf_preconditionenforces Vendor-implies-V invariant (AC-4)vultron/core/use_cases/triggers/requests.py:AddOnBehalfStatusTriggerRequest—vf_state=CS_vf.VFrejected at boundary (AC-3); all-None request rejected (requires ≥1 dimension)vultron/core/behaviors/case/add_on_behalf_status_trigger_tree.py(new): BT tree for on-behalf assertion (AC-1/AC-2, BT-15-001)vultron/core/use_cases/triggers/case/add_on_behalf_status.py(new):SvcAddOnBehalfStatusUseCase(AC-1/AC-2)specs/participant-role-management.yaml: PRM-06 group — 5 new spec entries for self-declaratory default, Vendor-implies-V invariant, v→V/d→D on-behalf MAY, and f→F Vendor-only MUST NOT (AC-5)CS_vf.Vffor vendor (now required by AC-4)Deferred findings
CreateParticipantStatusNode._validate_transitionsdoes not callcross_machine_violations()on bypass paths (pre-existing, not introduced by this PR)FilterCsEmDimensionNodecase-not-found FAILURE leavesBB_LEDGER_PAYLOAD_OBJECT_OVERRIDEstale (pre-existing, not introduced by this PR)Verification