Skip to content

Enforce security quantity balance invariants#253

Draft
HardlyDifficult wants to merge 70 commits into
codex/ocf-schema-constraints-categoryfrom
codex/ocf-stock-security-balance
Draft

Enforce security quantity balance invariants#253
HardlyDifficult wants to merge 70 commits into
codex/ocf-schema-constraints-categoryfrom
codex/ocf-stock-security-balance

Conversation

@HardlyDifficult

@HardlyDifficult HardlyDifficult commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #269 as the security quantity-balance category.

This enforces non-negative quantity balances for OCF securities that carry share/unit quantities. UpdateCapTable rejects final cap-table states where a source security is reduced, replaced, or retired for more units than were issued.

  • Stock securities account for transfers, cancellations, repurchases, conversions, splits, retractions, reissuances, and consolidations.
  • Warrant securities account for known issued quantities, transfers, cancellations, exercises, full exercises, and retractions.
  • Equity-compensation securities account for issuances, transfers, cancellations, exercises, releases, and retractions.
  • Convertible monetary amount balances are intentionally left for a separate monetary-balance PR.

Review feedback carried forward in this category:

  • Replacement/terminal security events are separated from issued-share accounting so transfers, reissuances, and consolidations do not incorrectly free authorized-share headroom.
  • Terminal events now require a positive remaining source balance.
  • Partial reductions with balance_security_id retire the source security where OCF moves the remainder to the balance security.
  • Warrant and equity-compensation balance-security retirement and post-retraction reductions are covered by the shared balance validator.
  • Stock transfers with a balance successor use terminal aggregate accounting, so the original remainder is not counted alongside its replacement issuance.
  • Aggregate accounting keeps the source counted unless every explicit stock result and optional balance issuance exists, preventing incomplete successor records from freeing authorized-share headroom.
  • Stock, warrant, and equity-compensation balance timelines are indexed once per update by security or stock-class ID instead of rescanning every lifecycle map for every issuance.
  • Materialized balance successors must exist at the lifecycle event date, preserve the source security type/class, and equal the exact split-adjusted remainder.
  • Equity-compensation releases reduce award balances on the transaction date; stock-class splits adjust award capacity before later exercises.
  • A classless equity award under a single-class stock plan may materialize that plan class on its balance successor.
  • Classless equity awards under an unambiguous single-class stock plan inherit that class stock-split history for quantity-balance validation.
  • Classless equity awards under multi-class stock plans reject split-adjusted histories when no stock class can be selected unambiguously.
  • Materialized warrant transfer successors preserve the source date and economic terms; known result quantities must sum exactly to the transfer, while unknown-quantity sources may only carry unknown-quantity balance successors.
  • Fixed-amount warrant conversion outputs scale proportionally across transferred and balance successors, preserving the source conversion ratio instead of copying the full-source output onto a partial successor.
  • Inline warrant vesting amounts scale proportionally across partial successors; when source quantities are unknown, fixed conversion outputs and inline vestings are rejected because their economics cannot be proven.
  • Fixed-amount and inline-vesting successor checks preserve unknown-quantity warrants only when no quantity-scaled terms are present.
  • Referenced warrant vesting terms that contain fixed-quantity conditions must point to successor terms with every fixed amount scaled to the successor/source quantity ratio; proportional portion conditions may reuse the source terms unchanged.
  • Inline warrant vestings take precedence when both inline vestings and vesting_terms_id are present, matching OCF's documented override behavior.
  • Stock, warrant, and equity-compensation lifecycle reductions reject negative quantities before derived deltas can increase a source balance, including cancellations, repurchases, transfers, conversions, exercises, and releases.
  • Warrant transfer and cancellation tests share one issuance helper so future OCF issuance-shape changes cannot drift between duplicate fixtures.

OCF documentation

Validation

  • npm run build
  • npm test (complete suite; 596 test scripts: 594 behavioral + 2 setup)
  • npm run lint (0 errors; 2 pre-existing warnings in scripts/remove-participant-dar.ts)
  • npm run lint:daml
  • npm run format
  • npm run check:schema-gaps -- --ocf-schema-dir /tmp/open-cap-format-ocf-schema-check/schema
  • npm run verify-dars
  • npm run verify-package
  • npm run check-upgrade-compat (0.0.11 -> 0.0.12)
  • git diff --check
  • OpenCapTable-v34-0.0.12.dar: SHA-256 8bb46a77ab9697b4446a2cfbabda29ba8b40b24bec073c428155e0d62271d5fb, 3,169,059 bytes

