Skip to content

Say the tag cap counts version, and what an untyped version or installId does - #42

Merged
dmccoystephenson merged 1 commit into
mainfrom
feat/docs-tag-cap-and-untyped-options
Nov 13, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feat/docs-tag-cap-and-untyped-options

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

Stage A documentation accuracy sweep. Three doc statements were found to say less than, or something different from, what the code does. No behavior is changed.

  • The 32-tag cap counts the client's own version tag. withInstall() receives the output of withVersion() (trace-client.ts, report()), so Object.keys(tags).length >= MAX_TAGS includes the version tag the client adds. An event passing 31 tags of its own (none of them version) therefore goes without install. The test never pushes an event past the tag cap already pins this (// 31 + version = 32: no room). The README (two places) and the MAX_TAGS doc comment said "an event that already has 32 tags", which reads as the event's own tags. They now say the count includes version.
  • A non-string version throws. The constructor checks typeof version !== "string", and the test rejects a missing, blank or overlong version at construction asserts { version: 3 } throws. The README and the version doc comment listed only missing, blank and overlong.
  • A non-string installId counts as none. The constructor treats any non-string as null, and the test treats a non-string installId as none, falling through to the file pins it. The README example comment and the installId doc comment said only "null or blank" / "missing or blank".

Files: README.md, trace-client.ts (doc comments only), CHANGELOG.md (one [Unreleased] bullet).

Test plan

  • CI test job (npm ci, npm run typecheck, npm test) green on the PR head. Local Node is unavailable in this environment, so CI is the gate.
  • Every claim checked against trace-client.ts and the named existing tests.

Cross-client parity

No cross-client-visible behavior changed: only documentation and doc comments. trace-client-python and trace-client-java need no matching change for this PR.

CHANGELOG

One [Unreleased] bullet was added, describing the clarified documentation; the version is not bumped.

Skipped issues

No tracking issue; the gap was found during the documentation sweep.

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

The 32-tag count that stops the install tag includes the version tag the
client adds, so an event passing 31 tags of its own goes without install;
the README and MAX_TAGS doc comment read as if only the event's own tags
counted. The README and TSDoc also now say a non-string version throws and
a non-string installId counts as none, as the code and tests already do.
No behavior changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (anchored on CI run 43358468590, head e5111c4):

  • Scope: PASS. Three files changed: README.md, CHANGELOG.md, and doc comments in trace-client.ts. Every hunk belongs to one of the three documented clarifications, and there is no formatting or rename churn.
  • Tests-new: PASS (n/a). No public member was added.
  • Tests-fix: PASS (n/a). No bug fix. Each newly documented behavior is already pinned by an existing test: never pushes an event past the tag cap (31 + version = 32), rejects a missing, blank or overlong version at construction ({ version: 3 } throws), and treats a non-string installId as none, falling through to the file.
  • Sibling structure: PASS. No new files. The CHANGELOG bullet follows the existing [Unreleased] "No behavior changed." doc-bullet pattern.
  • Sibling renames: PASS (n/a). Nothing was renamed.
  • Docs: PASS. The README "installation ID" and "Options and limits" sections, plus the MAX_TAGS, version and installId TSDoc, now agree with withVersion()/withInstall() and the constructor checks. The 0.4.0 CHANGELOG entry was left as history.
  • Issue resolution: PASS (n/a). No Closes; the gap was found during the Stage A sweep.
  • CI: PASS. The test job succeeded on the exact head SHA: typecheck green, # tests 82, # pass 82, # fail 0.
  • Zero-dependency: PASS. package.json is unchanged, and no imports were touched.
  • Edge gate intact: PASS. git diff origin/main -- tsconfig.json is empty, and typecheck is green.
  • Never-throws / never-rejects: PASS. No executable code changed. The only added line matching throw is the TSDoc word "throws."
  • No console: PASS. No added console. line.
  • Export surface: PASS. No added export line.
  • Version agreement: PASS. Every location still reads 0.4.1.
  • Changelog: PASS. One [Unreleased] bullet.
  • Cross-client parity noted: PASS. The PR body states no cross-client-visible change.

Observation outside the diff: the 0.4.0 CHANGELOG entry keeps its original "already has 32 tags" wording. That entry is release history, and the new [Unreleased] bullet records the clarification instead.

The PR is docs-only and anchor-green, and no do-not-auto-merge path matched.

This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 8639e03 into main Nov 13, 2026
1 check passed
@dmccoystephenson
dmccoystephenson deleted the feat/docs-tag-cap-and-untyped-options branch November 13, 2026 03:22
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