Skip to content

Add native argument encoding - #5

Merged
scarmuega merged 3 commits into
mainfrom
work/work-49ad811d5507e2e7fbba8e0dc02d2c9063b3a088
Sep 25, 2026
Merged

scarmuega merged 3 commits into
mainfrom
work/work-49ad811d5507e2e7fbba8e0dc02d2c9063b3a088

Conversation

@scarmuega

Copy link
Copy Markdown
Contributor

Summary

  • add one recursive ParamType-directed native Swift argument encoder
  • preserve signed-i128 integer precision, canonical Data encoding, record/variant order, deterministic maps, and JSON passthrough
  • expose case-insensitive parameter lookup and the generated-client argTagged seam
  • copy and execute every pinned complex wire accept/reject vector

Verification

  • swift package resolve
  • swift format lint --strict --recursive Sources Tests Package.swift
  • swift build --configuration debug
  • swift test --filter Tx3SDKTests --parallel (19 tests)
  • swift build --package-path examples/consumer
  • xcodebuild -scheme tx3-swift-sdk -destination platform=iOS Simulator,name=iPhone 17 Pro,OS=26.2 test (19 unit tests; live E2E skipped by design)
  • git diff --check
  • wire-vectors.json SHA-256: 9d16d23a06a36a7ec1eb07af14f0b404b54f1438bb88692dc13ed9c078422a2b

@scarmuega

Copy link
Copy Markdown
Contributor Author

Rework verification at 7840a89:

  • Preserves native passthrough integer meaning by rejecting Int and Int64 values that cannot be represented exactly by JSONValue.number.
  • Carries full nested argument paths and expected kinds for signed-i128 range failures and passthrough conversion failures.
  • Adds regressions for a nested out-of-range BigInt and a nested Int64 above binary64 exact-integer range.

Passed locally: swift package resolve; strict recursive swift-format lint; debug build; Tx3SDKTests in parallel (20 tests); external consumer build; iPhone 17 Pro / iOS 26.2 simulator suite (20 unit tests, live credentialed E2E skipped); git diff --check. The pinned wire-vector fixture remains SHA-256 9d16d23a06a36a7ec1eb07af14f0b404b54f1438bb88692dc13ed9c078422a2b.

GitHub CI run 36150915498 passed at this exact head, including Xcode 16.4 build, formatting, unit tests, iOS 18 simulator tests, and external consumer build.

@scarmuega
scarmuega marked this pull request as ready for review September 25, 2026 15:11
@scarmuega

Copy link
Copy Markdown
Contributor Author

Ready for your review.

Plan: plans/swift-sdk-argument-encoding.md
QA-approved head: 7840a8967ac2e5b33774aaa7bf0e7a3704c3f9e1

Review this PR now. Merge it to accept; Trellis will observe the merge, integrate the domain pin, and retire the plan. Request changes to send work back through QA. Agents do not merge.

@scarmuega
scarmuega merged commit 7c1f42a into main Sep 25, 2026
1 check passed
@scarmuega
scarmuega deleted the work/work-49ad811d5507e2e7fbba8e0dc02d2c9063b3a088 branch September 25, 2026 15:24
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