Note

High Risk
Changes core cap-table validation for quantities, transfers, and authorized-share accounting; regressions would block legitimate updates or allow invalid cap tables. Risk is mitigated by the large new script suite and package version bump with upgrade-compat checks.

Overview
This PR ships OpenCapTable-v34 0.0.12, which rejects UpdateCapTable states where stock, warrant, or equity-compensation securities are over-reduced, over-exercised, or retired inconsistently (including balance successors, terminal events, splits, and authorized-share ceiling behavior described in the PR).

The visible diff is mostly Daml Script coverage and test refactors: new TestStockSecurityBalances and TestNonStockSecurityBalances modules, shared helpers (createWarrantIssuance, date-parameterized cancellations/splits, equityCompensationRelease), and existing transfer/cancellation/conversion tests updated so partial flows materialize successor issuances on the event date before the lifecycle transaction. Test now depends on the 0.0.12 DAR; dars.lock records the published artifact.

Reviewed by Cursor Bugbot for commit c271839. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features

    • Added comprehensive security-balance validation for stock, warrants, and equity compensation.
    • Enforced quantity, successor, retirement, lifecycle, and split-adjustment rules during cap-table updates.
    • Improved release-date handling for equity compensation events.
    • Added support for the updated package release.
  • Bug Fixes

    • Prevented stock transfers and other reductions from incorrectly lowering issued-share counts or bypassing authorized-share ceilings.
  • Tests

    • Added extensive coverage for invalid reductions, balance successors, retractions, transfers, conversions, and split-adjusted exercises.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 180529e9-18a2-4e95-8740-984ffe80dd30

📥 Commits

Reviewing files that changed from the base of the PR and between 6a70c2f and c271839.

⛔ Files ignored due to path filters (1)
  • dars/dars.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • Test/daml/OpenCapTable/TestHelpers.daml
  • Test/daml/OpenCapTable/TestNonStockSecurityBalances.daml
  • Test/daml/OpenCapTable/TestStockSecurityBalances.daml
  • Test/daml/OpenCapTable/TestWarrantCancellation.daml
  • Test/daml/OpenCapTable/TestWarrantTransfer.daml
  • dars/OpenCapTable-v34/0.0.12/OpenCapTable-v34.dar
  • scripts/codegen/templates/CapTable.daml.template
📝 Walkthrough

Walkthrough

Changes

Security Balance Validation

Layer / File(s) Summary
Event indexing and validation
scripts/codegen/templates/CapTable.daml.template
Adds indexed stock and non-stock quantity events, validates balances and terminal transitions, and checks successor quantities.
UpdateCapTable orchestration
scripts/codegen/templates/CapTable.daml.template
Runs successor, balance, share-range, and authorized-share ceiling validation using precomputed indexes.
Stock security scenarios
Test/daml/OpenCapTable/TestStockSecurityBalances.daml, Test/daml/OpenCapTable/TestStockClassAuthorizedShares.daml, Test/daml/OpenCapTable/TestStockConversion.daml, Test/daml/OpenCapTable/TestStockTransfer.daml
Adds stock reduction, retirement, successor, split, reissuance, and ceiling tests.
Warrant and equity compensation scenarios
Test/daml/OpenCapTable/TestNonStockSecurityBalances.daml, Test/daml/OpenCapTable/TestEquityCompensation*.daml, Test/daml/OpenCapTable/TestWarrant*.daml
Adds balance, lifecycle, release-date, unknown-quantity, and split-adjusted exercise tests.
Package artifacts
OpenCapTable-v34/daml.yaml, Test/daml.yaml, dars/OpenCapTable-v34/0.0.12/OpenCapTable-v34.dar
Bumps the package version, updates the test dependency, and updates the DAR pointer.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UpdateCapTable
  participant EventIndexes
  participant SecurityBalanceValidators
  participant AuthorizedShareCeilings
  UpdateCapTable->>EventIndexes: Build stock and non-stock event indexes
  UpdateCapTable->>SecurityBalanceValidators: Validate successors and balances
  SecurityBalanceValidators-->>UpdateCapTable: Return validated transitions
  UpdateCapTable->>AuthorizedShareCeilings: Validate issued-share ceilings
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: enforcing security quantity balance invariants across stock, warrant, and equity-compensation flows.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ocf-stock-security-balance

