Skip to content

Validate cancellation reader payloads#430

Draft
HardlyDifficult wants to merge 25 commits into
codex/decoder-backed-acceptance-readersfrom
codex/decoder-backed-cancellation-readers
Draft

Validate cancellation reader payloads#430
HardlyDifficult wants to merge 25 commits into
codex/decoder-backed-acceptance-readersfrom
codex/decoder-backed-cancellation-readers

Conversation

@HardlyDifficult

@HardlyDifficult HardlyDifficult commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • route stock, equity-compensation, warrant, and convertible cancellation readers through exact generated wrapper decoding
  • share one trap-safe cancellation boundary across writers and readers
  • enforce the pinned DAML rules: non-empty IDs, reason text, and comments; optional non-empty balance IDs; strictly positive quantities and convertible amounts
  • require exact Monetary/currency shapes and fixed-point Numeric(10), rejecting exponent notation and unknown fields
  • reject accessors, proxies, malformed roots, and lossy generated values with stable paths and error codes
  • remove the older permissive cancellation helpers and add table-driven coverage for every cancellation family

Validation

  • focused cancellation/validation suites — 241 tests passed
  • npm run test:ci — 98 suites / 5,772 tests passed
  • npm run test:declarations
  • npm run test:package-consumer
  • npm run test:exact-public-config
  • npm run typecheck
  • npm run build
  • npm run lint
  • npm run format
  • npm pack --dry-run --json
  • CI and OCP QuickStart pass on exact head ea115cb9dc7c779e909fda1b8a2a850994683ea2

Stack

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 84a27a5d-c993-4dbb-8e89-8fa8af0dd491

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/decoder-backed-cancellation-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.

…coder-backed-cancellation-readers

# Conflicts:
#	test/converters/convertibleCancellationConverters.test.ts
…coder-backed-cancellation-readers

# Conflicts:
#	src/functions/OpenCapTable/capTable/damlEntityData.ts
#	test/batch/damlToOcfDispatcher.test.ts
#	test/validation/damlToOcfValidation.test.ts
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Replayed and hardened this draft onto verified parent #429 at exact head 91bc4195a41096d7afdd20384ed9a840dee46882. All four cancellation families now use exact generated full-template {context,cancellation_data} decode/encode losslessness with bounded safe-JSON preflight, exact family types, Numeric(10)/Monetary validation, strict optional balance-ID semantics, and dedicated/generic parity. Independent audit also found and fixed two ledger-identity gaps: CreatedEvent.contractId is now required as an own non-empty string and must equal the requested ID across the shared reader boundary, and cancellation context.issuer / context.system_operator must be valid non-empty parties. Final local validation is green: 90 suites / 4,737 tests, build, declarations, exact public config, lint, and formatting; independent final audit found no blocking issues. This PR remains draft and unassigned pending fresh exact-head CI and Copilot-first review.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Stack refresh complete at exact head d8cfb3a7f84edc4720a2198f39c918aca6975150, incorporating parent #429 at e4d751ae4e5430f5dcd73f564632029477aa05c5. Full endpoint validation passed on @fairmint/canton-node-sdk@0.0.227: build, declaration checks, exact public config, source typecheck, ESLint, Prettier, and full Jest coverage (91 suites / 4,795 tests). The PR remains draft and unassigned while CI runs.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Final parent-fix propagation complete at exact head 1abca30, incorporating #429 at 144d784. Full endpoint validation passed on canton-node-sdk 0.0.227: build, declaration checks, exact public config, explicit source typecheck, ESLint, Prettier, and full Jest coverage (91 suites / 4,802 tests). Both structured nested write-record guards are present through the canonical strict architecture. The PR remains draft and unassigned while CI runs.

@HardlyDifficult HardlyDifficult marked this pull request as ready for review July 11, 2026 21:16
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please review exact head 1abca30c79408eb14f57263d50669b934d00beae. This is the final propagated cancellation-reader candidate. Exact-head build-and-test and full QuickStart are successful, the branch is CLEAN/MERGEABLE, and the live unresolved-thread count is zero. Copilot is the first fresh reviewer after the material parent propagation.

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown

