Skip to content

Combine TS fixes from PR #35 and apply Python fixes from PR #37#38

Closed
GsCommand wants to merge 1 commit intomainfrom
codex/combine-pr-#35-and-apply-python-fixes-from-pr-#37
Closed

Combine TS fixes from PR #35 and apply Python fixes from PR #37#38
GsCommand wants to merge 1 commit intomainfrom
codex/combine-pr-#35-and-apply-python-fixes-from-pr-#37

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Bring together the TypeScript contract and request-envelope fixes with the Python behavioral fixes so both SDKs are parity-aligned for Commons v1.1.0 semantics.
  • Ensure commons requests omit legacy x402 while commercial requests include the legacy field where required.
  • Fix Python verification/verb-extraction behavior and restore linting/type/test green state.

Description

  • Kept TypeScript fixes from PR Node 20 template-tests discovery + preserve PR#33 receipt/parity fixes #35 in typescript-sdk/src/index.ts including ReceiptProtocolMetadata, making buildCommonsRequest omit x402, making commercial payloads include x402, and adding canonical verb handling.
  • Preserved Node 20 template-test expectations and updated typescript-sdk/scripts/unit-tests.mjs to assert the current Commons payload shape.
  • Applied the Python fixes from PR Fix Python receipt and verb extraction regressions (PR #36) #37: updated build_commons_request to omit x402 and build_commercial_request to include x402 in python-sdk/commandlayer/client.py, made verify_receipt return ok=True for the valid fixture (removed receipt_id_matches dependency) and added receipt_id_present to checks, and enhanced extract_receipt_verb to prefer top-level verb, fall back to x402.verb, and finally fall back to summarize for legacy success-with-summary fixtures in python-sdk/commandlayer/verify.py.
  • Fixed typing/exports for Python (types.py, __init__.py) and updated tests to reflect the new contract semantics (python-sdk/tests/*).

Testing

  • Ran cd typescript-sdk && npm run typecheck && npm run build && npm run test:unit and all TypeScript checks and unit/template tests passed.
  • Ran cd python-sdk && python -m ruff check . && python -m mypy commandlayer && python -m pytest tests/ -v and ruff, mypy, and pytest all passed (26 tests).
  • Ran cross-SDK parity node scripts/parity-check.mjs and the parity report passed with TypeScript and Python verification semantics aligned.

Codex Task

@GsCommand GsCommand closed this Apr 24, 2026
@GsCommand GsCommand deleted the codex/combine-pr-#35-and-apply-python-fixes-from-pr-#37 branch April 24, 2026 02:57
GsCommand added a commit that referenced this pull request Apr 24, 2026
…r-#38

Reapply PR #38 TypeScript/Python parity fixes and add PR #39 template-suite discovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant