Repository navigation
Test that a blank InstallId file path means no installation ID - #34
Merged
Merged
Conversation
InstallId::file documents "Blank means none", and the constructor skips installIdFromFile for a blank path, but nothing asserted it. Without that check a blank path would make up an in-memory ID and a whitespace-only path would write a file of that name into the working directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (scored against the diff and CI run 43795307253):
Finding, not blocking: 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
aBlankInstallIdFileMeansNone. It checks thatInstallId::fromFile("")andInstallId::fromFile(" \t ")on an enabled client make up no ID (installId()is empty), send noinstalltag, and write no file named by the whitespace into the working directory.InstallId::file("Blank means none",trace_client.hpp:930) and enforced by theisBlank(install.file)check ininit(trace_client.hpp:1171), but no test asserted it. The existing blank-ID test covers onlyInstallId::of(" \t "), andinstallIdFromFile("")is tested only as a direct call, where it returns a fresh in-memory UUID.Triage notes
README.md, the header comments,Makefile,CMakeLists.txtand.github/workflows/build.ymlagainst the source. No untracked drift was found. One README claim is false at the 32-tag cap: "tagsalways holds at leastversion". That is already tracked in The version tag is dropped when an event's own tags fill the 32-tag cap #21 and is waiting on an owner decision, so it was left alone.TRACE_CLIENT_CURLignored on Windows) was skipped: it needs an owner decision, and it touches thecurl.exelookup, which is on the do-not-auto-merge list. A deferral comment is already on the issue.No tracking issue: the gap was found during triage.
Test plan
make test(g++, C++11,-Wall -Wextra -pedantic -Werror) passed locally with77 tests, 0 failed checks. That is up from 76, and the new test is registered intests[].isBlank(install.file)guard replaced bytrue, the new test failed in four ways.installId()was non-empty, aninstalltag was sent, and a file named" \t "appeared in the working directory. With the header restored, the test passes.linux(g++/clang++ × c++11/17/20),linux-libcurl,linux-sanitizers,macos,windows. clang++ is not installed locally, so the clang legs are covered only by CI.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