@copilot review

Please review exact head 1abca30c79408eb14f57263d50669b934d00beae. This is the final propagated cancellation-reader candidate. Exact-head build-and-test and full QuickStart are succ...

Reviewed exact head 1abca30c79408eb14f57263d50669b934d00beae. No additional code changes are needed from my side. Latest completed CI and QuickStart runs for this exact head are passing, with only the current dynamic review run still in progress.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review

Please review exact head 1abca30c79408eb14f57263d50669b934d00beae. Copilot completed an explicit exact-head no-changes-needed review: #430 (comment). Exact-head build-and-test and full QuickStart are green, the branch is CLEAN/MERGEABLE, and the unresolved-thread count is zero.

@HardlyDifficult HardlyDifficult marked this pull request as draft July 11, 2026 21:24
…readers' into codex/decoder-backed-cancellation-readers
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Propagated the corrected #426#429 ancestry into this decoder-backed cancellation endpoint at exact head 206699f.

Ancestry: #429 head 0ac7532 and #426 fix d999c29 are ancestors of this head.

Endpoint validation on @fairmint/canton-node-sdk 0.0.227:

  • focused transaction ordering: 72/72
  • typecheck passed
  • build passed
  • built declaration checks passed
  • exact public config checks passed
  • lint and format passed
  • test:ci passed
  • git diff --check passed

The merge was conflict-free. This PR remains draft and unassigned; no reviewer was requested.

@HardlyDifficult HardlyDifficult marked this pull request as ready for review July 11, 2026 21:46
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please review exact head 206699f44b28de1127a1c85d724e79b9b058d595. Copilot is the first requested reviewer for this material revision. The base is current #429 at 0ac75324ca7c6c37c60c7d4c4d0e74a532dc62e7; exact-head build-and-test and full QuickStart are SUCCESS, GitHub reports CLEAN/MERGEABLE, the PR is unassigned, and there are zero unresolved review threads.

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown

@copilot review

Please review exact head 206699f44b28de1127a1c85d724e79b9b058d595. Copilot is the first requested reviewer for this material revision. The base is current #429 at `0ac75324ca7c6c37c...

Reviewed exact head 206699f44b28de1127a1c85d724e79b9b058d595. I don’t see additional code changes needed from my side. The latest completed CI and Test OCP CN-Quickstart Integration runs for this exact head are successful; only the current dynamic review run is still in progress.

@HardlyDifficult HardlyDifficult marked this pull request as draft July 11, 2026 21:47
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Propagated exact #429 head a03c3817b6c3afb2d60ce2339779683be2c8acb8 with a normal merge commit. New exact #430 head: 3558b0159dda80ed48696ecc493f2f1446a104af.

The decoder-backed cancellation-reader delta is unchanged (stable patch ID fd331ff7). Validation on @fairmint/canton-node-sdk@0.0.227 is fully green: build; declarations; exact public config; source typecheck; lint; formatting; 85 focused sorting tests; and test:ci with 91 suites / 4,816 tests. PR remains draft/unassigned; no reviewer requested.

…readers' into codex/decoder-backed-cancellation-readers
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Propagated exact #429 head 63f009f with a normal merge commit. New exact #430 head: bbae333.

The decoder-backed cancellation-reader delta is unchanged (stable patch ID fd331ff7). Validation on @fairmint/canton-node-sdk@0.0.227 is fully green: acceptance readers 85/85; cancellation endpoint matrix 124/124; build; declarations; exact public config; source typecheck; lint; formatting; and test:ci with 91 suites / 4,816 tests. PR remains draft/unassigned; no reviewer requested.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Material parent propagation complete at exact head 2c33641, incorporating #429 at 2ad6848. Full endpoint validation passed on canton-node-sdk 0.0.227: build, declarations, exact public config, explicit typecheck, ESLint, Prettier, focused graph/relationship/sorter matrix (7 suites / 518 tests), and full test:ci (91 suites / 4,828 tests). The dependency-aware sorter and single-invocation acceptance test fixes remain preserved. The PR remains draft and unassigned while CI runs.

…coder-backed-cancellation-readers

