Validate conversion and exercise reader payloads#436
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…er-backed-conversion-exercise-readers
|
@coderabbitai pause |
✅ Action performedReviews paused. |
…coder-backed-conversion-exercise-readers # Conflicts: # src/functions/OpenCapTable/convertibleConversion/damlToOcf.ts # src/functions/OpenCapTable/convertibleConversion/getConvertibleConversionAsOcf.ts # src/functions/OpenCapTable/equityCompensationExercise/getEquityCompensationExerciseAsOcf.ts # src/functions/OpenCapTable/stockConversion/getStockConversionAsOcf.ts # test/converters/exerciseConversionConverters.test.ts
…coder-backed-conversion-exercise-readers
|
Completed decoder-backed conversion/exercise boundaries are pushed at independently audited exact head The SDK now has exact generated-codec readers and strict writers for convertible/stock conversion plus equity/warrant exercise; valid empty and duplicate result IDs and empty Text are preserved; Numeric(10) and calendar dates are exact; proxy/accessor/hostile-thenable traps are not invoked; direct, generic, operation, batch, OcpClient, source/dist/package types remain correlated; no Int assumptions were introduced. Final audit and validation are green: targeted 11 suites / 963 tests; full 112 suites / 7,359 tests; build/declarations/exact-public/cardinality/package-consumer; typecheck; lint; formatting; schema inventory fingerprint; ancestry/remerge/diff checks. This PR remains draft and unassigned while fresh remote CI runs; Copilot will be requested first on the exact remote head. |
|
QuickStart regression correction is pushed at exact head a801319. The stale integration test used id: empty string while expecting omission failure, but the pinned OCF schema requires the property without imposing minLength, so empty Text is valid. The test now truly omits id in all three LocalNet cases; a four-entity unit matrix separately proves omitted IDs fail with REQUIRED_FIELD_MISSING across direct, operation, generated, and batch paths while empty IDs remain lossless. Independent audit found no production cast or ancestry issue. Exact validation passes: 7 focused suites / 515 tests, full 112 suites / 7,363 tests, typecheck, lint, formatting, build, declarations, exact-public/cardinality, and package-consumer gates. Keeping the PR draft/unassigned while fresh remote CI reruns. |
|
Hardening/restack update is pushed at exact head The independently audited implementation now enforces the pinned DAML/OCF semantics across direct, generic, operation, batch, and Exact-head local validation is green: focused 10 suites / 858 tests; full and coverage 115 suites / 7,695 tests; typecheck; declarations/source+built/package consumer; lint; formatting; diff checks; canonical inventory; and package dry-run (1,262 files, 588,762 bytes). The PR remains draft and unassigned while hosted |
Summary
Numeric(10), capitalization, and bounded plain-data inputsOcpClientAPIs type- and behavior-consistentWhy
These boundaries previously relied on partial structural checks and mutable, weakly correlated inputs. Malformed numerics, missing required lists, same-wrapper cross-family contracts, and hostile object shapes could reach conversion code, while public types did not fully express the DAML invariants.
The stricter rejection behavior and stronger public types are intentionally backwards-incompatible.
Validation
npm run formatnpm run lintnpm run typechecknpm run test:declarationsnpm run test:ci— 115 suites, 7,695 tests; 90.62% statement coveragenpm pack --dry-run --json— 1,262 files; 588,762-byte packagee1ac1de3030914e4d1c25872bb43f2dd4af2d0794a1d78180ad446cb2b941a56Stack