Repository navigation
Document timeoutMs, fetch, debug and the client's limits in the README - #4
Conversation
The README named the optional debug callback but never described it, and said nothing about the timeoutMs and fetch options, the timeout argument to flush()/close(), how tag values are cleaned, or the TraceClient constants. A new "Options and limits" section covers them, checked against trace-client.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Self-review rubric (docs-only PR, anchored on CI run 36687986169:
Repo-specific: Judgment call, not changed: Local anchor: UNVERIFIED-not-applicable. Node is absent in the dispatch sandbox, and no file the anchor validates was modified. This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
Summary
Stage A documentation accuracy sweep. The README names the optional
debugcallback but never describes it, and leaves several user-facing behaviours oftrace-client.tsundocumented. A new "Options and limits" section is added after "Whatreportpromises". Each claim was checked against the source:timeoutMs: default 5000; anything but a positive finite number falls back to it (trace-client.ts:184-188).fetch: defaults to the globalfetch(trace-client.ts:293).debug: lines are prefixed[trace], and a throwing sink is swallowed (trace-client.ts:317-324).flush(timeoutMs)/close(timeoutMs): default to the client timeout. A negative or non-finite bound counts as0(bounded(),trace-client.ts:432-433).debugline: the in-flight cap, a serialize failure, a delivery failure or abort, and a non-2xx answer. The last two include the JSON body. Silent no-ops are a disabled or closed client and a blank or non-string name (trace-client.ts:233-262,307-309).null/undefinedvalues are dropped, other values are converted withString(), and a conversion that throws drops the report with adebugline (withVersion()/serialize()).TraceClient.TIMEOUT_MS,IN_FLIGHT_CAPACITYandMAX_VERSION_LENGTHare listed.No tracking issue: the gap was found during triage. The backlog had no open issues when this cycle started, so no issues were skipped.
Test plan
trace-client.tsand the existing tests. The fallback, tag-cleaning, negative-timeout and throwing-debug behaviours are already pinned by tests intests/trace-client.test.ts.npm ci,npm run typecheck,npm teston Node 22) is green. Local run: UNVERIFIED-not-applicable. Node is not installed in the dispatch sandbox, and no code or test file is changed.Cross-client parity / changelog
CHANGELOG.mdhas no new entry.trace-client.tsis unchanged, so a re-vendor brings nothing new. The changelog records changes to the vendored file.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson