Skip to content

Test that an event's own overlong version or install tag drops it - #38

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/test-overlong-own-version-install-tag
Nov 15, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/test-overlong-own-version-install-tag

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

Stage B (unit-test expansion) cycle: two characterization tests are added for a branch that had no coverage.

An event's own version and install tags win over the program's version and the configured installation ID. No test pinned what happens when that tag is longer than MaxLength. The current behaviour is now locked in:

  • Report_AnEventsOwnVersionTagPastTheLimitDropsTheEventRatherThanFallingBack (TraceClientTest.cs): a 256-char version tag drops the event, logged as [trace] dropped startup: tag version longer than 255 characters. The program's version is not sent in its place. A 255-char tag is still sent.
  • Report_AnEventsOwnInstallTagPastTheLimitDropsTheEventRatherThanFallingBack (InstallIdTest.cs): the same for install with a configured ID.

No production code or documentation is changed. The README sentence "An event that passes its own version tag keeps it" already agrees with this behaviour.

No tracking issue — gap found during triage.

Deferred issues

All three open issues are contract changes that need a maintainer's decision, so none was picked:

Test plan

  • CI Build green on ubuntu-latest (net8.0)
  • CI Build green on windows-latest (net8.0 + net48)
  • Both new tests appear in the run (test count +2 per framework)

The local anchor could not run because no dotnet SDK is usable in the dispatch sandbox, so this is UNVERIFIED locally. The CI matrix on the PR head is the gate.

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

An event's own version and install tags win over the configured ones,
but no test covered what happens when that tag is past MaxLength. Pin
the current behaviour: the event is dropped and logged as "tag version
longer than 255 characters" (or "tag install ...") rather than sent
with the program's version or configured ID in its place, while a tag
exactly at the limit is still sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (anchored on CI run 43688172902 on the PR head):

  • Scope: PASS — only tests/TraceClient.Tests/TraceClientTest.cs and tests/TraceClient.Tests/InstallIdTest.cs are changed (+39 lines, test code only). No production, docs or project files are touched.
  • Tests-new: PASS (not applicable) — no new public member is added.
  • Tests-fix: not applicable — no bug fix. Both tests characterize current behaviour; neither changes an existing assertion.
  • Sibling structure: PASS — each test sits beside its siblings (Report_AnEventsOwnVersionTagWins... / Report_AnEventsOwnInstallTagWins), uses the Subject_Behaviour naming, the ConcurrentQueue log pattern, and Close() before asserting on _server.Received.
  • Sibling renames: not applicable — nothing is renamed.
  • Docs: PASS — README "An event that passes its own version tag keeps it" and the Report XML doc ("a string longer than MaxLength is dropped here") already describe the pinned behaviour. No row in the docs table needs a change.
  • Issue resolution: not applicable — no Closes. The gap was found during triage, and the PR body records skip reasons for A repeated tag key is sent twice and counted twice #31, Repeated events are not coalesced, unlike trace-client-java 0.7.0 #28 and Non-ASCII application name drops every report on .NET 5+ (User-Agent header) #12.
  • CI: PASS — both legs are green. The test count rose from 123 (main, run 43548013724) to 125 on net8.0 (ubuntu), net8.0 (windows) and net48 (windows), so both new tests ran on every framework.

Repo-specific: No dependencies PASS (csproj untouched); Single file PASS (src/ untouched); Vendoring floor PASS (net48 leg green); Never throws / Non-blocking / Environment seam / Version agreement / Opt-out contract are not applicable, because no production code changed.

Judgment note: the tests pin that an event's own oversize version/install tag drops the event instead of falling back to the configured value. That is a defensible current contract ("the event's own tag wins"). If the maintainer ever prefers a fallback, these tests are the place to flip, and that would be a contract change.

Local anchor: UNVERIFIED, because no usable dotnet SDK exists in the dispatch sandbox. The CI matrix on the exact head SHA served as the gate.

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


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 5829579 into main Nov 15, 2026
2 checks passed
@dmccoystephenson
dmccoystephenson deleted the feature/test-overlong-own-version-install-tag branch November 15, 2026 07:05
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