# Conflicts:
#	src/functions/OpenCapTable/capTable/damlEntityData.ts
#	src/functions/OpenCapTable/shared/singleContractRead.ts
#	test/batch/damlToOcfDispatcher.test.ts
#	test/client/OcpClient.test.ts
#	test/converters/exerciseConversionConverters.test.ts
#	test/converters/genericConversionReadBoundaries.test.ts
#	test/converters/stockClassAdjustmentConverters.test.ts
#	test/converters/valuationVestingConverters.test.ts
#	test/functions/generatedDamlReaderValidation.test.ts
#	test/validation/damlToOcfValidation.test.ts
#	test/validation/generatedDamlBoundary.test.ts
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Corrected parent stack propagated through PR #430 at exact head c8ba151. All four cancellation families retain correlated full-wrapper decoding, generated-template enforcement, returned ledger contract IDs, exactly one fetch, and strict malformed/missing/mismatched contract-ID rejection. Shared fixtures now use the corrected parent’s real canton-node-sdk client pattern, and cancellation diagnostics were aligned to the stronger common read boundary. The resolved package remains on @fairmint/canton-node-sdk 0.0.227.

Local validation: focused cancellation/converter/dispatcher/single-contract/generated-reader/client suite 7 suites / 606 tests; full coverage suite 96 suites / 5,648 tests; clean build and declaration checks; exact public-config checks; built cardinality; package-consumer declarations; TypeScript; ESLint; Prettier; diff checks; canonical inventory 55 variants / 0 ingestion aliases (56 reachable objects, 160 resources). The worktree is clean and local/remote heads match. PR remains draft, unassigned, with no review requests while fresh CI runs.

@HardlyDifficult HardlyDifficult marked this pull request as ready for review July 12, 2026 07:29
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please review exact current head c8ba1517b118dd46a1c34b75013278acc1a8b5e2. Pre-review gate: both required checks are successful, GitHub is CLEAN/MERGEABLE, the PR is unassigned, and zero review threads are unresolved. Focus on cancellation readers, exact payload/discriminator validation, trap-safe direct and dispatcher paths, and declaration parity. Report every actionable current-head issue before the other reviewers.

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown

@copilot review

Please review exact current head c8ba1517b118dd46a1c34b75013278acc1a8b5e2. Pre-review gate: both required checks are successful, GitHub is CLEAN/MERGEABLE, the PR is unassigned, and...

Reviewed exact head c8ba1517b118dd46a1c34b75013278acc1a8b5e2. I don’t see actionable current-head issues in the cancellation reader/discriminator validation paths or declaration parity. Current-head required checks (CI and Test OCP CN-Quickstart Integration) are successful; only the dynamic review workflow is still in progress.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review

Please review exact current head c8ba1517b118dd46a1c34b75013278acc1a8b5e2. Copilot completed its required exact-head pass with no actionable findings: #430 (comment). Both required checks are green, GitHub is CLEAN/MERGEABLE, and zero review threads are unresolved. Focus on cancellation readers, exact payload/discriminator validation, trap-safe direct and dispatcher paths, and declaration parity.

@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 c8ba151. Configure here.

@HardlyDifficult HardlyDifficult marked this pull request as draft July 12, 2026 08:30
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Parent propagation is complete at exact head 4647d3d via a normal conflict-free merge of #429 0f8d00b. The non-overlapping parent and child layers remain byte-identical. Validation passes: 15 focused suites / 1,189 tests, full 96 suites / 5,653 tests, typecheck, lint, formatting, declarations, exact-public/cardinality, and package-consumer gates. Independent semantic inspection found no issue. Keeping this PR in draft until fresh remote CI is green.

…readers' into codex/decoder-backed-cancellation-readers

# Conflicts:
#	src/functions/OpenCapTable/capTable/damlEntityData.ts
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Pinned-DAML remediation and the refreshed #429 parent are pushed at exact head ea115cb9dc7c779e909fda1b8a2a850994683ea2. Full validation passes: 98 suites / 5,772 tests, 241 focused cancellation tests, declarations, build, package-consumer, exact-public-config, lint, formatting, and package dry-run. Hosted CI and OCP QuickStart are running.

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