Enforce OCF reference integrity - #268
Conversation
…ing' into codex/ocf-reference-integrity # Conflicts: # scripts/codegen/templates/CapTable.daml.template # scripts/codegen/templates/loops/edit-case.daml
…ing' into codex/ocf-reference-integrity # Conflicts: # scripts/codegen/generate-captable.ts
…ing' into codex/ocf-reference-integrity
|
@copilot review exact head |
|
@codex review current head |
|
cursor review current head |
|
@coderabbitai resume @coderabbitai review current head |
|
✅ Action performedReviews resumed. Review finished.
|
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 88ae4aa. Configure here.
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
|
Exact head |
Reviewed exact head |
Preliminary OCF validation-policy auditPolicy: OCF Validation Policy Important correction from the current audit: internal-reference validity is part of the OCF data model even though the official JSON Schema validator does not currently check it. Appears supported
Needs verification
Proposed next step |
Standalone exact-head data audit (read-only)Exact head Production: 86 invalid references across 3 portals:
The intended legal target class for the 85 convertibles cannot be inferred from OCF alone. No other production reference category failed. Development: 383 invalid references across 20 portals:
Representative issues requiring source/business input include missing exercise results Three development corrections have strong lossless evidence:
Assessment: the reference rules are OCF-supported, but #268 is not an early merge candidate. It exposes substantial real reference debt in both environments, including ambiguous production legal targets. Resolve or deliberately scope those data issues before exact-head replay/merge consideration. |
Summary
Standalone OCF reference-integrity enforcement on
main. This supersedes the narrower reference PRs #251, #255, and #256.UpdateCapTablevalidates references against the batch's final state after deletes, edits, issuer edits, and creates, including:related_objects, including issuer and plan-security aliasesSame-batch creation or repair remains supported. Lifecycle validation is deliberately limited to final-state existence and the correct issuance family: transfers remain within their family, while convertible conversions and warrant/equity-compensation exercises or releases resolve to stock issuances. It does not enforce quantities, amounts, dates, event ordering, or economic continuity.
This branch intentionally excludes the predecessor authorized-share, pool-ceiling, quantity-balance, and successor-continuity validators.
OCF basis
The referenced fields are defined by the pinned OCF schemas at commit
dd84bdb6bafb63681c77166f315cea5a2078a4c8, including Document.related_objects, StockIssuance references, EquityCompensationIssuance references, and the lifecycle primitives underschema/primitives/objects/transactions.Standalone state
main63736cac1530b1d643939b52d2c84194a76cafee0.0.3onlyLocal validation
npm run build✅npm run check:dar-version-policy -- --base origin/main✅npm run verify-dars✅git diff --check✅npm testcould not start locally because this Mac has no Java runtime; CI rerun and database replays remain pending.