Skip to content

Validate stock corporate action reader payloads#437

Draft
HardlyDifficult wants to merge 6 commits into
codex/decoder-backed-conversion-exercise-readersfrom
codex/decoder-backed-corporate-action-readers
Draft

Validate stock corporate action reader payloads#437
HardlyDifficult wants to merge 6 commits into
codex/decoder-backed-conversion-exercise-readersfrom
codex/decoder-backed-corporate-action-readers

Conversation

@HardlyDifficult

@HardlyDifficult HardlyDifficult commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • route stock class ratio adjustment, split, consolidation, reissuance, and repurchase reads through correlated generated DAML payload codecs and exact full-template wrappers
  • validate both context Party IDs, reject unsafe or lossy ledger JSON with bounded descriptor-first diagnostics, and return detached recursively frozen snapshots
  • pin the five DAML/OCF semantic families across readers and writers: required non-empty Text, comment elements, positive ratios and quantities, money, optionals, unique identifiers, and exact list cardinality
  • expose recursively readonly direct, generic, object-type, OcpClient, manifest, source declaration, built declaration, and package-consumer contracts
  • model OcfStockReissuance.resulting_security_ids as NonEmptyArray<string> and register that intentional SDK-only schema refinement
  • accept the exponent syntax supported by the pinned generated Numeric(10) codec on reads, canonicalize it to fixed-point OCF output, and keep OCF writers strict

Why

These five corporate-action families previously mixed raw create-argument trust, hand-written wire types, mutable public results, and incomplete DAML semantic checks. The SDK now validates the generated wrapper and payload correlation before conversion, preserves exact diagnostics and ownership boundaries, and makes invalid states unrepresentable where the protocol permits. Strict rejection is intentional and backwards-incompatible.

Validation

  • focused merged regression matrix: 13 suites / 733 tests
  • npm run test:ci: 118 suites / 7,926 tests
  • coverage: 91.02% statements, 83.09% branches, 91.53% functions, 91.90% lines
  • npm run test:declarations: clean build plus source, built, exact-public, built-cardinality, and package-consumer contracts
  • npm run typecheck
  • npm run lint
  • npm run format
  • clean-checkout npm run clean && npm run fix (hosted pre-build lint order)
  • regenerated canonical and reachable schema inventories
  • npm pack --json --dry-run: 1,270 files; 591,686-byte tarball; 3,297,955 bytes unpacked
  • merge ancestry, conflict-marker, diff, and clean-worktree checks

Stack

  • normally merged exact hosted-green Validate conversion and exercise reader payloads #436 head 755c56b51fc33931c49ca83244d0573b088536e3
  • current exact head: 206539f66ad6ec21e53ddabebb5c3e6ba6f4df74
  • remains draft and unassigned while fresh hosted checks run; reviewers have not been requested

@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: 2c63f8aa-0b65-4b5c-8d7c-f60b64d5cf29

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-corporate-action-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

Corporate-action reader hardening and final parent propagation are complete at exact head aeb3918. Exact audited #436 head a801319 is a verified ancestor. The scoped five-family implementation preserves decoder-backed contract/template validation, exact writers and public types, and inherited guardrails. Exact validation passes: full 115 suites / 7,560 tests, typecheck, lint, formatting, build, declarations, exact-public/cardinality, and package-consumer gates. Independent audit found no issue. Keeping this PR draft/unassigned while fresh remote CI reruns.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Hardening and exact-base propagation are pushed at 1f998733628bc7e0f925463f2bbf82755dfb9e5c. This is a normal merge of audited corporate-action head af6e3a0138d3fa2fdf67ce153685da1c309d3eb2 with hosted-green #436 head 755c56b51fc33931c49ca83244d0573b088536e3; there was no amend, rebase, force-push, or history rewrite.

The merged implementation preserves #436 global decoder ownership and writer refinements while adding full-wrapper validation, both Party checks, pinned semantics, SDK-only reissuance cardinality, deeply readonly/frozen results, and source/built/package type parity for all five corporate-action families.

Exact-head local validation is green: focused 13 suites / 733 tests; full coverage 118 suites / 7,926 tests; declarations/build/exact-public/cardinality/package consumer; typecheck; lint; formatting; schema inventories; package dry-run; ancestry and diff checks. Fresh hosted build-and-test and QuickStart checks are running. The PR remains draft and unassigned; no reviewer or Copilot request has been made yet.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

CI remediation pushed in 206539f66ad6ec21e53ddabebb5c3e6ba6f4df74.

The prior build-and-test failure was deterministic and isolated to the clean-checkout pre-build lint phase: before dist exists, the package-consumer self-import is temporarily any, so combining five exact-type predicates with an intersection triggered five no-redundant-type-constituents warnings. Each exactness proof is now an independent assertion, preserving the post-build contract while avoiding the transient pre-build intersection.

Fresh local evidence:

  • exact hosted order: npm run clean && npm run fix — pass, zero lint warnings
  • npm run test:declarations — pass, including built declarations and package-consumer exact-type proofs
  • npm run test:ci — 118/118 suites, 7,926/7,926 tests
  • npm run typecheck, npm run lint, npm run format — pass

The PR remains draft and unassigned. No reviewers have been requested while the fresh hosted checks run.

HardlyDifficult added a commit that referenced this pull request Jul 12, 2026
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.

1 participant