Comment @coderabbitai help to get the list of available commands.

@HardlyDifficult HardlyDifficult marked this pull request as ready for review July 9, 2026 02:40
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de4daaf240

ℹ️ 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".

Comment thread scripts/codegen/templates/CapTable.daml.template Outdated
Comment thread scripts/codegen/templates/CapTable.daml.template Outdated
Comment thread scripts/codegen/templates/CapTable.daml.template Outdated
@HardlyDifficult HardlyDifficult changed the title Enforce stock security balance invariants Enforce security quantity balance invariants Jul 9, 2026
Comment thread scripts/codegen/templates/CapTable.daml.template Outdated
Comment thread scripts/codegen/templates/CapTable.daml.template Outdated
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

CI is green on the latest head (9cfe968). @copilot review

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

CI is green on the latest head (9cfe968). @copilot review

Reviewed the latest head (9cfe968) along with current workflow runs/logs. CI and DAR checks are passing, and I did not find any additional issues requiring code changes on this PR.

@HardlyDifficult HardlyDifficult changed the base branch from codex/ocf-stock-plan-pool-ceiling-v2 to codex/ocf-schema-constraints-category July 9, 2026 13:14
@HardlyDifficult HardlyDifficult marked this pull request as draft July 9, 2026 13:14
@HardlyDifficult HardlyDifficult requested a review from Copilot July 9, 2026 13:18
@HardlyDifficult HardlyDifficult marked this pull request as ready for review July 9, 2026 13:19
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

CI is green on the latest head (0c58319). @copilot review

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@copilot review

Please review exact head 6a70c2f0dde1374a1024590d8c1539850a73a100, especially referenced fixed-quantity VestingTerms on partial warrant successors and the allowance for proportional...

Reviewed exact head 6a70c2f0dde1374a1024590d8c1539850a73a100 with focus on referenced fixed-quantity VestingTerms handling for partial warrant successors and allowance for proportional portion terms. The template now blocks partial successor reuse when fixed-quantity conditions are present, while allowing portion-based terms, and the new non-stock balance regression covers both fail/pass paths. I also rechecked Actions on codex/ocf-schema-constraints-category and codex/ocf-stock-security-balance; CI and Check DAR Integrity are green. I did not find additional issues requiring code changes.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@codex review exact head 6a70c2f0dde1374a1024590d8c1539850a73a100. Please focus on fixed-quantity referenced vesting terms versus proportional terms for partial warrant successors.

@coderabbitai resume
@coderabbitai review exact head 6a70c2f0dde1374a1024590d8c1539850a73a100

Copilot completed this exact-head review with no findings; CI is green and all review threads are clear.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review Please review exact head 6a70c2f0dde1374a1024590d8c1539850a73a100, focusing on referenced fixed-quantity VestingTerms for partial warrant successors and the proportional portion-based success path. Copilot has completed this exact revision with no findings.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 6a70c2f. Configure here.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Test/daml/OpenCapTable/TestWarrantTransfer.daml (1)

16-39: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate createWarrantIssuance helper across test files.

This function is defined identically in TestWarrantCancellation.daml (lines 15-38) and here. Both copies were edited in lockstep in this PR to add the issuanceDate parameter — a sign this duplication will keep costing maintenance effort as the underlying OCF warrant issuance schema evolves. Consider moving it to TestHelpers.daml alongside the new equityCompensationSuccessorIssuance/successor helpers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Test/daml/OpenCapTable/TestWarrantTransfer.daml` around lines 16 - 39, Move
the duplicated createWarrantIssuance helper from TestWarrantTransfer.daml and
TestWarrantCancellation.daml into TestHelpers.daml alongside the existing
successor helpers, preserving its issuanceDate parameter and implementation.
Update both test files to reuse the shared helper and remove their local
definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/codegen/templates/CapTable.daml.template`:
- Around line 605-620: Validate reduction quantities as non-negative before
passing them to stockSecurityReductionEvents or equivalent reduction-event
constructors. Apply this consistently across the transfer, cancellation,
repurchase, conversion, release, and equity-exercise paths, or enforce the same
rule centrally in both balance-event validators. Ensure negative lifecycle
quantities are rejected rather than negated into positive balance increases.

