Skip to content

Add lossless typed adjustment readers#434

Draft
HardlyDifficult wants to merge 12 commits into
codex/decoder-backed-vesting-readersfrom
codex/decoder-backed-adjustment-readers
Draft

Add lossless typed adjustment readers#434
HardlyDifficult wants to merge 12 commits into
codex/decoder-backed-vesting-readersfrom
codex/decoder-backed-adjustment-readers

Conversation

@HardlyDifficult

@HardlyDifficult HardlyDifficult commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • decode issuer authorized-shares, stock-class authorized-shares, and stock-plan pool adjustment wrappers through exact generated DAML codecs with detached source/decoder/encoder ownership and strict lossless round trips
  • enforce pinned non-empty ID/subject/comment rules, nonnegative Numeric(10), exact generated Time and Optional Time shapes, context Party IDs, template identity, and unknown-field rejection
  • accept and canonicalize generated exponent-form numerics on reads while keeping OCF writers fixed-point-only
  • expose recursively readonly generated reader inputs and runtime-frozen OCF results through direct, dedicated, generic, client, and replication surfaces while retaining exact writable DAML outputs
  • add source and built declaration contracts plus table-driven semantics, malformed-ledger, aliasing, hostile-codec, and bounded-input coverage

Validation

  • npm run test:ci — 109 suites, 6,244 tests
  • npm run test:declarations
  • npm run lint
  • npm run format
  • npm pack --dry-run — 1,242 files, 573.5 kB packed / 3.2 MB unpacked
  • git diff --check

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: 6f745abf-905b-4c7b-835a-74f87c2fcf2f

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-adjustment-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-adjustment-readers

# Conflicts:
#	src/functions/OpenCapTable/issuerAuthorizedSharesAdjustment/getIssuerAuthorizedSharesAdjustmentAsOcf.ts
#	src/functions/OpenCapTable/stockClassAuthorizedSharesAdjustment/getStockClassAuthorizedSharesAdjustmentAsOcf.ts
#	src/functions/OpenCapTable/stockPlanPoolAdjustment/getStockPlanPoolAdjustmentAsOcf.ts
#	src/utils/typeConversions.ts
#	test/converters/dateBoundaryValidation.test.ts
…coder-backed-adjustment-readers

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

Copy link
Copy Markdown
Collaborator Author

Local validation is green on exact head 25e9678cfcd99612bd48c92d76221de2a3d5fe1a, after a normal merge of corrected parent PR #433 at exact SHA 5fdf56bcbd80faa4841f1846af898523a4f8f227.

Validation evidence:

  • focused administrative-adjustment matrix: 4 suites, 280/280 tests passed
  • shared/transfer/vesting regression matrix: 11 suites, 493/493 tests passed
  • npm run test:ci: 106 suites, 6,048/6,048 tests passed; coverage 90.30% statements, 82.23% branches, 90.20% functions, 90.98% lines
  • npm run test:declarations: passed, including clean build, declaration checks, exact public-config checks, built-cardinality check, and package-consumer check
  • npm run lint: passed with zero warnings
  • npm run format: passed
  • schema inventory regenerated twice with identical SHA-256 cf7a6f3176f9cb9f05a4a28fa7b3bbbbb2049a6755d75795fbae4ec56270f687 and reachable-schema fingerprint e1ac1de3030914e4d1c25872bb43f2dd4af2d0794a1d78180ad446cb2b941a56
  • corrected parent ancestry, clean diff, no unresolved files, no conflict markers, and clean worktree all verified

The only merge conflict was the expected ocfToDaml dispatcher overlap; the resolution preserves both administrative-adjustment and vesting trap-safe dispatch paths. The PR intentionally remains draft, unassigned, and without review requests while fresh remote CI runs.

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

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please perform the required formal review of exact current head 25e9678 on exact stacked base 5fdf56b. Both build-and-test and full QuickStart are green, GitHub is CLEAN/MERGEABLE, the PR is unassigned, and there are zero unresolved threads. Focus on all three administrative-adjustment writer and reader boundaries, generated wrapper and data losslessness, exact Numeric(10), canonical dates and empty text/comments, direct and dispatcher trap safety, exact object_type enforcement, and public result types. Report every current-head actionable issue before Cursor or CodeRabbit review.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please run the required formal review now for unchanged exact head 25e9678. The earlier request overlapped another active Copilot review and produced no response. All checks, including automatic Cursor Bugbot, are successful; GitHub is CLEAN/MERGEABLE with zero threads. Review all three administrative-adjustment writer/reader boundaries, generated losslessness, Numeric(10), dates and empty text/comments, trap safety, exact object_type enforcement, and public result types. Report every actionable issue.

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown

@copilot review

Please perform the required formal review of exact current head 25e9678 on exact stacked base 5fdf56b. Both build-and...

Completed formal review of head 25e9678 against stacked base 5fdf56b focusing on the requested administrative-adjustment boundaries (reader/writer payload shape enforcement, wrapper losslessness, Numeric(10), canonical dates/comments, direct + dispatcher trap safety, object_type enforcement, and public result typing). I did not find any current-head actionable issues.

Validation checked:

  • Targeted administrative-adjustment tests: 3 suites, 162/162 passed
  • npm run -s typecheck: passed
  • GitHub Actions status on stacked base and this branch: latest CI and Test OCP CN-Quickstart Integration runs for the exact reviewed SHAs are successful.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review

