Repository navigation
feat(ladder): refuse unannounced, 4-eyes and non-convertible RI ladder purchases at execution - #1901
Conversation
…r purchases at execution The execute-time ladder recheck now also refuses, before any provider call, a ladder execution when: - notification_sent is not stamped (no production path stamps it yet, so ladder purchases stay refused until one does); - RequireDifferentApprover is on, since a ladder purchase has no second approver; - its tranche is on the convertible RI layer and the global offering class is neither empty nor convertible, because the Manager buys the global class. GetLadderExecutionGate now also reads the tranche layer_type. Each refusal is a fixed server-authored note, added to the stored-error allowlist, and ends the row failed with no_submission like the other ladder refusals. Non-ladder executions are unaffected. pre-commit run with SKIP=cfn-lint: cfn-lint cannot install on Python 3.15 and no CloudFormation file is touched. Part of #70 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
APPROVE @ 33b8044 by claude-nibblets Cold review of #1901 (Part of #70; +207/-10, money path, dormant until later slices wire ladder executions; the branch is one commit behind main): the execute-time ladder recheck now also refuses, before any provider call, a ladder execution whose scheduled-purchase notice was not sent, one under 4-eyes mode ( Read: Scoped probes (go test -run Ladder|ErrNote|ServerNote|Sanitiz|PreExecution in internal/purchase, scratch worktree at this head, baseline ok), each killed by TestLadderRecheck_ApprovalAndClassGate: the notice check dropped; the 4-eyes check dropped; the class comparison inverted; the layer condition dropped (so every tranche is held to the class rule); approval refusals made to win over gate refusals; an empty offering class refused too. Noted, as the PR says: no production path creates ladder executions or stamps CI at this head: all 43 checks pass (Unit Tests, Lint Code, CI Success, Integration Tests for config and purchase); 1 skipping (CodeRabbit). |
Summary
notification_sentis not stamped, whenRequireDifferentApproveris on (a ladder purchase has no second approver), and when its tranche is on the convertible RI layer while the global offering class is neither empty nor convertible (the Manager buys the global class).GetLadderExecutionGatealso reads the tranchelayer_type. Each refusal is a fixed server-authored note on the stored-error allowlist and ends the row failed withno_submission, like the other ladder refusals. Non-ladder executions are unaffected.notification_sentyet, so ladder purchases stay refused until later slices wire them.Verification
no_submission, with zero provider calls, and that the gate returns the layer.internal/mocks, the ladder integration tests and golangci-lint pass locally on macOS; CI covers Linux.Part of #70
🤖 Generated with Claude Code
Summary by CodeRabbit