---

Outside diff comments:
In `@Test/daml/OpenCapTable/TestWarrantTransfer.daml`:
- Around line 16-39: Move the duplicated createWarrantIssuance helper from
TestWarrantTransfer.daml and TestWarrantCancellation.daml into TestHelpers.daml
alongside the existing successor helpers, preserving its issuanceDate parameter
and implementation. Update both test files to reuse the shared helper and remove
their local definitions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 482eed67-554d-4b52-a754-97631376d2b6

📥 Commits

Reviewing files that changed from the base of the PR and between 4c47c34 and 6a70c2f.

⛔ Files ignored due to path filters (1)
  • dars/dars.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • Test/daml/OpenCapTable/TestEquityCompensationCancellation.daml
  • Test/daml/OpenCapTable/TestEquityCompensationTransfer.daml
  • Test/daml/OpenCapTable/TestFinalReferenceValidation.daml
  • Test/daml/OpenCapTable/TestHelpers.daml
  • Test/daml/OpenCapTable/TestNonStockSecurityBalances.daml
  • Test/daml/OpenCapTable/TestStockClassAuthorizedShares.daml
  • Test/daml/OpenCapTable/TestStockConversion.daml
  • Test/daml/OpenCapTable/TestStockSecurityBalances.daml
  • Test/daml/OpenCapTable/TestStockTransfer.daml
  • Test/daml/OpenCapTable/TestWarrantCancellation.daml
  • Test/daml/OpenCapTable/TestWarrantTransfer.daml
  • dars/OpenCapTable-v34/0.0.12/OpenCapTable-v34.dar
  • scripts/codegen/templates/CapTable.daml.template

Comment thread scripts/codegen/templates/CapTable.daml.template
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

@HardlyDifficult I'll resume automatic reviews and review the latest changes on head 6a70c2f0dde1374a1024590d8c1539850a73a100, focusing on the referenced fixed-quantity VestingTerms for partial warrant successors and the proportional portion-based terms as requested.

✅ Action performed

Reviews resumed.


Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a70c2f0dd

ℹ️ 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".

Comment thread scripts/codegen/templates/CapTable.daml.template Outdated
Comment thread scripts/codegen/templates/CapTable.daml.template
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Addressed CodeRabbit’s outside-diff maintainability suggestion in a068d2b: the identical warrant issuance setup now lives once in TestHelpers.daml, and both transfer and cancellation suites import it. Fresh local validation passes build, focused regressions, all 591 DAML test scripts, ESLint (0 errors; 2 pre-existing warnings), DAML lint, formatting, pinned OCF schema parity (55/55), package/import verification, all 12 DAR checks, and 0.0.11 -> 0.0.12 upgrade compatibility. Refreshed DAR SHA-256: 8bb46a77ab9697b4446a2cfbabda29ba8b40b24bec073c428155e0d62271d5fb, 3,169,059 bytes. The PR remains draft pending exact-head CI.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please review exact head a068d2b58c5b2583229de2f6db08bced93a168f1, especially rejection of negative reduction quantities, scaled fixed-quantity VestingTerms for partial warrant successors, and inline-vesting precedence when both representations are present. CI is green, the branch is merge-clean, all 591 test scripts pass locally, and the thread-aware sweep has no unresolved comments.

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@copilot review

Please review exact head a068d2b58c5b2583229de2f6db08bced93a168f1, especially rejection of negative reduction quantities, scaled fixed-quantity VestingTerms for partial warrant succ...

Reviewed exact head a068d2b58c5b2583229de2f6db08bced93a168f1 with focus on (1) negative reduction quantity rejection, (2) scaled fixed-quantity VestingTerms continuity on partial warrant successors, and (3) inline-vesting precedence when both inline vestings and vesting_terms_id are present. Current logic and coverage in CapTable.daml.template and TestNonStockSecurityBalances.daml match those requirements, and I did not find additional issues requiring code changes. I also rechecked recent Actions runs for codex/ocf-schema-constraints-category and codex/ocf-stock-security-balance; CI and Check DAR Integrity are passing.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@codex review exact head a068d2b58c5b2583229de2f6db08bced93a168f1. Please focus on central negative-reduction guards, structurally scaled fixed-quantity vesting terms, and inline-vesting precedence.

