Skip to content

Add programmatic plan security validator tests#137

Open
JSv4 wants to merge 1 commit intofeat/plan-security-cancellation-validationfrom
feat/plan-security-validator-tests
Open

Add programmatic plan security validator tests#137
JSv4 wants to merge 1 commit intofeat/plan-security-cancellation-validationfrom
feat/plan-security-validator-tests

Conversation

@JSv4
Copy link
Copy Markdown
Contributor

@JSv4 JSv4 commented Mar 27, 2026

Summary

  • 14 programmatic tests for plan security validators using in-memory OcfPackageContent
  • Covers issuance (valid, missing stakeholder, missing plan, late board approval, insufficient pool, pool adjustment, return to pool, multiple pools)
  • Covers acceptance (valid, blocked by prior retraction)
  • Covers retraction (valid, blocked by prior acceptance)
  • Covers cancellation (valid, blocked by conflicting transaction)
  • Allows TX_STOCK_PLAN_RETURN_TO_POOL as companion to cancellation

Stack

PR 6/6 — top of the stack, based on #135 (cancellation)

Test plan

  • All 180 tests pass (166 existing + 14 new)

@JSv4 JSv4 force-pushed the feat/plan-security-cancellation-validation branch from f08ea07 to 0b9d5d3 Compare March 27, 2026 16:20
14 tests covering plan security issuance, acceptance, retraction,
and cancellation validators:
- Valid and invalid issuance (stakeholder, stock plan, board approval, pool)
- Pool adjustment and return-to-pool restoring capacity
- Multiple independent pools tracked correctly
- Acceptance blocked by prior retraction
- Retraction blocked by prior acceptance
- Cancellation with and without conflicting transactions

Also allows TX_STOCK_PLAN_RETURN_TO_POOL as a companion transaction in
the cancellation validator, since cancellation + return to pool is a
natural pair in the OCF lifecycle.
@JSv4 JSv4 force-pushed the feat/plan-security-validator-tests branch from 51486b4 to 03681b8 Compare March 27, 2026 16:22
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.

1 participant