Repository navigation
Send the event when report() is given null options - #10
Open
dmccoystephenson wants to merge 2 commits into
Open
dmccoystephenson wants to merge 2 commits into
dmccoystephenson wants to merge 2 commits into
Conversation
A null options object from untyped code threw inside the serialize try, dropping the event with a misleading "could not serialize" debug line. Treat null or any non-object options as no options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dmccoystephenson
force-pushed
the
feat/fix-null-report-options
branch
from
October 9, 2026 08:09
5cf820a to
1563ecd
Compare
Destructuring options outside the try let a throwing getter escape report(), breaking the never-throws promise. Move it back inside and pin the behavior with a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head 2844218):
Repo-specific:
Merge is held: this run is not authorized to merge, and the change touches No local verification was possible. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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.
Summary
report(name, options)now treats anull(or any non-object)optionsas "no options" before readingvalue/tags. Previously anullfrom untyped JavaScript threw aTypeErrorinside the serializetry, so the event was dropped anddebugreceived a misleadingcould not serializeline.TraceClientblock:report("startup", null | 42 | "loose")delivers{application, name, tags: {version}}three times with an empty debug log.## [Unreleased]inCHANGELOG.md.Closes #5
Cross-client parity
No cross-client-visible behavior changed: the wire format, opt-out values and
disabledReasonstrings are untouched. Whether trace-client-python and trace-client-java already send the event in their equivalent "null options/tags" case could not be checked from this session's sandbox (reads of the sibling repos were not permitted); that check is left to the reviewer, as #5 suggests. The JS fix is independently correct either way.Test plan
testjob (npm ci,npm run typecheck,npm teston Node 22) green on the PR headLocal verification was not possible:
nodeis not installed in the sandbox this PR was prepared in, so the local anchor is UNVERIFIED and CI on the exact head SHA is the anchor.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