Skip to content

docs(sdk): §16 preamble errata — five SDKs diverged (1.8.2) - #285

Merged
ilpanich merged 1 commit into
mainfrom
claude/improvements-run5-benchmark-def-bazzei
Aug 9, 2026
Merged

docs(sdk): §16 preamble errata — five SDKs diverged (1.8.2)#285
ilpanich merged 1 commit into
mainfrom
claude/improvements-run5-benchmark-def-bazzei

Conversation

@ilpanich

@ilpanich ilpanich commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Second correction to the same paragraph. The count has been wrong twice, and both times the fault was the survey method rather than the writing — so this records the method as well as the answer.

Revision Claimed Missing
1.8 two (Java, Rust) TypeScript, Go, C#
1.8.1 three (+ TypeScript) Go, C#
1.8.2 five (+ Go, C#) — verified exhaustively

Why it was wrong twice

1.8's survey grepped only parts of each repo. 1.8.1's follow-up grepped $repo/src uniformly — which silently skipped Go entirely, because its sources live at the repo root, not under src/. Neither pass looked at C# at all. A grep that finds nothing looks exactly like a repo with nothing to find, which is what made the same mistake survive a correction.

The command behind this table makes no path assumption and enumerates per-language extensions:

grep -rlniE "backoff|jitter" $repo --include="*.go" --include="*.cs" --include="*.kt" ...

I also confirmed the six negatives rather than inferring them, and checked one false positive by hand: PHP's for ($attempt = 0; $attempt < 3; $attempt++) in OidcClient.php is §9 single-flight coordination, not a §16 transport retry.

The verified table

SDK Attempts Base Cap Jitter Retry-After Wired in?
Java 3 200 ms 5 s full floor yes
C# 3 200 ms 5 s yes yes
Rust 3 library default none ignored yes
Go 3 100 ms none none ignored yes
TypeScript 3 1000 ms 8 s partial replaced the backoff no

Six had none at all: Python, Kotlin, PHP, Swift, C, C++.

Three cells are called out in the text, because each is a distinct way the clause gets got wrong:

  • TypeScript, Retry-AfterretryAfterMs ?? backoffDelayMs(attempt) lets a Retry-After: 0 retry immediately, defeating the backoff. §16.1's "floor, never a ceiling" was written on principle and turned out to describe shipped code.
  • TypeScript, "wired in" — the helper was exported and unit-tested but called by nothing. Already carried into 1.8.1 as the requirement to assert §16 through the public check_access surface.
  • Gobackoff *= 2 with no cap and no jitter is the shape this section most wants to eliminate. Uncapped, the third wait is bounded by nothing but the attempt count; unjittered, every client retries in lockstep.

A non-conformance the contract can't fix

C# exposes MaxRetryAttempts, RetryBaseDelay and RetryMaxDelay as public settable options. Its defaults match the table exactly — it is the closest of the five — but §16.1 permits only lowering the cap or disabling retry outright. A caller who can raise them turns one client into the herd the policy exists to prevent.

That is a code fix, tracked to the C# SDK's own D5 PR. Noted here so the table isn't read as "C# conforms".

Verification

scripts/check-doc-links.sh — 129 relative links resolved across 21 files. Version footer 1.8.1 → 1.8.2.

Notes


Generated by Claude Code

Second correction to the same paragraph. The count has been wrong twice, and
the reason both times was the survey method rather than the writing, so this
records the method too.

  1.8   said two  (Java, Rust)
  1.8.1 said three (+ TypeScript)
  1.8.2 says five  (+ Go, C#) — verified exhaustively

What went wrong: 1.8's survey grepped only some of each repo, and 1.8.1's
follow-up grepped `$repo/src` across the board, which silently skipped Go
entirely — its sources live at the repo root, not under src/. Neither pass
looked at C# at all. The command that produced this table walks every repo with
the right per-language file extensions and no path assumption:

  grep -rlniE "backoff|jitter" $repo --include="*.go" --include="*.cs" ...

The full table now names all five and marks the two failure modes that are not
about parameters:

  Java        3, 200 ms, 5 s, full jitter, Retry-After floor
  C#          3, 200 ms, 5 s, jitter                          <- defaults conform
  Rust        3, library-default backoff, no jitter
  Go          3, 100 ms, NO CAP, NO JITTER
  TypeScript  3, 1000 ms, 8 s, partial jitter, Retry-After REPLACING the backoff
              — and never wired into check_access at all

Go's `backoff *= 2` with no cap and no jitter is the shape §16 most wants to
eliminate: uncapped, the third wait is bounded by nothing but the attempt
count, and unjittered, every client retries in lockstep.

C# is a different kind of non-conformance and is called out separately: its
defaults match this table exactly, but MaxRetryAttempts, RetryBaseDelay and
RetryMaxDelay are public settable options. §16.1 permits lowering the cap or
disabling retry, never raising either — a caller who can raise them turns one
client into the herd the policy exists to prevent. That is a code fix for the
C# SDK, tracked to its own D5 PR, not something the contract can fix here.

Docs only, one file, plus the version footer.
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.

2 participants