Repository navigation
Fix archive verification on Linux and Windows - #28
Merged
Merged
Conversation
The first real dispatch of the two-variant build passed both macOS targets and failed the other eight, in the verification step this repository has no way to exercise before merge. Two independent causes. The probe pinned CMAKE_CXX_STANDARD to 17. RocksDB builds itself at 20 and its installed headers use C++20 constructs - a defaulted operator==, a using-declaration naming a scoped enumerator - but it exports no target_compile_features, so nothing tells a consumer. AppleClang accepts those headers at 17, which is why only macOS passed; GCC and MSVC reject them. The probe now asks for 20, matching what RocksDB compiled. GITHUB_WORKSPACE is a backslash path on Windows runners, and tar cannot open one: all four Windows targets failed at extraction, before the probe, which is why the two with run_probe: false failed too. Paths were previously converted only where they were passed to CMake. They are now converted once, on entry, for every tool that receives them. Verified on darwin-arm64: a full rebuild of both variants and archive verification pass with the C++20 probe, and a deliberately backslash-separated SCRATCH, which tar cannot open unconverted, now extracts and verifies. The Linux and Windows paths remain exercisable only by a workflow run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The existence check ran on the unconverted path. It passed on the failing run because MSYS's test resolves a backslash path, which is the same accident that made the old tar call look safe. Conversion now happens on entry, ahead of every read. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
xz opens the archive; tar only receives the extraction directory, which is the path it actually refused. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors path handling in .github/scripts/verify-prebuild-archive.sh to convert Windows backslash paths to Unix-style forward slashes on entry, and updates the C++ standard to 20 in tools/perf-context-probe/CMakeLists.txt. The review feedback suggests optimizing the path conversion in the shell script by using native Bash parameter expansion directly instead of a helper function and command substitution, which avoids subshell overhead.
A helper that only wraps ${var//\\//} put a subshell between each path and its
one use. Gemini raised it on #28.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both blocks narrated the change that introduced them. Keep the lasting part: Windows workspace paths need converting before xz, tar and CMake read them, and RocksDB's installed headers require C++20 without exporting it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This repo builds whatever RocksDB tag the dispatch asks for, defaulting to the latest release, so naming one goes stale on the next build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A backslash is an ordinary filename character on Linux and macOS, so the unconditional rewrite turned a legal path into one that does not exist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PROBE_CMAKE_ARGS reaches cmake unexamined, so a caller spelling a path value with backslashes would get CMake escapes. Nothing in the matrix passes a path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The case list also matches Cygwin, MinGW and win32. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
cb1kenobi
marked this pull request as ready for review
October 9, 2026 05:50
This was referenced Oct 9, 2026
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.
⊙ Problem
The first real dispatch of the two-variant prebuild (run 37855264608,
v11.8.1-perf-context-test) passed both macOS targets and failed the other eight, all in theVerify release archivestep that #27 added.build.ymlruns only onscheduleandworkflow_dispatch, so no PR can exercise that step and both defects reachedmain.The feature itself was fine on all ten targets.
windows-arm64shows the whole mechanism working:vcpkg remove, both variants built from the one portfile, the portfile guard firing in both directions, byte-identical headers, and correct Windows naming. Only the checker was broken.💡 Solution
Two independent causes, both in code added by #27.
The probe did not compile on GCC or MSVC.
tools/perf-context-probe/CMakeLists.txtpinnedCMAKE_CXX_STANDARDto 17. RocksDB builds itself at 20 and its installed headers use C++20 constructs — a defaultedoperator==incompression_type.h, a using-declaration naming a scoped enumerator indb.h— but it exports notarget_compile_features, so nothing communicates that to a consumer. AppleClang accepts those headers at 17, which is exactly why the macOS targets passed and the local testing was green. The probe now asks for 20, matching what RocksDB compiled.tarcannot open a Windows backslash path.GITHUB_WORKSPACEisD:\a\..., and extraction failed withtar: D\:\a\...: Cannot open. That is before the probe runs, which is why the two targets withrun_probe: falsefailed as well. #27 converted paths only where they were handed to CMake, on the assumption that git-bash tolerates backslashes elsewhere; it does fortestandmkdir, not fortar. Each path is now rewritten ahead of its first reader — and only on a Windows shell, since a backslash is an ordinary filename character everywhere else.🔧 Changes
tools/perf-context-probe/CMakeLists.txtCMAKE_CXX_STANDARD17 → 20, the standard RocksDB built its own headers with..github/scripts/verify-prebuild-archive.shARCHIVEis rewritten under it before the existence check that previously read an unconverted path.PROBE_DIRandSCRATCHfollow once their defaults resolve. The per-callcmake_pathhelper is removed as redundant.✅ Verification
Route: local rebuild and archive verification on
darwin-arm64, plus targeted path cases. The platforms that actually failed cannot be reproduced locally — that is the point of the judgment call above.nmreferences 59 vs 0, probeuser_key_comparison_count40,959 vs 0.ARCHIVEandSCRATCHconverts and verifies, covering the ordering defect the review found.back\slash-testis found and verified. Under the unconditional rewrite the review caught, it resolved to/tmp/back/slash-test/…and exited 2.no such archive: …rather than failing obscurely.shellcheckclean.Not verified here: MSVC, Alpine GCC and real Windows
tar. The next dispatch is the first execution of all three. The/Z7CodeView marker-count reasoning inverify-prebuild-archive.shis also still unproven, because every Windows job died at extraction before reaching it.🤖 Generated by Claude (Anthropic); posted via @cb1kenobi.
Related PRs: #27 overlaps (this repairs the verification step it added; merged), #26 overlaps (merged; its own changes contain neither defect)
Complexity: medium
Review-Coverage: authored=claude; ran=cursor-composer,codex,gemini,cursor-muse; adjudicated=domain; declined=cursor-grok,cursor-kimi; rounds=8; full=2 @ 98e1fc9
Review-Attention: read ~3m (decisions: cxx20-at-consumer, release-time-proof, document-not-convert-extra-args) @ 98e1fc9