perf(cache): reuse compilations with native directory aliases #1077
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1077"
general
weight: 0.35
jdx
Projects using system native libraries can now restore compiler results when a library search directory contains directory aliases pointing elsewhere inside that same directory tree. On Debian, the OpenJPEG, Perl and ICU aliases under
/usr/lib/aarch64-linux-gnucaused fnox and several dependencies to compile on every fresh-targetmbx check.The scan follows internal directory aliases and hashes their files under the searched names. Retargeting an alias between two existing directories therefore changes the key. External targets, dangling links and cycles remain refused; directory expansion, file count and byte size are bounded. A result is not published if a searched directory had an entry added, removed or renamed during compilation, which covers an alias retargeted or removed mid-build, even when the link and files involved have old timestamps. The prediction format is unchanged.
Measured with fnox
1ddad3016eb839ade236e1356a92bdc513c4e90f, default features,mbx check --locked --offline, Rust 1.98.0 on Linux arm64. Both mbx binaries used Rust 1.95.0 release builds. Runs used the same isolated local cache, checkout and fixed target path, with a fresh target for every trial, capped at four CPUs and 6 GB. After priming both clients, switching back to main and then to the candidate gave:| Three warm trials | Main b49f18d | This change |
| --- | ---: | ---: |
| Median wall time | 11.08s | 2.47s |
| Range | 10.75–11.74s | 2.42–2.49s |
| Cache hits | 833 | 838 |
The candidate had zero misses or unconsulted compilations in those warm trials. A separate verification run rebuilt 2,363 cached compilations with zero divergences; 18 misses and 36 unconsulted compilations were also built, so verification did not cover every compilation. These are local-cache measurements on one host; remote restores and other platforms were not measured.
mise run cipasses in the isolated Linux arm64 runner (Clippy, workspace and integration tests, 107 Bats cases with platform/tool skips, PTY and docs/link checks). Final-source performance confirmation passed. A linked C/Rust fixture also checks actual output through library/header changes and alias retarget/removal/return; returning to a prior key restores its correct value. The focused adapter regression fails on main. Tests cover library/header edits, alias retargeting/removal/return, direct versus predicted keys, and rejection of external targets and cycles; a CLI regression drives realmbx checkthrough those changes.AI-assisted — Tool: Codex; model: openai/unavailable; version: unavailable.
<!-- CURSOR_SUMMARY -->
---
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Native-library directory aliases are tracked by their searched paths, so retargeting an alias or changing files reached through it can invalidate cached build results.
Directory aliases within the searched tree are followed, including when the search root is a symlink. Cycles, dangling links, aliases that escape the tree, and excessive directory walks bypass caching.
Cached results are not used when tracked directories cannot be checked or change during compilation.
Documentation
Clarified symlink handling and directory-walk limits for native-library directory hashing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->