Repository navigation
Reduce research rebuilds and isolate DuckDB download dependencies - #1430
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
本评论记录 head #1430 的 10 条 Semgrep unsafe 讨论审查审查对象:PR #1430 head 风险结论与变更决定这 10 条告警未证明当前补丁引入了可利用的安全缺陷。无需为了消除告警修改代码。三个是 它们确实是 unsafe 使用提示,不能说扫描器没有命中 unsafe。GitHub 上规则是 本 PR 把原来的 registry 依赖源码纳入仓库,因此这些代码是本次新增的扫描位置,但 unsafe 操作并非本次新写。base 的 research-core 和 data-pipelines lock 都已固定 没有修改生产代码、缓存/安全策略或扫描规则,没有提交、推送或新远端 CI。保留 Draft,10 条讨论均未标记解决,告警未关闭。测试文件仅位于已有忽略的本地验证目录,副本在 evidence。 逐条审查
Rust 标准库安全契约:set_var、CStr::from_ptr、slice::from_raw_parts。不将测试通过当作对任意裸指针的证明。 来源和调用链证据
验证与状态
原始证据:unsafe-threads-locations.json、unsafe-alerts-readonly.json、unsafe-reviewed-alerts.json、unsafe-upstream-provenance.json;测试:unsafe_contracts.rs、upstream_unsafe.rs、unsafe-contracts-tests.log、unsafe-upstream-tests.log、unsafe-final-tests.log;原生源码节选:unsafe-capi-source/。 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6dbe06253b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| The production `cex-runner` image excludes this diagnostic executable. Build it explicitly with the recipe below. | ||
| Its local output is not a signed production Build or an admitted Campaign runner. |
There was a problem hiding this comment.
这里说明生产 cex-runner 不再包含该诊断程序,但同一文档第 69 行仍称发布目录和 CEX Dockerfile 会构建独立的 monday-offline-baseline 配方和二进制。完整阅读文档的操作者会得到相互矛盾的发布契约;请同步更新或删除第 69 行的旧说明。
AGENTS.md reference: AGENTS.md:L207-L209
Useful? React with 👍 / 👎.
Change
CEX production builds included an unused standalone offline diagnostic. Package eight executables through five recipes, down from nine through six. Keep the scientific worker, operator, backtest, four materializers and preparation program. The diagnostic remains available through its explicit local build.
Bundled DuckDB also compiled an unused HTTP downloader. Vendor the checksum-verified
libduckdb-sys 1.10504.0package and gate reqwest/zip behinddownload. Research-core and data-pipelines use the patch; Prediction retains its distinct locked version. System linking and explicit downloading remain supported. A download request without its feature fails clearly. Native C++ source, compiler backends and binding code retain upstream behavior.Bind every native patch file, resolved dependencies, compiler, ABI, flags and profiles into cache compatibility. Preserve this exact dependency during cleanup and remove application artifacts. Prepare clean native source timestamps before restoring fresh CI targets. Apply the same contract to Loop nextest and regular Rust caches. Only successful cleaned main jobs save trusted dependencies.
Separate dependency compilation identity from packaging text. Reuse identical Cargo metadata commands without combining package-qualified feature selections. Grant the final remaining owner the admitted CPU budget for its next recipe. Preserve running jobservers, owner serialization, memory limits and cancellation cleanup.
Audit and provenance: DuckDB cache audit, native patch notes.
Issue relationship
None
Validation
Current head:
6dbe06253bef3378a3e71b942959ed0c75fe32f6, including main4310dc7eb65f0994f8fe647e9536e5a407fe6121without conflicts.Focused local checks passed:
SELECT 42on macOS arm64.fresh=true. This is local freshness evidence, not cross-run cache evidence.git diff --checkpassed.Current CI:
All selected current-head checks passed, including ABI verification, strict Clippy and offline image smoke. The PR remains Open/Draft. Main is unchanged at
4310dc7e; the tested Prediction PR merge source is71811449ae798c5bdd4327add882e62ecdc83378.Durations overlap or nest; do not add them. The image runner was AMD EPYC 7763 with four logical CPUs. The prior head used Intel Xeon 6973P-C. These are not controlled performance comparisons.
Research cache exact and compatible keys both missed. Compatibility identity:
b6bc2281bf90e4897703b0254b0e877c7d826f4475c2029f3843d1d375de2930; exact suffix:ca8e73ad3d7ab3fdd3cdc34a728b5bf6abf614c0c95786ccb9d3136e17626fcb. Dev/test and Loop v3 caches also missed. The worker's fresh native artifacts prove same-run reuse, not a cross-run hit. Main-only trusted saves were skipped on the PR ref.The 10–15 minute target is not met. Cold operator compilation and broad cold dev/test build/Clippy remain the measured bottlenecks. A successful authorized main producer and a later compatible restore are still needed for cross-run warm-cache measurement. No merge, publication or deployment was performed.
The first attempt at
2d803fddfailed in run 38895793629: the policy build script correctly rejected two stale owning-manifest input hashes. Commit6dbe0625refreshes those hashes and the canonical digest. Re-projecting the locked Linux normal dependency tree reproduces all 174 package records and features. All source/checksum identities match the lockfile. Regeneration from the 19 original input definitions reproduces the complete artifact byte-for-byte. The original policy validator and both original identity unit tests pass, including stale/forbidden counterexamples. The validator and gate logic are unchanged.A controlled local test changed only the normal-target Rustls package from 0.23.45 to 0.23.46. The actual patched DuckDB build script and library remained
fresh=true; the active native static archive SHA-256 stayed identical, and bothSELECT 42consumers passed. The emitted artifact package set confirms exactly one package-version substitution. This verifies the intended incremental invalidation boundary, not a full-CI speedup.The two image runs have identical compiler/native/flag hashes, builder digest, profile, target, recipes and job allocations. Both image caches missed. Of the 11m44s full-run increase, 11m30s occurs inside the build step: backtest +54s, operator +9m18s, worker +1m18s. All eight recipes take longer; CPU models differ, and main also updates normal Rustls. Hardware contribution is plausible but not quantified.
The Monorepo baseline restored v2 dependencies and had a full Loop cache hit. The current v3/Loop migration is cold. Workspace manifest/lock changes also select seven additional check/build stages totaling 18m43s that were absent in the narrow baseline. This is not a like-for-like benchmark. Existing migration coverage and the unchanged policy gate remain enforced.
All recoverable failures found here are fixed. No unchanged-input PR rerun is warranted. The next necessary validation is a successful authorized main cache producer followed by a separate compatible restore and representative small-change CI. That main-seed path remains unexecuted because this task forbids PR merge; no cache permission, cloud resource or deployment change was made.
The previous head
f82a1ad2passed Prediction CI in 28m25s, with a 25m36s build step and missed caches. That result did not meet the 10–15 minute target. The new identities require a trusted producer before measuring cross-run reuse. Local bundled compilation took 7m18s on macOS; this is neither complete Linux CI nor a controlled speed comparison. The current successful full run remains above the target; no acceleration percentage is established.Runtime impact and rollback
Build and dependency changes only. ABI verification, executable hashing and offline image smoke remain required. SQLx CLI scripts, composite action and cache policy are unchanged. This draft is not merged or deployed. Reverting the native-isolation commit restores its previous dependency/cache behavior. Any later merge may trigger existing artifact publication; this PR grants no deployment authority.