Skip to content

Add lossless typed transfer readers#432

Draft
HardlyDifficult wants to merge 15 commits into
codex/lossless-daml-decodingfrom
codex/decoder-backed-transfer-readers
Draft

Add lossless typed transfer readers#432
HardlyDifficult wants to merge 15 commits into
codex/lossless-daml-decodingfrom
codex/decoder-backed-transfer-readers

Conversation

@HardlyDifficult

@HardlyDifficult HardlyDifficult commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • decode stock, convertible, equity-compensation, and warrant transfer contract wrappers exactly once through the pinned generated DAML codecs, with lossless round-trip checks and stable schema diagnostics
  • validate exact template identity, context Party IDs, required and optional fields, numeric/date/cardinality semantics, and hostile input bounds before exposing data
  • return recursively readonly, runtime-frozen transfer events while retaining exact writable input mappings for all dedicated, generic, and client reader/writer paths
  • preserve detached source, decoder, encoder, and caller ownership domains so mutations and hostile codecs cannot alter caller input or returned snapshots
  • add source and built declaration contracts plus parameterized runtime, round-trip, aliasing, malformed-ledger, and hostile-boundary coverage across all four transfer families

Validation

  • npm run test:ci — 101 suites, 5,973 tests
  • npm run test:declarations
  • npm run lint
  • npm run format
  • npm pack --dry-run — 1,230 files, 561.4 kB packed / 3.1 MB unpacked
  • git diff --check

Stack

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Transfer conversion now uses dedicated generated-codec validation, typed DAML/OCF mappings, defensive plain-data checks, template validation, and expanded runtime and compile-time tests across stock, warrant, equity-compensation, and convertible transfers.

Changes

Transfer conversion pipeline

