Part of the audit remediation umbrella #67. Milestone 1. Severity: MEDIUM (doc). No behavior change.
Current SDK behavior
Commit 1f48926 changed code that docs/deviations.md and several @public TSDoc blocks
describe. The register and the shipped .d.ts now state the opposite of what the code does.
docs/deviations.md:
- Item 5 (
:164-166) quotes deserialize<T>(data, schema, typeName?) at serde.ts:145. The
real signature is deserialize<T>(data: Uint8Array, target: DecodeTarget<T>): T at :192.
The anchors serde.ts:182, json-serde.ts:236 and :242 do not point at the cited text.
- Item 17 (
:411-425) says "classify.ts's cause-walk returns retryable for any IoError".
Four of the five I/O leaves no longer extend IoError, so the claim holds for one leaf.
- The OBS-29 row (
:440) says "The 1:1 binding is NOT met" and cites the old logging-step.ts
lines. pipeline/runtime.ts:36-48,154-157 documents the binding as met.
:429 says "Four rows as of 2026-09-02" above a five-row table.
:441 says pipeline/ ships fifteen invariant( calls. Source has three.
TSDoc in the shipped .d.ts:
packages/core/src/seams/serde.ts:165-171 (Deserializer) says top-level null rejection
"cannot be conditional" and tristate(inner) is a field combinator only.
DecodeTarget.admitsNull at :128-146 says a codec MUST honor the flag.
packages/codec-json/src/json-serde.ts:267-272 (jsonSerde()) repeats the old text; line
170 honors admitsNull.
packages/core/src/context/instrumentation.ts:39-47 (tracerFactory) says it returns a
started span. Every consumer casts the result to Tracer and calls .startSpan().
packages/core/src/io/index.ts:14-16 says isIoError, AllocationLimitError,
ClosedResourceError, SourceContractViolationError "remain internal". All four are on the
barrel and in core.api.md.
packages/core/src/http/request-conditions.ts:120-122 says HTTP-18 reconciliation "is left
to a later phase". §10 item 15 decided it.
packages/core/src/seams/operation.ts:161-164 (buildRequest @throws) omits
RequestBodyNotAllowedError.
packages/core/src/body/request-body-logging.ts:75 ends mid-sentence before @internal.
packages/core/src/retry/retry-step.ts:67-73 says maxRetries admits Infinity, NaN
and fractions. request-options.ts:213 rejects all three.
packages/core/src/pagination/strategies.ts:57-58 says the template "never changes across
the walk". paginator.ts:194-198 advances it. strategy.ts:10-11 is correct.
packages/transport-conformance/src/run-suite.ts:4-5,314 claims TRANSPORT-22 coverage the
suite does not drive.
Guides in docs/sdk-documentation/:
write-a-response-handler.md:44-46: decodeSuccessResponse calls toHttpError only for
4xx/5xx, and HttpStatusError has no headers accessor.
write-a-paging-strategy.md:16-17,104-105: repeats the wrong template reading.
auth.md:10-18: does not name RequestOptions.operationAuth as the operation tier source.
Expected behavior
Every file:line anchor in docs/deviations.md points at the text it cites. Every claim in
the register matches the code at the commit that changed it. Every @public TSDoc block
describes the behavior the code has. The three guides match the shipped functions.
Notes and leads
- Do this task first. Later subtasks change some of these lines again; a clean baseline makes
those diffs reviewable.
docs/deviations.md item 17 gets its final text after subtask 11 decides the instanceof IoError question. Re-anchor now; rewrite the rationale then.
- The OBS-29 row gets its final text after subtask 13. Mark it "in progress, see #…" now.
- Per CLAUDE.md, do not write counts into prose. Delete the "four rows" and "fifteen" numbers
rather than correct them.
- After any TSDoc change:
bun run build, cd packages/<pkg> && bun run api:local, commit the
regenerated etc/*.api.md. bun run api must pass.
node .claude/skills/housekeeping/probe.mjs and check-fences.mjs after the guide edits.
- No changeset: doc-only. If the
.d.ts text is considered consumer-facing, one patch changeset
for @dexpace/core and one for @dexpace/codec-json.
Part of the audit remediation umbrella #67. Milestone 1. Severity: MEDIUM (doc). No behavior change.
Current SDK behavior
Commit
1f48926changed code thatdocs/deviations.mdand several@publicTSDoc blocksdescribe. The register and the shipped
.d.tsnow state the opposite of what the code does.docs/deviations.md::164-166) quotesdeserialize<T>(data, schema, typeName?)atserde.ts:145. Thereal signature is
deserialize<T>(data: Uint8Array, target: DecodeTarget<T>): Tat:192.The anchors
serde.ts:182,json-serde.ts:236and:242do not point at the cited text.:411-425) says "classify.ts's cause-walk returns retryable for anyIoError".Four of the five I/O leaves no longer extend
IoError, so the claim holds for one leaf.:440) says "The 1:1 binding is NOT met" and cites the oldlogging-step.tslines.
pipeline/runtime.ts:36-48,154-157documents the binding as met.:429says "Four rows as of 2026-09-02" above a five-row table.:441sayspipeline/ships fifteeninvariant(calls. Source has three.TSDoc in the shipped
.d.ts:packages/core/src/seams/serde.ts:165-171(Deserializer) says top-levelnullrejection"cannot be conditional" and
tristate(inner)is a field combinator only.DecodeTarget.admitsNullat:128-146says a codec MUST honor the flag.packages/codec-json/src/json-serde.ts:267-272(jsonSerde()) repeats the old text; line170 honors
admitsNull.packages/core/src/context/instrumentation.ts:39-47(tracerFactory) says it returns astarted span. Every consumer casts the result to
Tracerand calls.startSpan().packages/core/src/io/index.ts:14-16saysisIoError,AllocationLimitError,ClosedResourceError,SourceContractViolationError"remain internal". All four are on thebarrel and in
core.api.md.packages/core/src/http/request-conditions.ts:120-122says HTTP-18 reconciliation "is leftto a later phase". §10 item 15 decided it.
packages/core/src/seams/operation.ts:161-164(buildRequest@throws) omitsRequestBodyNotAllowedError.packages/core/src/body/request-body-logging.ts:75ends mid-sentence before@internal.packages/core/src/retry/retry-step.ts:67-73saysmaxRetriesadmitsInfinity,NaNand fractions.
request-options.ts:213rejects all three.packages/core/src/pagination/strategies.ts:57-58says the template "never changes acrossthe walk".
paginator.ts:194-198advances it.strategy.ts:10-11is correct.packages/transport-conformance/src/run-suite.ts:4-5,314claims TRANSPORT-22 coverage thesuite does not drive.
Guides in
docs/sdk-documentation/:write-a-response-handler.md:44-46:decodeSuccessResponsecallstoHttpErroronly for4xx/5xx, and
HttpStatusErrorhas no headers accessor.write-a-paging-strategy.md:16-17,104-105: repeats the wrong template reading.auth.md:10-18: does not nameRequestOptions.operationAuthas theoperationtier source.Expected behavior
Every
file:lineanchor indocs/deviations.mdpoints at the text it cites. Every claim inthe register matches the code at the commit that changed it. Every
@publicTSDoc blockdescribes the behavior the code has. The three guides match the shipped functions.
Notes and leads
those diffs reviewable.
docs/deviations.mditem 17 gets its final text after subtask 11 decides theinstanceof IoErrorquestion. Re-anchor now; rewrite the rationale then.rather than correct them.
bun run build,cd packages/<pkg> && bun run api:local, commit theregenerated
etc/*.api.md.bun run apimust pass.node .claude/skills/housekeeping/probe.mjsandcheck-fences.mjsafter the guide edits..d.tstext is considered consumer-facing, one patch changesetfor
@dexpace/coreand one for@dexpace/codec-json.