Skip to content

fix: protocol gaps and awsJson/awsQuery test coverage#33

Merged
chris-armstrong merged 2 commits into
mainfrom
fix-protocol-gaps
Jul 6, 2026
Merged

fix: protocol gaps and awsJson/awsQuery test coverage#33
chris-armstrong merged 2 commits into
mainfrom
fix-protocol-gaps

Conversation

@chris-armstrong

Copy link
Copy Markdown
Owner

Closes the remaining protocol gaps identified in TODO.md:

  • AwsQuery ResponseMetadata: responses for operations with no output members may omit the
    <ActionResult> wrapper; the runtime now tolerates that and skips the trailing
    <ResponseMetadata>.
  • smithy.api#Long: now maps to Smaws_Lib.CoreTypes.Int64.t instead of int.
  • BigInteger / BigDecimal: now backed by zarith (CoreTypes.BigInt,
    CoreTypes.BigDecimal).
  • @idempotencyToken auto-fill: optional token members are populated with a UUID when not
    supplied by the caller.
  • awsJson error-response tests: error shapes with httpResponseTests are now generated for
    awsJson too, and the runtime extracts the error name from X-Amzn-Errortype, __type, or code.

Verification: dune build + dune runtest passes (110 json tests, 75 query tests).
EOF

… awsJson error tests

Changes:
   - AwsQuery: handle ResponseMetadata-only responses with no result wrapper
   - Type codegen: smithy.api#Long -> Int64, BigInteger/BigDecimal -> zarith-backed CoreTypes
   - Auto-fill @idempotencyToken members with uuidm
   - awsJson error-response tests + header/body error-type extraction
   - Full conformance suite passes: 110 json + 75 query tests
@chris-armstrong
chris-armstrong merged commit 0b9800f into main Jul 6, 2026
3 checks passed
@chris-armstrong
chris-armstrong deleted the fix-protocol-gaps branch July 6, 2026 08:42
chris-armstrong added a commit that referenced this pull request Jul 17, 2026
Land the restXml protocol implementation plan (`refactorings/restxml-protocol.md`
+ `.todo.md`), revised after a three-agent review (plan-vs-codebase audit,
spec-conformance audit, guidelines/risk audit) against the current tree
(AwsQuery is already on main via PRs #33/#34/#35).

Key plan changes from the original draft:

- Re-baseline the current-state inventory against main (AwsQuery is
  context-based; Protocol.t dispatch exists; AwsProtocolQuery.ml is the codegen
  template; appliesTo/Float/Stack.Empty fixes present; shape count 21->23).
- Reclassify xmlNamespace `prefix` (G6b) as a blocker — the conformance model
  requires it; add service-level default namespace handling.
- Resolve Q3: httpPayload on a structure emits the structure's own root element
  as the body (not bare members). Fix httpPayload blob = raw, not base64.
- Add missing conformance-required behaviors to scope: httpResponseCode,
  idempotencyToken auto-fill, enum/intEnum, per-binding timestamp defaults,
  httpQuery/httpQueryParams precedence, greedy-label "/" non-encoding,
  empty-prefix httpPrefixHeaders + httpHeader precedence, list-valued
  httpQueryParams, null/empty handling, xmlNamespace on list/map/members,
  endpoint/hostLabel host-prefix substitution.
- State the noErrorWrapping root (<Error>) definitively; correct the false claim
  that the targeted namespaces exercise it (they use the wrapped envelope;
  noErrorWrapping is for S3, Phase 9).
- Fold the AwsQuery review failure modes into the design: skip-siblings in the
  error-envelope parse, Failure catch, separate RestXml.Error (not folded into
  the JSON-shaped AwsErrors), String.equal error dispatch, strengthened Phase
  5/6 checkpoints, full-envelope error mock.
- Ban the two requestCompression test IDs (out of scope; separate plan).
- Resolve Q1-Q6.

No restXml implementation yet; plan only.
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