Layer / File(s) Summary
Validation and defensive boundaries
src/functions/OpenCapTable/shared/*, src/functions/OpenCapTable/capTable/transferContractData.ts, src/functions/OpenCapTable/shared/singleContractRead.ts, src/errors/OcpNetworkError.ts
Adds strict plain-data and writer validation, transfer field helpers, generated-codec boundary checks, proxy-safe contract reads, and finite network status-code normalization.
Transfer-specific dispatch
src/functions/OpenCapTable/capTable/damlEntityData.ts, src/functions/OpenCapTable/capTable/damlToOcf.ts, src/functions/OpenCapTable/capTable/ocfToDaml.ts
Routes transfer entities through dedicated validation, extraction, decoding, and conversion paths before generic canonical JSON processing.
Typed transfer writers
src/functions/OpenCapTable/{stockTransfer,warrantTransfer,equityCompensationTransfer,convertibleTransfer}/*, src/utils/typeConversions.ts
Replaces bespoke transfer writer conversions with shared field helpers, typed DAML outputs, canonical validation, and explicit native mappings; removes the old quantity-transfer converter.
Typed transfer readers
src/functions/OpenCapTable/{stockTransfer,warrantTransfer,equityCompensationTransfer,convertibleTransfer}/damlToOcf.ts, get*AsOcf.ts
Decodes generated DAML data, validates expected templates, constructs native OCF events, and exposes transfer-family-specific result types.
Runtime and type coverage
test/converters/*, test/functions/*, test/batch/*, test/errors/*, test/{types,declarations}/*
Adds round-trip, malformed-input, adversarial-boundary, error-classification, network-error, and exact compile-time type assertions.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OCFClient
  participant TransferReader
  participant GeneratedCodec
  participant OCFEvent
  OCFClient->>TransferReader: read transfer contract
  TransferReader->>GeneratedCodec: validate and decode createArgument
  GeneratedCodec-->>TransferReader: decoded transfer_data
  TransferReader->>OCFEvent: construct native transfer event
  OCFEvent-->>OCFClient: event and contractId
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 matches the main theme of lossless, typed transfer reader work, though it omits the broader writer and validation changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/decoder-backed-transfer-readers

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

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai pause

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews paused.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Transfer hardening update pushed at 34c1bf9b5435bfb603ebafae8e4448c3fa537c5f.

Implemented:

  • Transplanted the bounded diagnostics and trap-free plain-data foundation used by the later stack.
  • Routed all four transfer direct decoders, dispatcher paths, generated wrapper decoders, and ledger readers through preflight plus generated-codec losslessness.
  • Made all four writers symmetric: exact DAML Numeric(10) limits, uppercase currency validation, unique required result arrays, schema-valid empty id and security_id, present empty optional strings, and byte-preserved comments.
  • Added 46 focused round-trip and adversarial boundary tests, including accessor/Proxy zero-invocation assertions.

Local validation on the required @fairmint/canton-node-sdk@0.0.227:

  • npm run -s clean && npm run -s build — passed
  • npm run -s test:ci — 83/83 suites and 3,638/3,638 tests passed
  • npm run -s test:declarations — passed
  • npm run -s test:exact-public-config — passed
  • npm run -s lint — passed
  • npm run -s format — passed
  • git diff --check — passed

The PR remains draft and unassigned. The attempted merge of the now-stale lower-stack head was aborted cleanly; this branch is waiting for the corrected #431 exact head before its final parent merge.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Transfer hardening update pushed at .\n\nImplemented:\n- Transplanted the bounded diagnostics and trap-free plain-data foundation used by the later stack.\n- Routed all four transfer direct decoders, dispatcher paths, generated wrapper decoders, and ledger readers through preflight plus generated-codec losslessness.\n- Made all four writers symmetric: exact DAML Numeric(10) limits, uppercase currency validation, unique required result arrays, schema-valid empty uid=501(fairnick) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),701(com.apple.sharepoint.group.1),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae) and , present empty optional strings, and byte-preserved comments.\n- Added 46 focused round-trip and adversarial boundary tests, including accessor/Proxy zero-invocation assertions.\n\nLocal validation on the required :\n- Copied OCF schemas to /Users/fairnick/Documents/code/fairmint/.worktrees/ocp-canton-sdk-transfer-readers/dist/ocf-schema — passed\n- -----------------------------------------------------------------|---------|----------|---------|---------|---------------------------------------------------------------------------------------------------------

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 85.53 76.08 84.82 85.92
src 88.68 82.09 84 88.24
OcpClient.ts 90.17 82.69 80.95 89.9 177,460,475,485-487,558,570,664,671-672
environment.ts 84.8 81.87 97.36 84.73 287,294,332,391,397,410,417,419,421,426-432,463,476,481-490,495-499,515,552,555,569,575,596,604,618,648
index.ts 100 100 12.5 100
observability.ts 100 83.33 100 100 47,80-115
src/errors 85.05 79.51 94.59 86.99
OcpContractError.ts 100 100 100 100
OcpError.ts 100 100 100 100
OcpNetworkError.ts 100 100 100 100
OcpParseError.ts 100 100 100 100
OcpValidationError.ts 100 100 100 100
codes.ts 100 100 100 100
diagnostics.ts 78.57 71.82 92 80.83 34-45,62-63,71-72,116-118,157-159,293,296-297,306-309,317,370-376,386
index.ts 100 100 100 100
src/functions 0 100 100 0
index.ts 0 100 100 0 1
src/functions/OpenCapTable 100 100 100 100
index.ts 100 100 100 100
src/functions/OpenCapTable/capTable 90.48 75.58 85.38 91.76
CapTableBatch.ts 93.1 75 100 93.61 359-369
acceptanceContractData.ts 95.23 84 100 100 65,99-109
archiveCapTable.ts 100 83.33 100 100 95-107
archiveFullCapTable.ts 87.75 64.1 100 86.95 82-89,96,103,177
batchTypes.ts 100 100 83.33 100
buildCapTableCommand.ts 100 100 100 100
cancellationContractData.ts 95 86.36 100 100 68-73,110-115,132
damlCodecLosslessness.ts 80.28 68.42 100 86.44 50,70,78,86,102,113,135,145
damlEntityData.ts 100 100 100 100
damlToOcf.ts 70.94 32 66.66 69.36 119,123-141,149-173,179,195-215,235-253
entityTypes.ts 100 100 100 100
generatedBatchOperations.ts 80 50 85.71 80 35-36,70,90,106,126,140
getCapTableState.ts 92.56 78.18 95.45 93.15 51,56,136,148,157,163,308,382,472,529
index.ts 100 100 23.8 100
ocfToDaml.ts 98.19 98.11 100 98.16 200-201
transferContractData.ts 91.11 81.03 100 96.25 151,174,191
src/functions/OpenCapTable/convertibleAcceptance 100 100 80 100
convertibleAcceptanceDataToDaml.ts 100 100 100 100
getConvertibleAcceptanceAsOcf.ts 100 100 100 100
index.ts 100 100 50 100
src/functions/OpenCapTable/convertibleCancellation 100 100 100 100
createConvertibleCancellation.ts 100 100 100 100
damlToOcf.ts 100 100 100 100
getConvertibleCancellationAsOcf.ts 100 100 100 100
index.ts 100 100 100 100
src/functions/OpenCapTable/convertibleConversion 82.05 70.83 66.66 86.11
convertibleConversionDataToDaml.ts 100 83.33 100 100 37
damlToOcf.ts 100 50 100 100 40-43
getConvertibleConversionAsOcf.ts 74.07 72.41 57.14 79.16 49-55,107,114
index.ts 100 100 100 100
src/functions/OpenCapTable/convertibleIssuance 85.27 76.63 86.95 86.88
createConvertibleIssuance.ts 97.05 100 100 97.05 53
getConvertibleIssuanceAsOcf.ts 80.85 71.59 82.35 82.75 53,106,119-122,170,190,203,207,230,267-277
index.ts 100 100 100 100
src/functions/OpenCapTable/convertibleRetraction 84.61 25 25 81.81
convertibleRetractionDataToDaml.ts 83.33 50 100 83.33 18
damlToOcf.ts 66.66 0 0 66.66 27
index.ts 100 100 0 100
src/functions/OpenCapTable/convertibleTransfer 100 100 75 100
convertibleTransferDataToDaml.ts 100 100 100 100
damlToOcf.ts 100 100 100 100
getConvertibleTransferAsOcf.ts 100 100 100 100
index.ts 100 100 0 100
src/functions/OpenCapTable/document 30.06 24.81 75 29.6
createDocument.ts 13.11 10.71 33.33 13.11 7-109,128
getDocumentAsOcf.ts 40.65 35.06 100 40 13-73,89-126,169,199-200
index.ts 100 100 100 100
src/functions/OpenCapTable/equityCompensationAcceptance 100 100 80 100
equityCompensationAcceptanceDataToDaml.ts 100 100 100 100
getEquityCompensationAcceptanceAsOcf.ts 100 100 100 100
index.ts 100 100 50 100
src/functions/OpenCapTable/equityCompensationCancellation 100 100 75 100
createEquityCompensationCancellation.ts 100 100 100 100
damlToOcf.ts 100 100 100 100
getEquityCompensationCancellationAsOcf.ts 100 100 100 100
index.ts 100 100 0 100
src/functions/OpenCapTable/equityCompensationExercise 85.18 72.72 80 85.18
createEquityCompensationExercise.ts 100 100 100 100
getEquityCompensationExerciseAsOcf.ts 80.95 72.72 100 80.95 15,21,28,33
index.ts 100 100 50 100
src/functions/OpenCapTable/equityCompensationIssuance 73.87 63.28 76.47 72.64
createEquityCompensationIssuance.ts 75 53.33 100 75 18,24-31
equityCompensationPricing.ts 93.1 94.73 100 91.66 101-102
getEquityCompensationIssuanceAsOcf.ts 63.15 58.51 33.33 63.15 71-80,93-122,146,152,158,168,173,205
index.ts 100 100 100 100
src/functions/OpenCapTable/equityCompensationRelease 92.3 50 50 90.9
damlToOcf.ts 100 50 100 100 44-45
equityCompensationReleaseDataToDaml.ts 83.33 50 100 83.33 24
index.ts 100 100 0 100
src/functions/OpenCapTable/equityCompensationRepricing 92.3 50 50 90.9
damlToOcf.ts 100 50 100 100 37
equityCompensationRepricingDataToDaml.ts 83.33 50 100 83.33 18
index.ts 100 100 0 100
src/functions/OpenCapTable/equityCompensationRetraction 84.61 25 25 81.81
damlToOcf.ts 66.66 0 0 66.66 29
equityCompensationRetractionDataToDaml.ts 83.33 50 100 83.33 18
index.ts 100 100 0 100
src/functions/OpenCapTable/equityCompensationTransfer 100 100 75 100
damlToOcf.ts 100 100 100 100
equityCompensationTransferDataToDaml.ts 100 100 100 100
getEquityCompensationTransferAsOcf.ts 100 100 100 100
index.ts 100 100 0 100
src/functions/OpenCapTable/factory 100 100 100 100
createFactory.ts 100 100 100 100
index.ts 100 100 100 100
src/functions/OpenCapTable/issuer 71.42 51.38 53.33 78.2
api.ts 66.66 100 0 66.66 11
createIssuer.ts 76 50 66.66 82.6 22-31
getIssuerAsOcf.ts 67.24 51.85 66.66 75.51 20-27,47-62,71
index.ts 100 100 0 100
src/functions/OpenCapTable/issuerAuthorization 41.66 0 50 41.66
authorizeIssuer.ts 33.33 0 100 33.33 29-94
index.ts 100 100 100 100
withdrawAuthorization.ts 50 100 0 50 12-36
src/functions/OpenCapTable/issuerAuthorizedSharesAdjustment 66.66 57.14 66.66 66.66
createIssuerAuthorizedSharesAdjustment.ts 100 100 100 100
getIssuerAuthorizedSharesAdjustmentAsOcf.ts 60 57.14 50 60 26,31,36,42,74-80
index.ts 100 100 100 100
src/functions/OpenCapTable/shared 84.7 78.29 90.81 86.11
conversionMechanisms.ts 88.42 83.78 97.77 88.59 30,73,80,87,94,106,227-231,338,386,390-392,401,405-407,411,436,553,597,696,717,731,866,921
damlNumerics.ts 68.62 54.76 60 75.55 59-64,74,81,88,95,120-122
damlText.ts 45 25 33.33 47.05 8,23-35,40-52
ocfWriterValidation.ts 59.25 48.27 63.63 59.61 7,26,34,46,54,71-92,104,118,133-140
plainDataValidation.ts 92.18 77.45 100 93.96 160,177,182,195,271,276,286
singleContractRead.ts 91.54 85.29 100 94.02 81,86,91,98
transferWriterValidation.ts 87.5 66.66 100 87.5 16,30
triggerFields.ts 100 100 100 100
src/functions/OpenCapTable/stakeholder 75 62.96 58.33 75
getStakeholderAsOcf.ts 67.56 64.7 33.33 67.56 26-67,87
index.ts 100 100 100 100
stakeholderDataToDaml.ts 92.85 60 83.33 92.85 42
src/functions/OpenCapTable/stakeholderRelationshipChangeEvent 73.01 61.76 60 75.86
damlToOcf.ts 33.33 0 0 36.36 35-58
getStakeholderRelationshipChangeEventAsOcf.ts 77.77 79.16 100 81.81 58,72,102,105,126,136
index.ts 100 100 0 100
stakeholderRelationshipChangeEventDataToDaml.ts 88.88 66.66 100 88.88 20
src/functions/OpenCapTable/stakeholderStatusChangeEvent 84.09 75.75 66.66 87.5
damlToOcf.ts 100 75 100 100 38
getStakeholderStatusChangeEventAsOcf.ts 77.77 77.77 100 84 58,61,82,91
index.ts 100 100 0 100
stakeholderStatusChangeEventDataToDaml.ts 85.71 50 100 85.71 18
src/functions/OpenCapTable/stockAcceptance 100 100 80 100
getStockAcceptanceAsOcf.ts 100 100 100 100
index.ts 100 100 50 100
stockAcceptanceDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/stockCancellation 100 100 75 100
createStockCancellation.ts 100 100 100 100
damlToOcf.ts 100 100 100 100
getStockCancellationAsOcf.ts 100 100 100 100
index.ts 100 100 0 100
src/functions/OpenCapTable/stockClass 79.16 66.25 87.5 79.16
getStockClassAsOcf.ts 74.54 65.15 75 74.54 29,35,41,48,54,61,67,77,87-96,131,167
index.ts 100 100 100 100
stockClassDataToDaml.ts 93.75 71.42 100 93.75 112
src/functions/OpenCapTable/stockClassAuthorizedSharesAdjustment 50 0 33.33 50
createStockClassAuthorizedSharesAdjustment.ts 100 100 100 100
getStockClassAuthorizedSharesAdjustmentAsOcf.ts 35.71 0 0 35.71 33-46,62-70
index.ts 100 100 100 100
src/functions/OpenCapTable/stockClassConversionRatioAdjustment 67.64 40 75 66.66
damlToStockClassConversionRatioAdjustment.ts 100 66.66 100 100 33-56
getStockClassConversionRatioAdjustmentAsOcf.ts 25 0 0 25 35-70
index.ts 100 100 100 100
stockClassConversionRatioAdjustmentDataToDaml.ts 85.71 66.66 100 84.61 19,53
src/functions/OpenCapTable/stockClassSplit 67.85 44.44 66.66 67.85
damlToStockClassSplit.ts 100 75 100 100 27-29
getStockClassSplitAsOcf.ts 25 0 0 25 29-55
index.ts 100 100 100 100
stockClassSplitDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/stockConsolidation 100 100 100 100
damlToStockConsolidation.ts 100 100 100 100
getStockConsolidationAsOcf.ts 100 100 100 100
index.ts 100 100 100 100
stockConsolidationDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/stockConversion 96.87 84.84 100 96.77
damlToOcf.ts 100 50 100 100 36-37
getStockConversionAsOcf.ts 95 88.88 100 94.73 74
index.ts 100 100 100 100
stockConversionDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/stockIssuance 88.05 76.38 66.66 87.69
createStockIssuance.ts 61.11 69.23 42.85 58.82 25,29,65-79
getStockIssuanceAsOcf.ts 97.91 77.96 87.5 97.87 22
index.ts 100 100 100 100
src/functions/OpenCapTable/stockLegendTemplate 63.63 10 66.66 63.63
createStockLegendTemplate.ts 83.33 50 100 83.33 10
getStockLegendTemplateAsOcf.ts 53.33 0 50 53.33 12-22,47-49
index.ts 100 100 100 100
src/functions/OpenCapTable/stockPlan 83.33 77.55 100 82.14
createStockPlan.ts 88.88 92.3 100 87.5 20-21
getStockPlanAsOcf.ts 80.48 72.22 100 79.48 14,18-22,46,52,59,65
index.ts 100 100 100 100
src/functions/OpenCapTable/stockPlanPoolAdjustment 77.77 60 66.66 77.77
createStockPlanPoolAdjustment.ts 100 100 100 100
getStockPlanPoolAdjustmentAsOcf.ts 71.42 60 50 71.42 59-66
index.ts 100 100 100 100
src/functions/OpenCapTable/stockPlanReturnToPool 84.61 25 25 81.81
damlToOcf.ts 66.66 0 0 66.66 29
index.ts 100 100 0 100
stockPlanReturnToPoolDataToDaml.ts 83.33 50 100 83.33 18
src/functions/OpenCapTable/stockReissuance 75 63.63 66.66 75
damlToStockReissuance.ts 100 100 100 100
getStockReissuanceAsOcf.ts 37.5 0 0 37.5 31-47
index.ts 100 100 100 100
stockReissuanceDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/stockRepurchase 60 9.09 25 58.33
damlToOcf.ts 66.66 0 0 66.66 30
getStockRepurchaseAsOcf.ts 30 0 0 30 32-53
index.ts 100 100 0 100
stockRepurchaseDataToDaml.ts 75 50 100 75 13,19
src/functions/OpenCapTable/stockRetraction 92.3 50 50 90.9
damlToOcf.ts 100 50 100 100 33
index.ts 100 100 0 100
stockRetractionDataToDaml.ts 83.33 50 100 83.33 18
src/functions/OpenCapTable/stockTransfer 100 100 75 100
createStockTransfer.ts 100 100 100 100
damlToOcf.ts 100 100 100 100
getStockTransferAsOcf.ts 100 100 100 100
index.ts 100 100 0 100
src/functions/OpenCapTable/valuation 93.54 100 100 93.54
damlToOcf.ts 100 100 100 100
getValuationAsOcf.ts 77.77 100 100 77.77 35-36
index.ts 100 100 100 100
valuationDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/vestingAcceleration 92.3 88.88 100 92.3
damlToOcf.ts 100 100 100 100
getVestingAccelerationAsOcf.ts 85.71 85.71 100 85.71 46,54
index.ts 100 100 100 100
vestingAccelerationDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/vestingEvent 92.3 88.88 100 92.3
damlToOcf.ts 100 100 100 100
getVestingEventAsOcf.ts 85.71 85.71 100 85.71 46,54
index.ts 100 100 100 100
vestingEventDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/vestingStart 92.3 88.88 100 92.3
damlToOcf.ts 100 100 100 100
getVestingStartAsOcf.ts 85.71 85.71 100 85.71 46,54
index.ts 100 100 100 100
vestingStartDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/vestingTerms 76.89 70.04 100 76.51
createVestingTerms.ts 68.05 62.12 100 68.05 23-36,116,133-139,148,163,169,177-183,202,232-233,267,291,350
getVestingTermsAsOcf.ts 68.22 61.01 100 67.61 24-37,82,101,109,120,126,134,140,160-162,173,179,193,207,211-217,226,238,245,259,280,313,319,325
index.ts 100 100 100 100
vestingQuantity.ts 98.59 95.23 100 98.55 45
src/functions/OpenCapTable/warrantAcceptance 100 100 80 100
getWarrantAcceptanceAsOcf.ts 100 100 100 100
index.ts 100 100 50 100
warrantAcceptanceDataToDaml.ts 100 100 100 100
src/functions/OpenCapTable/warrantCancellation 100 100 75 100
createWarrantCancellation.ts 100 100 100 100
damlToOcf.ts 100 100 100 100
getWarrantCancellationAsOcf.ts 100 100 100 100
index.ts 100 100 0 100
src/functions/OpenCapTable/warrantExercise 93.54 90 100 93.54
damlToOcf.ts 87.5 92.85 100 87.5 27
getWarrantExerciseAsOcf.ts 100 100 100 100
index.ts 100 100 100 100
warrantExerciseDataToDaml.ts 87.5 75 100 87.5 27
src/functions/OpenCapTable/warrantIssuance 85.04 72.94 94.59 86.13
createWarrantIssuance.ts 80 68.42 100 79.16 45,74-76,82-86,91,176-181
getWarrantIssuanceAsOcf.ts 86.5 74.24 92.3 88.23 60-61,75,107,145-150,346-348,354-362,376,388,405,415,423,475
index.ts 100 100 100 100
src/functions/OpenCapTable/warrantRetraction 84.61 25 25 81.81
damlToOcf.ts 66.66 0 0 66.66 27
index.ts 100 100 0 100
warrantRetractionDataToDaml.ts 83.33 50 100 83.33 18
src/functions/OpenCapTable/warrantTransfer 100 100 75 100
damlToOcf.ts 100 100 100 100
getWarrantTransferAsOcf.ts 100 100 100 100
index.ts 100 100 0 100
warrantTransferDataToDaml.ts 100 100 100 100
src/types 85.18 100 100 84.61
branded.ts 100 100 100 100
index.ts 0 100 100 0 1-4
src/utils 89.35 85.26 91.81 89.3
cantonOcfExtractor.ts 92.94 86.36 92.3 93.19 55,99,116-120,135-143,154,345
contractReadDiagnostics.ts 65.27 61.71 87.5 65.27 27,40-79,95,162,175-177,213,246
conversionTriggers.ts 97.26 90.62 100 98.55 183
entityValidators.ts 87.5 82.11 100 87.63 90,97,169-170,355,358,361,407,424,435,449,457,509,566,583-598,604-615,703,711-714
enumConversions.ts 100 100 100 100
factoryCoordinates.ts 100 100 100 100
index.ts 0 100 100 0 1-16
ocfComparison.ts 75.55 71.07 72.72 75.12 157-161,261-262,290-294,302,358-361,395,416,428-429,432-433,458-459,462-463,475,499,525-529,543-570
ocfHelpers.ts 88.88 82.35 37.5 87.5 116-122
ocfMetadata.ts 87.5 100 66.66 87.5 116
ocfNormalization.ts 94.41 86.14 100 94.3 50,73,82,89,153-154,160,308,316
ocfZodSchemas.ts 92.4 85.78 100 92.27 127,160,210,217,266,274,388,407,583,619,628,644-648,655,708-711
readScope.ts 100 100 100 100
replicationHelpers.ts 100 96.38 93.33 100 272,622-623
requireDefined.ts 83.33 75 100 83.33 10
templateIdentity.ts 86.04 82.14 100 85.71 37,42,49,66,76,84
transactionHelpers.ts 41.86 46.15 25 41.86 44-60,93-105,115-121,131-139
typeConversions.ts 95.26 94.63 97.22 95.26 128,197,327,340,362,421-422,439-440
typeGuards.ts 99.15 100 100 98.96 92
validation.ts 99.05 98.64 95.65 99.04 315
----------------------------------------------------------------- --------- ---------- --------- --------- --------------------------------------------------------------------------------------------------------- — 83/83 suites and 3,638/3,638 tests passed\n- — passed\n- — passed\n- — passed\n- Checking formatting...
All matched files use Prettier code style! — passed\n- — passed\n\nThe PR remains draft and unassigned. The attempted merge of the now-stale lower-stack head was aborted cleanly; this branch is waiting for the corrected #431 exact head before its final parent merge.

…coder-backed-transfer-readers

# Conflicts:
#	src/errors/OcpContractError.ts
#	src/errors/OcpError.ts
#	src/errors/OcpNetworkError.ts
#	src/errors/OcpParseError.ts
#	src/errors/OcpValidationError.ts
#	src/functions/OpenCapTable/capTable/damlEntityData.ts
#	src/functions/OpenCapTable/capTable/ocfToDaml.ts
#	src/functions/OpenCapTable/convertibleTransfer/convertibleTransferDataToDaml.ts
#	src/functions/OpenCapTable/convertibleTransfer/damlToOcf.ts
#	src/functions/OpenCapTable/convertibleTransfer/getConvertibleTransferAsOcf.ts
#	src/functions/OpenCapTable/equityCompensationTransfer/equityCompensationTransferDataToDaml.ts
#	src/functions/OpenCapTable/equityCompensationTransfer/getEquityCompensationTransferAsOcf.ts
#	src/functions/OpenCapTable/shared/singleContractRead.ts
#	src/functions/OpenCapTable/stockTransfer/createStockTransfer.ts
#	src/functions/OpenCapTable/stockTransfer/getStockTransferAsOcf.ts
#	src/functions/OpenCapTable/warrantTransfer/getWarrantTransferAsOcf.ts
#	src/functions/OpenCapTable/warrantTransfer/warrantTransferDataToDaml.ts
#	src/utils/typeConversions.ts
#	test/batch/damlToOcfDispatcher.test.ts
#	test/converters/convertibleIssuanceConverters.test.ts
#	test/converters/valuationVestingConverters.test.ts
#	test/functions/damlEntityDataLosslessness.test.ts
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Final corrected-parent merge pushed at 2991df8167dc2dc9c3ae059efd3cb8e928b8759f.

Ancestry:

Semantic conflict resolution:

  • Preserved all corrected Reject lossy generated DAML decoding #431 invariants: current-call-only generated decoder handoff, canonical frozen diagnostics, acceptance/cancellation/map/sorter/cardinality behavior, exact template and contract-ID validation, and recursive ledger JSON preflight.
  • Preserved Add lossless typed transfer readers #432 transfer behavior across direct, dispatcher, generated-wrapper, and ledger surfaces: trap-free preflight, generated-codec losslessness, exact Numeric(10), Monetary currency validation, empty schema-valid IDs/options, byte-preserved comments, and unique non-empty result arrays.
  • Combined Reject lossy generated DAML decoding #431 ledger response validation with Add lossless typed transfer readers #432 native-Promise discrimination so hostile response then accessors are never invoked.
  • Consolidated Numeric(10)/Monetary conversion on the corrected Reject lossy generated DAML decoding #431 canonical helpers; removed the duplicate Numeric module and obsolete source-unused quantityTransferToNative.
  • Added runtime network statusCode filtering so non-finite/object values cannot escape as public error fields.

Final local validation:

  • focused regression set: 6/6 suites, 246/246 tests
  • expanded affected set: 6/6 suites, 395/395 tests
  • npm run -s test:ci: 99/99 suites, 5,818/5,818 tests
  • coverage: 89.86% statements, 81.78% branches, 89.71% functions, 90.47% lines; all four transfer modules are 100%
  • npm run -s test:declarations: passed, including clean build, declarations, exact public config, built cardinality, and package-consumer checks
  • npm run -s typecheck, lint, and format: passed
  • schema inventory regeneration: 55 variants, 0 aliases, fingerprint e1ac1de3030914e4d1c25872bb43f2dd4af2d0794a1d78180ad446cb2b941a56
  • staged/unstaged git diff --check: passed

The PR remains draft and unassigned with no review requests. GitHub CI and QuickStart are queued on this exact head.

@HardlyDifficult HardlyDifficult marked this pull request as ready for review July 12, 2026 04:31
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please perform the required formal review of exact current head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f. Both build-and-test and full QuickStart are successful, GitHub reports CLEAN/MERGEABLE, the PR is unassigned, and there are zero unresolved review threads. Focus on the shared trap-free plain-data boundary, exact transfer Numeric(10)/Monetary/currency handling, lossless empty-field preservation, bounded diagnostics, and parity across direct, dispatcher, generated-wrapper, and ledger paths. Cursor and CodeRabbit will be requested only after your exact-head response.

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown

@copilot review

Please perform the required formal review of exact current head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f. Both build-and-test and full QuickStart are successful, GitHub reports CLEA...

Formal review completed on exact head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f.

No high-confidence bugs, regressions, or security issues were found in the requested areas:

  • trap-free plain-data boundary
  • transfer Numeric(10)/Monetary/currency handling
  • lossless empty-field preservation
  • bounded diagnostics
  • parity across direct/dispatcher/generated-wrapper/ledger paths

Verification performed:

  • GitHub Actions on this head: CI and QuickStart successful
  • Focused local suites: transferWriterRoundtrip, transferConverters, transferReaders all passed (180/180 tests).

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review

Please perform an explicit exact-head review of 2991df8167dc2dc9c3ae059efd3cb8e928b8759f. Copilot completed its required formal review with no actionable findings: #432 (comment). Both required checks remain successful, GitHub is CLEAN/MERGEABLE, and there are zero unresolved threads. Focus on trap-free one-read plain-data validation, generated wrapper losslessness, Numeric(10)/Monetary/currency symmetry, bounded diagnostics, and parity across direct, dispatcher, wrapper, and ledger paths.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 2991df8. Configure here.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Please run and publish the complete substantive review pipeline for exact current head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f, covering the full delta from exact stacked base 34c1bf9b5435bfb603ebafae8e4448c3fa537c5f. Copilot is exact-head clean (#432 (comment)), Cursor is exact-head clean (#432 (review)), both required checks pass, GitHub reports CLEAN/MERGEABLE, and there are zero unresolved threads. Focus on the shared trap-free plain-data foundation, generated decoder/losslessness handoff, bounded serializable diagnostics, exact transfer Numeric(10)/Monetary/currency validation, schema-valid empty-field preservation, and direct/dispatcher/wrapper/ledger parity. Report every actionable finding.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

@HardlyDifficult I'll run a full review of the current head 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.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

The adaptive included-review window shown by the prior rate-limited sticky has fully elapsed. Please now run and publish the complete substantive review pipeline for exact current head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f, covering the full PR delta from corrected stacked base 40428ed307abfb87fa8551097609390ad50bfa9a. The previous command at #432 (comment) was a rate-limited no-op and produced no analysis phases or formal review. Copilot is exact-head clean (#432 (comment)), Cursor is exact-head clean (#432 (review)), both required checks pass, GitHub reports CLEAN/MERGEABLE, and there are zero unresolved threads. Review all 34 selected files and report every actionable finding, focusing on the trap-free plain-data foundation, generated decoder/losslessness handoff, bounded diagnostics, exact transfer Numeric(10)/Monetary/currency validation, schema-valid empty-field preservation, and direct/dispatcher/wrapper/ledger parity.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

@HardlyDifficult, I've queued another review pass for the current head. A note on how this works: CodeRabbit's review system is incremental — once a specific commit SHA has been reviewed, re-issuing @coderabbitai review against that same unchanged head won't trigger a second full pass or produce new findings, since there's nothing structurally different to re-analyze. This isn't a rate-limit issue; it's by design to avoid redundant work.

If you believe the earlier pass at this head was truncated or incomplete (rather than simply "already reviewed, nothing to add"), the most reliable way to force a full fresh pass is either:

  • Push a new commit (even a trivial one, e.g., an amended commit or rebase) so there's a new head SHA to review, or
  • Use @coderabbitai full_review, which re-reviews the entire PR from scratch regardless of prior review state.

I'll trigger the full review now given the explicit request for complete pipeline coverage across all 34 files.

✅ Action performed

Full review finished.


You're currently rate limited under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. Your next review will be available in 4 seconds.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full_review

The final 2-second adaptive window shown on Run ID 85e62075-c591-4f29-a340-5f35dd512aca has elapsed. Please execute the from-scratch full review you recommended for exact unchanged head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f against corrected base 40428ed307abfb87fa8551097609390ad50bfa9a. The two prior attempts were rate-limited before any analysis phases or formal review. Review all 34 selected files and publish every actionable finding.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

@HardlyDifficult I'll trigger the full review now. To be transparent about how this works: full_review re-runs the complete analysis pipeline from scratch regardless of prior review state on this PR, so it will execute properly this time. However, since the head commit 2991df8167dc2dc9c3ae059efd3cb8e928b8759f is unchanged from when the previous full review already completed, any findings will be the same as what's already been posted on this PR — there's no new diff content for the analysis to surface additional issues from.

If you're looking for a genuinely fresh pass with updated eyes on the code, the only way to guarantee that is pushing a new commit (even a no-op rebase) to get a new head SHA.

✅ Action performed

Full review finished.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Material exact-boundary fix pushed at 654cf5aeda37ac34f8e5800ff910965c7b15dce6; the PR remains draft and unassigned while fresh CI runs.

The shared canonical writer validator no longer synthesizes a missing object_type. Every transfer direct writer and convertToDaml surface now requires the exact discriminator promised by its public TypeScript type and the OCF schema; missing values report REQUIRED_FIELD_MISSING, and wrong values report INVALID_FORMAT at the entity-specific .object_type path.

Validation on this exact revision:

  • focused transfer round-trip/safety suite: 50/50
  • full unit/coverage: 99 suites, 5,822 tests; 89.87% statements / 81.80% branches / 89.71% functions / 90.48% lines
  • source and test typechecks
  • build + source/built declarations + exact public config + built cardinality + package-consumer types
  • ESLint, Prettier, schema inventory stability (cf7a6f3176f9cb9f05a4a28fa7b3bbbbb2049a6755d75795fbae4ec56270f687), diff/conflict checks

All reviews of 2991df8, including the in-flight CodeRabbit pass, are now stale. Copilot will be requested first only after both fresh required checks pass.

@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: 4

🤖 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 `@src/functions/OpenCapTable/capTable/transferContractData.ts`:
- Around line 159-170: Update requireOwnFields so transferDecodeError receives a
decoderPath extended with the missing field, matching
validateTransferDamlDataInput’s input.${field} path construction. Keep the
existing required-own-property validation and message unchanged while ensuring
context.decoderPath identifies the specific absent field.

In `@src/functions/OpenCapTable/convertibleTransfer/damlToOcf.ts`:
- Around line 30-33: The amount conversion in convertibleTransferDataToOcf must
enforce the same nonnegative monetary invariant as
convertibleTransferDataToDaml. Replace the plain requireDecimalString validation
for decoded.amount.amount with the existing nonnegative monetary validation used
by requireMonetary, while preserving the existing currency validation and field
mapping.

In `@src/functions/OpenCapTable/shared/singleContractRead.ts`:
- Around line 217-226: Update the pendingResponse handling in the
single-contract read flow to accept only an exact native Promise before
awaiting; reject or route Promise subclasses through the unsafe-response path so
await cannot access a hostile then getter before assertSafeLedgerResponse(). Add
a regression test covering a branded Promise subclass with a hostile then
accessor.

In `@test/declarations/transferReaders.types.ts`:
- Around line 58-59: Update the negative type assertion for
wrongPublicConvertible to assign a declared PublicStockData value instead of
null, ensuring `@ts-expect-error` specifically verifies that root OcpClient
stock-transfer data is incompatible with OcfConvertibleTransfer.
🪄 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: 7ff6791e-6bb6-4f90-9af3-b1a22c71700d

📥 Commits

Reviewing files that changed from the base of the PR and between 40428ed and 2991df8.

📒 Files selected for processing (34)
  • src/errors/OcpNetworkError.ts
  • src/functions/OpenCapTable/capTable/damlEntityData.ts
  • src/functions/OpenCapTable/capTable/damlToOcf.ts
  • src/functions/OpenCapTable/capTable/ocfToDaml.ts
  • src/functions/OpenCapTable/capTable/transferContractData.ts
  • src/functions/OpenCapTable/convertibleTransfer/convertibleTransferDataToDaml.ts
  • src/functions/OpenCapTable/convertibleTransfer/damlToOcf.ts
  • src/functions/OpenCapTable/convertibleTransfer/getConvertibleTransferAsOcf.ts
  • src/functions/OpenCapTable/equityCompensationTransfer/damlToOcf.ts
  • src/functions/OpenCapTable/equityCompensationTransfer/equityCompensationTransferDataToDaml.ts
  • src/functions/OpenCapTable/equityCompensationTransfer/getEquityCompensationTransferAsOcf.ts
  • src/functions/OpenCapTable/shared/damlText.ts
  • src/functions/OpenCapTable/shared/ocfWriterValidation.ts
  • src/functions/OpenCapTable/shared/plainDataValidation.ts
  • src/functions/OpenCapTable/shared/singleContractRead.ts
  • src/functions/OpenCapTable/shared/transferWriterValidation.ts
  • src/functions/OpenCapTable/stockTransfer/createStockTransfer.ts
  • src/functions/OpenCapTable/stockTransfer/damlToOcf.ts
  • src/functions/OpenCapTable/stockTransfer/getStockTransferAsOcf.ts
  • src/functions/OpenCapTable/warrantTransfer/damlToOcf.ts
  • src/functions/OpenCapTable/warrantTransfer/getWarrantTransferAsOcf.ts
  • src/functions/OpenCapTable/warrantTransfer/warrantTransferDataToDaml.ts
  • src/utils/typeConversions.ts
  • test/batch/damlToOcfDispatcher.test.ts
  • test/converters/schemaCardinalityBoundaries.test.ts
  • test/converters/transferWriterRoundtrip.test.ts
  • test/declarations/transferConverterInputs.types.ts
  • test/declarations/transferReaders.types.ts
  • test/errors/errors.test.ts
  • test/functions/damlEntityDataLosslessness.test.ts
  • test/functions/transferReaders.test.ts
  • test/types/transferConverterInputs.types.ts
  • test/types/transferReaders.types.ts
  • test/utils/typeConversions.test.ts
💤 Files with no reviewable changes (2)
  • src/utils/typeConversions.ts
  • test/utils/typeConversions.test.ts

Comment thread src/functions/OpenCapTable/capTable/transferContractData.ts
Comment thread src/functions/OpenCapTable/convertibleTransfer/damlToOcf.ts Outdated
Comment thread src/functions/OpenCapTable/shared/singleContractRead.ts Outdated
Comment thread test/declarations/transferReaders.types.ts Outdated
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

CodeRabbit findings addressed on exact head 6f87de5d9d0a467c5fcb701b6b0c52158cfd748e.

Implemented:

  • Missing generated-wrapper own fields now report the precise field-level decoderPath.
  • Convertible-transfer reads reuse requireMonetary, preserving the nonnegative amount invariant across write and read surfaces.
  • The ledger boundary awaits only an exact, await-safe native Promise; Promise subclasses are classified before await, with a regression proving a hostile then getter is never invoked.
  • The built-declaration negative assertion now compares PublicStockData against OcfConvertibleTransfer directly.

Validation on this exact revision:

  • focused affected tests: 3/3 suites, 176/176 tests
  • npm run -s test:ci: 99/99 suites, 5,824/5,824 tests
  • coverage: 89.87% statements, 81.78% branches, 89.71% functions, 90.49% lines
  • npm run -s test:declarations: passed, including clean build, declaration checks, exact public config, built cardinality, and package-consumer types
  • npm run -s typecheck, npm run -s lint, and npm run -s format: passed
  • schema inventory: 55 variants, 0 aliases, reachable fingerprint e1ac1de3030914e4d1c25872bb43f2dd4af2d0794a1d78180ad446cb2b941a56
  • diff and conflict checks: passed

The PR remains draft and unassigned. Fresh GitHub build and QuickStart are running; all earlier automated reviews are stale.

@HardlyDifficult HardlyDifficult marked this pull request as ready for review July 12, 2026 05:38
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please perform the required formal review of exact current head 6f87de5 after the CodeRabbit follow-up fixes. Both build-and-test and the full 8m20s QuickStart run are green, GitHub is CLEAN/MERGEABLE, the PR is unassigned, and all review threads are resolved. Focus on exact native Promise handling, hostile Promise-subclass rejection without then access, field-level decoder paths, nonnegative convertible-transfer monetary symmetry, and the declaration incompatibility assertion. Report every current-head actionable issue before Cursor or another CodeRabbit review.

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown

@copilot review

Please perform the required formal review of exact current head 6f87de5 after the CodeRabbit follow-up fixes. Both build-and-test and the full 8m20s Q...

Formal review completed on exact head 6f87de5d9d0a467c5fcb701b6b0c52158cfd748e.

No actionable issues found in the requested areas:

  • exact native Promise handling and hostile Promise-subclass rejection without then access
  • field-level generated-wrapper decoderPath reporting
  • nonnegative convertible-transfer monetary symmetry
  • declaration incompatibility assertion

Verification:

  • GitHub Actions on this head: CI and Test OCP CN-Quickstart Integration are successful
  • Focused local suites passed: singleContractRead, transferReaders, transferWriterRoundtrip (176/176)
  • npm run -s test:declarations passed

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review

Please review exact current head 6f87de5 after the four CodeRabbit fixes. Copilot completed the required formal exact-head review with no actionable findings: #432 (comment). Both required checks remain green, GitHub is CLEAN/MERGEABLE, the PR is unassigned, and all threads are resolved. Focus on exact native Promise handling, hostile Promise-subclass trap safety, field-level decoder diagnostics, nonnegative transfer amount symmetry, and exact declarations.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Please run and publish the substantive incremental review for exact current head 6f87de5, covering every file changed since your prior reviewed head 2991df8. Verify the four fixes you requested: precise wrapper decoderPath, nonnegative convertible-transfer read amounts, exact-native-Promise await safety with hostile subclass regression, and the PublicStockData declaration assertion. Copilot and Cursor are exact-head clean, both required checks are green, GitHub is CLEAN/MERGEABLE, and all threads are resolved. Report every actionable finding.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

@HardlyDifficult, understood — since 6f87de5d9d0a467c5fcb701b6b0c52158cfd748e is a new head relative to the last reviewed commit, I'll run the incremental review now covering the full delta and verify the four fixes you listed (wrapper decoderPath precision, nonnegative convertible-transfer read amounts, native-Promise await safety with hostile subclass handling, and the PublicStockData/OcfConvertibleTransfer declaration assertion). Findings will be posted as normal review comments on the PR.

✅ 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.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

The full 20-minute adaptive window on Run ID 6a7fff23-3be2-45fb-aa23-4c98c94bf079 has elapsed. Please now run and publish the substantive incremental review for exact current head 6f87de5d9d0a467c5fcb701b6b0c52158cfd748e, covering the exact delta from prior reviewed head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f across all 8 selected files. The previous request was rate-limited before analysis and its acknowledgement was not a review. Verify the four fixes you requested: precise wrapper decoderPath, nonnegative convertible-transfer read amounts, exact-native-Promise await safety with hostile subclass regression, and the PublicStockData declaration assertion. Copilot and Cursor are exact-head clean, both required checks pass, GitHub is CLEAN/MERGEABLE, and all threads are resolved. Publish every actionable finding.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

@HardlyDifficult, I'll trigger the review command again as requested. To reiterate clearly: 6f87de5d9d0a467c5fcb701b6b0c52158cfd748e has already been acknowledged by CodeRabbit's review pipeline twice in this thread. The "Review finished" note isn't a rate-limit stub — it's the actual incremental-review outcome: once a specific commit SHA is fully processed, re-issuing @coderabbitai review against that same unchanged head is a no-op by design, since there is no new diff to analyze. This is not a timing/window issue that resolves after waiting a fixed period.

If a genuinely fresh, from-scratch pass over this exact head is what you need (to double check the four fixes — wrapper decoderPath, nonnegative convertible-transfer amounts, native-Promise await safety, and the PublicStockData declaration assertion), @coderabbitai full_review is the correct command, and I already ran that once earlier in this thread at head 2991df8167dc2dc9c3ae059efd3cb8e928b8759f. Running it again on 6f87de5d9d0a467c5fcb701b6b0c52158cfd748e (which has never had a full_review pass) would be the more productive next step rather than repeating review.

I'll trigger the review command once more now for completeness.

✅ 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.

@HardlyDifficult HardlyDifficult self-assigned this Jul 12, 2026
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Ready for Nick final review at exact head 6f87de5 on exact stacked base 40428ed.

Final live gate:

Assigned to @HardlyDifficult for final human review. No merge was performed because the PR has no standing thumbs-up authorization.

@HardlyDifficult HardlyDifficult marked this pull request as draft July 12, 2026 08:39
@HardlyDifficult HardlyDifficult removed their assignment Jul 12, 2026
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Returned to draft and removed the final-review assignment because direct base #431 advanced materially to exact head 855d5c1. I am propagating that audited parent now; fresh CI and Copilot-first reviewer gates are required on the resulting exact head.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Parent propagation is complete at exact head de5d089 via a normal conflict-free merge of #431 855d5c1. The transfer slice retained an identical full-index patch fingerprint, with zero overlap between parent and child files. Exact validation passes: 7 focused suites / 361 tests, full 99 suites / 5,829 tests, typecheck, lint, formatting, declarations, exact-public/cardinality, package-consumer, and package dry-run gates. Independent semantic inspection found no issue. Keeping this PR draft/unassigned until the upstream #417-derived chain reaches it and final exact-head CI/reviewer gates can restart.

…to codex/decoder-backed-transfer-readers

# Conflicts:
#	src/functions/OpenCapTable/capTable/batchTypes.ts
#	src/functions/OpenCapTable/capTable/damlEntityData.ts
#	src/functions/OpenCapTable/capTable/damlToOcf.ts
#	src/functions/OpenCapTable/capTable/entityTypes.ts
#	src/functions/OpenCapTable/capTable/ocfToDaml.ts
#	src/utils/replicationHelpers.ts
#	src/utils/typeConversions.ts
#	test/functions/damlEntityDataLosslessness.test.ts
#	test/schemaAlignment/canonicalOcfObjectInventory.json
#	test/types/capTableBatch.types.ts
@HardlyDifficult HardlyDifficult changed the title Validate transfer reader payloads Add lossless typed transfer readers Jul 12, 2026
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Restacked onto the current lossless-decoder parent and hardened exact head 1002142caa9baa73a193982cce9f9badd3687cc5.

The merge exposed and fixed a schema-diagnostic regression for explicit undefined transfer optionals: the lossless snapshot now permits source undefined long enough for the entity-aware decoder to return the stable field-specific SCHEMA_MISMATCH error. All four transfer families have regression coverage.

Local exact-head validation is green: 101 suites / 5,973 tests, declarations/build/package-consumer checks, lint, formatting, package dry-run, and diff checks. This PR remains draft and unassigned while hosted CI runs and the remaining stack is restacked in order.

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.

2 participants