fix: protocol gaps and awsJson/awsQuery test coverage#33
Merged
Conversation
… 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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the remaining protocol gaps identified in TODO.md:
<ActionResult>wrapper; the runtime now tolerates that and skips the trailing<ResponseMetadata>.smithy.api#Long: now maps toSmaws_Lib.CoreTypes.Int64.tinstead ofint.BigInteger/BigDecimal: now backed byzarith(CoreTypes.BigInt,CoreTypes.BigDecimal).@idempotencyTokenauto-fill: optional token members are populated with a UUID when notsupplied by the caller.
httpResponseTestsare now generated forawsJson too, and the runtime extracts the error name from
X-Amzn-Errortype,__type, orcode.Verification:
dune build+dune runtestpasses (110 json tests, 75 query tests).EOF