Repository navigation
Test pathKind and makeParentDirectories directly - #20
Merged
Merged
Conversation
Both were used only as fixtures for the installation-ID tests, so nothing asserted that pathKind ever answers PATH_FILE, that a path under a regular file counts as missing, or that makeParentDirectories creates every ancestor but not the leaf, leaves existing directories alone and ignores a failure without touching the file in the way. On Windows the backslash separator is exercised too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (anchored on CI run 40806194179, all 11 jobs green on the PR head):
One judgment call worth noting: Summary: test-only characterization of two filesystem helpers. Each new test was shown able to fail. No production change. This review comment 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
Stage B — unit-test expansion (
trace_client::detailfilesystem helpers). Test-only; no production code is changed.pathKindTellsAMissingPathFromAFileFromAnythingElse:detail::pathKindis asserted to answerPATH_MISSINGfor an absent path and for a path below a regular file,PATH_FILEfor a regular file, andPATH_OTHERfor a directory. Before this,PATH_FILEwas never asserted anywhere in the suite.makeParentDirectoriesCreatesEveryAncestorButNotThePathItself:detail::makeParentDirectoriesis asserted to create every missing ancestor but not the leaf, to leave existing directories alone, to treat a trailing separator as making the last component a parent, and to ignore a failure under a regular file without touching that file. Under_WIN32, the backslash separator is also exercised (built only by thewindowsjob).Both helpers were previously used only as fixtures by the installation-ID tests, so their own documented behavior had no direct assertion.
No tracking issue — gap found during triage.
Test plan
make test(g++, C++11,-Wall -Wextra -pedantic -Werror):59 tests, 0 failed checks(57 before; +2, both registered intests[])Buildgreen on all jobs (linux g++/clang++ × c++11/17/20, libcurl, sanitizers, macos, windows)Deferred
TRACE_CLIENT_CURLon Windows) is skipped: the issue explicitly asks the owner to choose between honoring the override and documenting the current behavior, so it is not picked up autonomously.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