@coderabbitai resume
@coderabbitai review exact head a068d2b58c5b2583229de2f6db08bced93a168f1

Copilot completed this exact-head review with no findings; CI is green and all review threads are clear.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review Please review exact head a068d2b58c5b2583229de2f6db08bced93a168f1, focusing on negative lifecycle reductions, scaled fixed-quantity VestingTerms, and inline-vesting override semantics. Copilot has completed this exact revision with no findings.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

@HardlyDifficult I'll resume automatic reviews and review the latest changes on head a068d2b58c5b2583229de2f6db08bced93a168f1, focusing on the central negative-reduction guards, structurally scaled fixed-quantity vesting terms, and inline-vesting precedence as requested.

✅ Action performed

Reviews resumed.


Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 a068d2b. Configure here.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: a068d2b58c

ℹ️ 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".

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@codex review exact head a068d2b58c5b2583229de2f6db08bced93a168f1.

Retrying because the prior acknowledged request completed without a submitted review. Please review the central negative-reduction guards, scaled fixed-quantity VestingTerms, and inline-vesting precedence. Copilot, CodeRabbit, and Cursor have all completed this exact revision with no findings; CI is green and review threads are clear.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: a068d2b58c

ℹ️ 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".

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Restacked onto the final reviewed head of #269 (e9c512bf0ab2c5772450856ccf0864938973a706).

Exact head: c271839b043ff31f55e56448644eccd4b9765e53

Fresh validation on the combined branch:

  • full DAML suite: 596 scripts (594 behavioral + 2 setup)
  • focused balance/issuance suite: 87 scripts (85 behavioral + 2 setup)
  • build, codegen/package verification, formatting, ESLint (0 errors; 2 pre-existing warnings), DAML lint, and git diff --check
  • OCF schema parity: 55/55 object-type mappings clean
  • all 12 committed DARs verified
  • upgrade compatibility: 0.0.11 -> 0.0.12
  • 0.0.12 DAR: a760b56e3a5e50224a956fba2b0abfbcc84b75233178cf471c290ceced290ffc, 3,169,473 bytes

Keeping this PR in draft until exact-head CI is green.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

CI is green and all review threads are resolved on exact head c271839b043ff31f55e56448644eccd4b9765e53. @copilot review

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

CI is green and all review threads are resolved on exact head c271839b043ff31f55e56448644eccd4b9765e53. @copilot review

Reviewed exact head c271839b043ff31f55e56448644eccd4b9765e53. I re-checked the security-balance invariant changes and did not find additional issues requiring code changes. I also verified Actions status: CI and Check DAR Integrity are green for this head on codex/ocf-stock-security-balance, and the stacked base branch codex/ocf-schema-constraints-category is green as well.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@codex review exact head c271839b043ff31f55e56448644eccd4b9765e53. Copilot completed this exact revision with no findings. Please review the combined optional-monetary validation and security quantity-balance invariants.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review Please review exact head c271839b043ff31f55e56448644eccd4b9765e53. Copilot completed this exact revision with no findings; focus on regressions introduced by the #269 restack.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review exact head c271839b043ff31f55e56448644eccd4b9765e53. Copilot completed this revision with no findings. Please perform the canonical exact-head review.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

@HardlyDifficult I'll review the changes on exact head c271839b043ff31f55e56448644eccd4b9765e53 now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 c271839. Configure here.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: c271839b04

ℹ️ 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".

Copy link
Copy Markdown
Collaborator Author

Preliminary OCF validation-policy audit

Policy: OCF Validation Policy

Appears supported

  • Core quantity integrity: a transaction cannot consume more of a security than exists.
  • Documented terminal/balance-security behavior and basic source-balance continuity.

Needs line-by-line evidence or narrowing

  • Exact scaling of warrant conversion economics and vesting terms across partial successors.
  • Class inference for classless plan securities, detailed split reconstruction, and other successor economics that may encode a Fairmint-specific model.
  • Any rejection that depends on reconstructing information OCF permits the package not to report.

Proposed next step
Preserve the smallest no-overdraw invariant, then review each economic-propagation rule against an explicit OCF source. No merge recommendation yet.

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.

3 participants