ORC-2235: [C++] Preserve CMAKE_MODULE_PATH when dependency discovery fails #2735
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 224 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.324
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2735"
general
weight: 0.35
raulcd
What changes were proposed in this pull request?
Isolate dependency discovery in
orcConfig.cmakewith a CMake variable scope, propagatingorc_FOUNDandorc_NOT_FOUND_MESSAGEwhile keepingCMAKE_MODULE_PATHlocal even on an early return.The patch only changes
c++/orcConfig.cmake.in; it does not modify test CMakeLists files or add test infrastructure.Why are the changes needed?
ORC-2235
find_dependency()returns from the package config when a dependency cannot be found. The previous manual restoration ofCMAKE_MODULE_PATHwas therefore skipped, leaking ORC's module search path into the consuming project.This caused a misleading AWS dependency-discovery failure in Arrow after ORC's LZ4 dependency lookup failed. apache/arrow#55415 adds a caller-side workaround; this PR fixes the underlying ORC configuration leak. It does not change LZ4 dependency-selection policy.
How was this patch tested?
On macOS with CMake 4.3.1:
After removing the test-infrastructure changes, both existing CTest tests (
orc-testandtool-test) passed.Separately verified six temporary, out-of-tree configure scenarios with CMake 3.25.2 and 4.3.1: successful/missing dependency discovery with
CMAKE_MODULE_PATHinitially undefined, empty, or containing multiple directories. All six passed with the scoped fix; all three missing-dependency scenarios reproduced the leak against the original template. No regression test files are included in this PR.Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (desktop app 26.1029.61003)