Please perform an explicit review of exact current head 25e9678 on base 5fdf56b. Copilot completed the required formal exact-head review with no actionable findings: #434 (comment). All checks are green, GitHub is CLEAN/MERGEABLE, and there are zero threads. Focus on the three administrative-adjustment families, trap-safe direct and dispatcher writers/readers, generated wrapper losslessness, Numeric(10), dates/text/comments, exact discriminators, and public types.

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

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown

@copilot review

Please run the required formal review now for unchanged exact head 25e9678. The earlier request overlapped another active Copilot review and produced ...

Completed formal review of exact head 25e9678 against base 5fdf56b, focusing on the three administrative-adjustment writer/reader boundaries, generated wrapper losslessness, Numeric(10), date/text/comment handling, trap safety in direct+dispatcher paths, exact object_type enforcement, and public result types.

No actionable issues found on current head.

Validation I re-ran:

  • Targeted adjustment/date suites: 4/4 passed, 280/280 tests
  • npm run -s typecheck: passed
  • GitHub Actions on both stacked base (codex/decoder-backed-vesting-readers) and this branch (codex/decoder-backed-adjustment-readers) show successful CI and Test OCP CN-Quickstart Integration runs for the reviewed SHAs.

@HardlyDifficult HardlyDifficult marked this pull request as draft July 12, 2026 07:33
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Upstream PR #433 advanced materially to fix all four exact-head CodeRabbit findings. Returning this stacked PR to draft while I propagate and validate the corrected parent, then rerun exact-head reviewer gates.

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Corrected parent #433 (f57e17aba98f688717da53e668b6ae6282c6caf0) is propagated with a normal merge at exact head 9cf559303245b69dcd80fa4c1eed194fcc8d59b0.

Validation on the integrated tree is green: 7 focused suites / 531 tests; full test:ci 106 suites / 6,049 tests; declarations/build/exact-public/cardinality/package-consumer gates; typecheck; lint; Prettier; schema inventory fingerprint; and diff checks. The PR remains draft and unassigned while fresh remote CI runs; reviewer gates will be Copilot first on this exact head.

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

Copy link
Copy Markdown
Collaborator Author

@copilot review

Please review exact current head 9cf559303245b69dcd80fa4c1eed194fcc8d59b0 on corrected stacked base f57e17aba98f688717da53e668b6ae6282c6caf0. Pre-review gate: both required checks are successful, GitHub is CLEAN/MERGEABLE, the PR is unassigned, and zero review threads are unresolved. Focus on administrative-adjustment reader/writer validation, exact Numeric/date boundaries, trap-safe direct/dispatcher paths, public declaration parity, and integration of the four corrected vesting-review findings. Report every actionable issue before Cursor and CodeRabbit.

Copilot AI commented Jul 12, 2026

Copy link
Copy Markdown

@copilot review

Please review exact current head 9cf559303245b69dcd80fa4c1eed194fcc8d59b0 on corrected stacked base f57e17aba98f688717da53e668b6ae6282c6caf0. Pre-review gate: both required checks...

Completed formal review of exact head 9cf5593 against corrected base f57e17a.

No actionable issues found.

Validation re-run:

  • Focused adjustment + vesting suites: 7/7 passed, 267/267 tests
  • npm run -s typecheck: passed
  • GitHub Actions checks for reviewed SHAs are successful on both branches:
    • base f57e17a: CI, Test OCP CN-Quickstart Integration
    • head 9cf5593: CI, Test OCP CN-Quickstart Integration

@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

@cursor review

Please review exact current head 9cf559303245b69dcd80fa4c1eed194fcc8d59b0 on corrected base f57e17aba98f688717da53e668b6ae6282c6caf0. Copilot completed its required exact-head pass with no actionable findings: #434 (comment). Both required checks are green, GitHub is CLEAN/MERGEABLE, and zero review threads are unresolved. Focus on administrative-adjustment reader/writer validation, Numeric/date boundaries, trap-safe direct/dispatcher paths, declaration parity, and the integrated vesting-review fixes.

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

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

Copy link
Copy Markdown
Collaborator Author

Returned to draft because the ordered upstream stack (#431#432#433) is advancing materially. This adjustment slice remains held until the exact updated parent chain is propagated and revalidated.

…ders' into codex/decoder-backed-adjustment-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/shared/ocfWriterValidation.ts
#	src/functions/OpenCapTable/shared/plainDataValidation.ts
#	src/utils/replicationHelpers.ts
#	test/schemaAlignment/canonicalOcfObjectInventory.json
#	test/types/capTableBatch.types.ts
@HardlyDifficult HardlyDifficult changed the title Validate adjustment reader payloads Add lossless typed adjustment readers Jul 12, 2026
@HardlyDifficult

Copy link
Copy Markdown
Collaborator Author

Restacked onto exact #433 head 5df1c78aaff8c753fbd64dbac1955a298e6fa626 and pushed the combined adjustment hardening as exact head 9dfbb4161aa6ff321fa2813d779288972bcdc5a2.

The restack preserves transfer and vesting guarantees while moving adjustment wrapper decoding onto the shared detached, lossless, frozen boundary. It also makes generated adjustment inputs readonly, carries all seven immutable entity families through generic and replication types, and uses consistent INVALID_FORMAT classification for present-but-empty comment elements.

Local exact-head validation is green: 109 suites / 6,244 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 #435 is restacked onto it.

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