Skip to content

Banking example: BlockCardsOfAccount policy - #183

Merged
vanrogu merged 1 commit into
developfrom
ccr-20de7e00-vdlpia
Oct 5, 2026
Merged

vanrogu merged 1 commit into
developfrom
ccr-20de7e00-vdlpia

Conversation

@vanrogu

@vanrogu vanrogu commented Oct 5, 2026

Copy link
Copy Markdown
Member

Whenever an account is frozen or closed, block its cards. Adds a card entity and an
AccountAccess branch to the closing-the-books domain (CardIssued, AccountFrozen,
AccountClosed, CardBlocked), the issuecard, freezeaccount and closeaccount slices that
raise those facts, and the blockcardsofaccount slice: a policy mapping both triggering
events onto BlockCardsOfAccountCommand, which blocks each card still usable and is
idempotent by its own rule. Registered fromNowOn().stallOnRejection().

BlockCardsOfAccountPolicyTest is the reference for testing a policy on the published
PolicyTest base; the three new commands have tests of their own.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KWxMvenC9i8bdsJyk4HF7B

Whenever an account is frozen or closed, block its cards. Adds a card entity and an
AccountAccess branch to the closing-the-books domain (CardIssued, AccountFrozen,
AccountClosed, CardBlocked), the issuecard, freezeaccount and closeaccount slices that
raise those facts, and the blockcardsofaccount slice: a policy mapping both triggering
events onto BlockCardsOfAccountCommand, which blocks each card still usable and is
idempotent by its own rule. Registered fromNowOn().stallOnRejection().

BlockCardsOfAccountPolicyTest is the reference for testing a policy on the published
PolicyTest base; the three new commands have tests of their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KWxMvenC9i8bdsJyk4HF7B
@vanrogu
vanrogu merged commit 876efee into develop Oct 5, 2026
2 checks passed
@vanrogu
vanrogu deleted the ccr-20de7e00-vdlpia branch October 5, 2026 11:16
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