Enforce OCF terminal transaction completeness#281
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (23)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@copilot review exact head |
|
@codex review exact head |
|
@cursor review exact head |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a2487c4. Configure here.
Reviewed exact head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2487c47c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@copilot review exact head |
|
@codex review exact head |
|
@cursor review exact head |
Reviewed exact head |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 84716e5. Configure here.
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
security_idbalance_security_idto consume the full known source quantity or principal; partial transactions must materialize the exact remainder under a new security IDOpenCapTable-v34to0.0.19and commit the versioned DAROCF requirement
OCF defines cancellations, conversions, stock repurchases, and transfers as terminal transactions. A partial transaction is still terminal: the original
security_idbecomes inactive and the remaining securities must be issued underbalance_security_id.The pinned schemas expose the required remainder link for the enforced families:
ConvertibleConversionalready retires its source. Its OCF payload reports resulting units rather than converted principal, so this PR does not infer an unreported monetary remainder.Validation
npm test: 782 scripts passednpm run buildnpm run formatnpm run lint: 0 errors, 2 pre-existing warnings inscripts/remove-participant-dar.tsnpm run lint:daml: no hintsnpm run verify-packagenpm run verify-dars: 19 DARsnpm run check-upgrade-compat:0.0.18 -> 0.0.19DAR SHA-256:
1a1a8a0183b1ffef5aa873fea309468efc3f240d3560e0c54d2bfcb2d5f30edbNote
High Risk
Changes core cap-table validation for all major security lifecycle transactions; incorrect rules would reject valid OCF batches or break upgrade paths from 0.0.18.
Overview
OpenCapTable-v34 is bumped to 0.0.19 with cap-table logic that treats balance-capable cancellations, transfers, repurchases, conversions, and related non-stock reductions as OCF terminal events: the source
security_idis always retired, and any remainder must appear on a newbalance_security_id.CapTable.daml.templateno longer leaves partial reductions on the original ID whenbalance_security_idis absent. Reduction events are modeled as terminal deltas;validateStockTerminalBalanceSuccessor, convertible monetary reduction, and warrant/equity terminal validators now fail unless a no-balance transaction consumes the full live quantity/principal (or, for unknown-quantity warrants, the source is retired after a terminal event). Convertible transfer/cancellation events always use terminal priority.Tests are aligned to explicit successor chains (partial flows materialize balance issuances; post-reduction convertibles target the reduced security). New
submitMustFailscripts cover partial stock/convertible/warrant/equity transfers and cancellations without balance, editing a full cancellation into a partial without balance, and warrant unknown-quantity retirement.Testdepends on the 0.0.19 DAR; the versioned DAR anddars.lockare updated.Reviewed by Cursor Bugbot for commit 84716e5. Bugbot is set up for automated code reviews on this repo. Configure here.