← Back to Pull requests

Port the Python bindings to nanobind, ship cp312-abi3 wheels, and use the C++11 string ABI #1188

Closed
unknown closed this pull request without merging on Oct 30, 2026 06:15 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 17:27 UTC
Author

<!--

Thank you for contributing to cuCIM :)

Here are some guidelines to help the review process go smoothly.

1. Please write a description in this text box of the changes that are being
made.

2. Please ensure that you have written units tests for the changes made/features
added.

3. If you are closing an issue please use one of the automatic closing words as
noted here: https://help.github.com/articles/closing-issues-using-keywords/

4. If your pull request is not ready for review but you want to make use of the
continuous integration testing facilities please label it with [WIP].

5. If your pull request is ready to be reviewed without requiring additional
work on top of it, then remove the [WIP] label (if present) and replace
it with [REVIEW]. If assistance is required to complete the functionality,
for example when the C/C++ code of a feature is complete but Python bindings
are still required, then add the label [HELP-REQ] so that others can triage
and assist. The additional changes then can be implemented on top of the
same PR. If the assistance is done by members of the rapidsAI team, then no
additional actions are required by the creator of the original PR for this,
otherwise the original author of the PR needs to give permission to the
person(s) assisting to commit to their personal fork of the project. If that
doesn't happen then a new PR based on the code of the original PR can be
opened by the person assisting, which then will be the PR that will be
merged.

6. Once all work has been done and review has taken place please do not add
features or make changes out of the scope of those requested by the reviewer
(doing this just add delays as already reviewed code ends up having to be
re-reviewed/it is hard to tell what is new etc!). Further, please do not
rebase your branch on main/force push/rewrite history, doing any of these
causes the context of any comments made by reviewers to be lost. If
conflicts occur against main they should be resolved by merging main
into the branch used for making the pull request.

Many thanks in advance for your cooperation!

-->

This PR moves the cucim.clara Python bindings from pybind11 to nanobind and builds _cucim against the CPython 3.12 stable ABI. CI then builds one cp312-abi3 wheel and one Python-version-independent conda package per CUDA version and architecture, and tests them on Python 3.12, 3.13, and 3.14. The PR also removes _GLIBCXX_USE_CXX11_ABI=0, so libcucim, its plugins, and _cucim use the default C++11 string ABI of libstdc++.

Closes #1029.
Closes #1163.

Related issues and PRs

None of these is closed. This PR uses no closing keyword for them, and GitHub closing keywords do not close pull requests.

  • #1151 (open issue) proposes Cython bindings built as cp311-abi3, a version-independent conda package, stable artifact names, and one build per CUDA version and architecture. This PR delivers those packaging goals with nanobind and cp312-abi3. main dropped Python 3.11 in #1177, and a comment on #1151 explains why nanobind is preferred. Two of #1151's non-goals do not hold here. This PR changes libcucim's string ABI (#1163), and it changes some Python behavior (see "Release notes"). The rapidsai/ci-imgs cleanup in #1151 is not done, because it belongs to that repository. Closing #1151 is up to its author.

  • #1153 (open PR, based on #1152's branch codex/cython-abi3) reduces the build matrix. Commit 7 cherry-picks its one commit unchanged, and commit 8 fixes the docs build that it did not update. Once this PR merges, #1153 is superseded but stays open until someone closes it.

  • #1152 (open PR) is the Cython migration. Commit 6 adapts its conda recipe change. This PR replaces its binding approach, so it is superseded in the same way.
  • Who is affected

  • Python users of cucim.clara. Members of the scoped enums CacheType, DeviceType, and FileHandleType no longer support int() or __index__(). DLDataTypeCode members still support both, because the new binding makes DLDataTypeCode an enum.IntEnum. Boolean arguments accept only True and False, and path and text arguments are stricter. See "Release notes" for the full list. cuCIM's own test_image_cache.py used int(cache.type) and needed a one-line change per assertion, so downstream code may need the same change.

  • C++ code that links libcucim, including out-of-tree plugins, must be rebuilt. This is an intentional C++ ABI break.

  • Packaging. Wheels are tagged cp312-abi3. The conda package is built once on Python 3.12 and installs on Python 3.12 and later. Each PR pipeline builds 4 conda Python packages and 4 wheels instead of 12 of each. The test jobs are unchanged.
  • Commits

    Review the PR commit by commit.

    1. Add regression tests for the cucim.clara binding surface. test_bindings.py and test_bindings_cuimage.py pin what callers of _cucim observe. Tests that need no generated image are in test_bindings.py, so they also run where imagecodecs is missing (aarch64 wheel jobs). On the pybind11 build, every test passes except test_profiler_config_keyword, which crashes the interpreter.
    2. Port the Python bindings from pybind11 to nanobind. python/pybind11 becomes python/nanobind, built with nanobind 3.1 and nanobind_add_module(... STABLE_ABI ...). pybind11, its 2.11 patch, and pybind11_json are removed. This commit kept pybind11's conversions in python/nanobind/compat.h. Commit 5 removes its string caster, and commit 10 removes the file.
    3. Tag cucim wheels cp312-abi3 and audit the stable ABI. setup.py sets py_limited_api to cp312. ci/validate_wheel.sh fails if there is no cp312-abi3 wheel, and it runs abi3audit --strict.
    4. Use the C++11 string ABI. This commit removes all seven _GLIBCXX_USE_CXX11_ABI=0 settings and the old-ABI branch of ImageMetadata. One setting was a PUBLIC compile definition on cucim::cucim, which forced the old ABI on every consumer.
    5. Use nanobind's stock string caster and take paths as std::filesystem::path. Text parameters accept only str, and path parameters use nanobind's stl/filesystem.h. docs/source/api.rst gains a "Path and text arguments" section.
    6. Make the cucim conda package independent of the Python version. This is Michael Sarahan's recipe change from #1152 (1a07dd7a), adapted to Python 3.12 and without its Cython build changes.
    7. Reduce ABI3 build matrix. Michael Sarahan's commit from #1153, cherry-picked unchanged with -x. Conda and wheel builds keep the lowest Python per CUDA version and architecture, and the CI scripts use --stable artifact names.
    8. Download the stable conda artifact in the docs build. ci/build_docs.sh downloads the conda package too, and #1153 did not change it. Without this commit, the docs jobs look for a per-Python artifact that no job uploads.
    9. Use the canonical SPDX notice in ci/build_wheel.sh. verify-copyright requires it because commit 7 changes the file.
    10. Use nanobind's own enum and bool behavior and remove compat.h. Enums use nb::enum_, and DLDataTypeCode keeps nb::is_arithmetic(). Boolean parameters take bool, and conversions use nb::cast. Two new docs/source/api.rst sections document the changes. This follows review feedback that slightly preferred the breaking change to the compatibility shims.
    11. Update .github/CODEOWNERS. python/nanobind is owned by @rapidsai/cucim-python-codeowners as well as @rapidsai/cucim-cpp-codeowners.
    12. Update conda/recipes/cucim/meta.yaml. The host requirement python ={{ py_abi_min }} becomes python {{ py_abi_min }}., matching the python-abi3 line. Conda's MatchSpec treats both forms as python=3.12.
    13. Update conda/recipes/cucim/meta.yaml. The run requirement python >=3.12 becomes python, and python-gil stays. python-abi3 supplies the Python 3.12 lower bound, as described in "Packaging and build".

    Commits 11 to 13 apply jakirkham's review suggestions.

    Release notes

    The cucim.clara bindings use nanobind instead of pybind11 and are built against the CPython 3.12 stable ABI. One cp312-abi3 wheel installs on Python 3.12, 3.13, 3.14, and 3.15. Public names are unchanged.

    A probe recorded 183 cases on main (pybind11, 8a67a731) and on this branch, and every change below comes from that comparison. The probe and the tests cover only the calls they make.

    Compatibility note

    Equality with integers is preserved. Members of CacheType, DeviceType, and FileHandleType compare unequal to integers in both the previous pybind11 bindings and this branch. For example, io.Device("cuda").type == 2 remains False. DLDataTypeCode members continue to compare equal to their corresponding integers. For example, DLDataTypeCode.DLUInt == 1 remains True. The new binding uses enum.IntEnum to preserve this behavior.

    Breaking changes

  • Enums are classes from Python's enum module. cache.CacheType, io.DeviceType, and filesystem.FileHandleType are enum.Enum classes. DLDataTypeCode is an enum.IntEnum.

  • - int(member) and operator.index(member) raise TypeError for CacheType, DeviceType, and FileHandleType. Use member.value.
    - An unknown value, such as DeviceType(99), raises ValueError. pybind11 returned an unnamed <DeviceType.???: 99> member.
    - repr(member) is DeviceType.CUDA instead of <DeviceType.CUDA: 2>. str() and format() still give DeviceType.CUDA.
    - Members of the three Enum classes hash by name instead of by value.
    - DLDataTypeCode members are now int instances and support < and >.
  • Boolean arguments accept only True or False. pybind11 also accepted None and numbers such as numpy.bool_, 0, 1, and 1.0. Pass bool(value) instead.

  • - read_region(drop_last=, shuffle=), filesystem.CuFileDriver(no_gds=, use_mmap=), and CuImageIterator(ending=) raise TypeError for other values.
    - CuImage.cache(record_stat=) and CuImage.profiler(trace=) read these values from kwargs, so they raise RuntimeError: std::bad_cast.
    - pread requires the read-only flag in a buffer's __array_interface__ or __cuda_array_interface__ data tuple to be a bool, and raises RuntimeError otherwise. NumPy and CuPy set a bool. pwrite does not read the flag.
  • Path and text arguments are stricter. A bytearray path raises TypeError. So does a path with an embedded NUL character, where pybind11 cut the path at the NUL and opened the shorter path. Text arguments that are not paths, such as dim_order, device names, and the filesystem.open flags, raise TypeError for bytes and bytearray.

  • Some error messages changed. Exception types are unchanged.

  • - A call that matches no signature reports "incompatible function arguments" instead of "incompatible constructor arguments".
    - A value that fails to convert inside a binding still raises RuntimeError, with the message "std::bad_cast". pybind11 reported "Unable to cast Python instance of type ... to C++ type '?'". Examples are CuImage.cache("per_process", capacity="1") and a read_region location that is not an integer.

    Fixes and additions

  • CuImage.profiler(trace=True) no longer crashes the interpreter. The pybind11 binding released the GIL and then read its keyword arguments.

  • read_region accepts a NumPy int64 array for location. pybind11 checked only for buffer format q, and NumPy reports l on 64-bit Linux.

  • DLDataType(code, bits, lanes) also accepts a plain integer code that names a member, such as 1.

  • Path arguments accept os.PathLike objects. A file name that is not valid UTF-8 can be passed as bytes or as an os.fsdecode() string.
  • docs/source/api.rst documents the enum, boolean, path, and text changes.

    C++ ABI break

  • Exported functions that take or return std::string now use std::__cxx11::basic_string, so their mangled names change.

  • ImageMetadata always stores dims_ and coord_sys_ as std::pmr::string. This changes its layout.

  • The cucim::cucim CMake target no longer exports the definition, so consumers compile with their compiler's default ABI.
  • A binary built with _GLIBCXX_USE_CXX11_ABI=0 against an older libcucim references string symbols that libcucim no longer exports. It fails at load time or on the first call. Even where no string crosses the boundary, such a binary can disagree on the ImageMetadata layout. Don't mix libcucim or plugin binaries from before and after this change in one process. Python users of the wheel need no action, because the wheel bundles libcucim, the plugins, and _cucim. The cucim conda package requires the libcucim package of the same version.

    Packaging and build

  • nanobind (>=3.1.0,<3.2.0a0) is a build dependency in dependencies.yaml.

  • The conda and wheel builds in pr.yaml and build.yaml use the matrix_filter that cuDF and cuVS use, which keeps the lowest Python per CUDA version and architecture. With the current matrix, that is Python 3.12.

  • The conda package is built with python_version_independent: true against python-abi3. Its build string is cuda<major>_cp312_abi3_….

  • - The recipe's run requirements list python and python-gil without a version.
    - The Python 3.12 lower bound comes from python-abi3 3.12, whose run_exports add cpython >=3.12 and _python_abi3_support 1.
    . This was checked in the conda-forge build he1d15d4_3.
    - A package built locally at 17319017 depended on python >=3.12 from the recipe at that time, plus cpython >=3.12, _python_abi3_support 1., and python-gil, with no python_abi pin. No package was built locally from commits 12 and 13, so their package metadata is not verified here.
  • ci/build_python.sh, ci/build_wheel.sh, ci/test_python.sh, ci/test_wheel.sh, and ci/build_docs.sh name the Python artifacts with rapids-artifact-name --stable.

  • ./run copies only _cucim.abi3.so. Python imports a stale _cucim.cpython-3XX-.so in preference to an abi3 module, so a leftover build output would shadow the new module.

  • nanobind_add_module uses PROTECT_STACK and NOMINSIZE. Without them, nanobind adds -fno-stack-protector and -Os after the conda hardening flags.

  • LICENSE-3rdparty.md and 3rdparty/ list nanobind and robin-map instead of pybind11 and pybind11_json.
  • Validation

    The branch includes main at b715b157 (#1190), which skips cucim.skimage tests when GitLab rate-limits sample-data downloads. Below commit 10, the tree differs from 17319017 only by the seven files that #1190 changes.

    Hosted CI at 17319017 (commits 1 to 9, before #1190):

  • All 12 package builds pass: conda C++, conda Python, and wheel, each for CUDA 12.9 and 13.3 on amd64 and arm64, all on Python 3.12. The docs build and style checks also pass.

  • 5 of 7 test jobs pass:

  • - Conda tests on Python 3.12 (amd64, CUDA 12.2) and 3.14 (amd64, CUDA 13.0).
    - Wheel tests on Python 3.12 (amd64), 3.13 (arm64), and 3.14 (amd64).
  • The other 2 test jobs fail, conda on Python 3.13 (arm64, CUDA 13.3) and wheels on Python 3.12 (arm64, CUDA 12.2). In each, every failure is a cucim.skimage test that got HTTP 429 from GitLab: 21 failed or errored tests in one job and 39 in the other. #1190 fixes this.
  • Hosted CI at 1596499e (commit 10, with #1190). All 35 check runs of run 40776096307 passed. They include the 12 package builds, the docs build, and all 7 test jobs. This description does not report hosted CI for commits 11 to 13.

    Local, at commit 10. All local checks ran on one x86_64 machine (i9-13900K, RTX A6000) with GCC 14.4 and CUDA 13.3, in conda environments.

  • Build. A full ./run build_local all release at commit 9 with #1190 succeeds. Its only warnings are four -Wclobbered warnings in cuslide's libjpeg_turbo.cpp, which this PR does not change. At commit 10, the five binding sources recompile with no warnings.

  • Tests. The in-tree build runs pytest tests/unit tests/performance in python/cucim with the one cp312-abi3 module:

  • - Python 3.12 and 3.13: 164 passed, 5 skipped.
    - Python 3.14: 161 passed, 5 skipped, 3 xpassed. The 3 xpassed are cases of test_read_random_region_cpu_memleak marked xfail for #1043. No pybind11 build was tested on 3.14, so this PR does not claim to fix #1043.
    - The updated enum and bool tests fail 6 times against the commit-9 build, so they detect the change.
  • Behavior. The probe gives the same output for commit 10 on Python 3.12, 3.13, and 3.14. Against commit 9, it differs only in enum int(), operator.index() and repr(), boolean arguments, and conversion messages.

  • pre-commit. pre-commit run --hook-stage manual --all-files, as CI runs it, passes on a clean clone.

  • Docs. sphinx-build -b dirhtml succeeds with the same 5 warnings at commits 9 and 10.
  • Local, at earlier commits. None of these was rerun at commit 10.

  • Wheel, commit 5. The wheel built on Python 3.12 and repaired with auditwheel passes ci/validate_wheel.sh: pydistcheck, twine check --strict, the tag check, and abi3audit --strict. Installed on Python 3.12, 3.13, and 3.14, it passes the test suite of that commit.

  • Conda, 17319017. libcucim and cucim conda packages build from clean clones with conda-build 26.9.1. The cucim package built once for Python 3.12 installs and passes tests/unit and tests/performance on Python 3.12, 3.13, and 3.14. The recipe before commit 6 produces a package that can't be installed on 3.13 or 3.14.

  • CI artifact routing, 17319017. A script expands each job's matrix with shared-workflows' jq program. Every conda test, wheel test, and docs job downloads an artifact that a build uploads, built on a Python no newer than its own. Without commit 8, the docs jobs fail this check.

  • String ABI, commits 4 and 5. None of the compile commands sets _GLIBCXX_USE_CXX11_ABI. nm shows that libcucim, the plugins, and _cucim import only std::__cxx11 string symbols. Before commit 4, libcucim imported 23 old-ABI string symbols.

  • End to end, commit 4. Opening a TIFF, read_region for a region, a pyramid level, and batches (compared with tifffile), and cucim convert with readback all pass.
  • Not validated

  • Hosted CI results for commits 11 to 13 (67b37775), which this description does not report. Commit 11 changes only .github/CODEOWNERS, and commits 12 and 13 change the conda recipe's Python requirements.

  • Local wheel and conda package builds from commit 10 or later. Commit 10 changes only the binding module, its tests, and the docs.

  • The CI wheel platform. The local wheel was repaired as manylinux_2_39, and CI builds manylinux_2_28 wheels.

  • A pip-only environment. Local tests ran in conda environments.

  • nanobind versions other than 3.1.0.

  • C++ consumers of libcucim outside this repository.
  • Historical performance measurements

    These numbers are from commit 4, measured against main at 8a67a731. They were not rerun after commits 5 to 10. Commits 6 to 9 change only packaging and CI. Commits 5 and 10 change argument conversion for strings, paths, enums, and booleans, and the benchmark calls few of those.

  • Property access (shape, dims, dtype, resolutions, spacing(), channel_names) took 1.1 µs instead of 2.1 µs, 45% less. This is associated with the nanobind build, which also differs from the pybind11 build in LTO and default flags.

  • img.metadata took 6.3 µs instead of 7.3 µs, 14 to 16% less. This is associated with commit 4, which changes both the C++ string ABI and the ImageMetadata member layout.

  • A 16x16 read_region took 17.8 µs instead of 20.0 µs, 11% less. The difference was clear in the second run only.

  • For opening a file, cold start, full-image JPEG and deflate reads, threaded tile reads, the batched iterator, and GPU reads, these runs did not establish a reliable improvement or performance equivalence.
  • <details>
    <summary>Benchmark method and full results (commit 4)</summary>

    Three trees were built with ./run build_local all release in one conda environment (Python 3.12.16, GCC 14.4, CUDA 13.3, nvImageCodec 0.9.0, NumPy 2.5.4, CuPy 14.2.0):

  • main at 8a67a731, pybind11, _GLIBCXX_USE_CXX11_ABI=0.

  • The control, this branch at commit 3, nanobind, _GLIBCXX_USE_CXX11_ABI=0.

  • This branch at commit 4, nanobind, C++11 string ABI.
  • Each measurement is a fresh process pinned to performance cores. The build order rotates every round. For the 7-round workloads, one build goes first one extra time. Every process checks that libcucim, _cucim, and the plugins load from its own build tree, and the outputs match across builds. The libcucim tile cache is off, and the files are in the page cache.

    Lower is better. Each value is the median over processes, with the min to max range and the process count. Each process reports the median of 7 to 15 samples after warmup. "None measurable" means that the ranges overlap or that a Mann-Whitney test gives p ≥ 0.05. It does not mean that the builds perform the same.

    | Workload (data) | main (pybind11) | commit 4 | Change | Associated build change |
    |---|---|---|---|---|
    | import cucim + first CuImage(path), cold process | 543 ms (536 to 572, n=15) | 542 ms (535 to 557, n=15) | none measurable | |
    | CuImage(path), 4096x4096 JPEG TIFF | 46.2 µs (43.7 to 48.2, n=7) | 45.5 µs (44.0 to 47.5, n=7) | none measurable | |
    | img.metadata (JSON to dict) | 7.3 µs (7.3 to 7.4, n=7) | 6.3 µs (6.2 to 6.4, n=7) | −14% (rerun −16%) | string ABI and ImageMetadata layout commit −18%, nanobind build +3 to +4% |
    | shape, dims, dtype, resolutions, spacing(), channel_names | 2.1 µs (2.0 to 2.3, n=7) | 1.1 µs (1.1 to 1.1, n=7) | −45% (rerun −45%) | nanobind build |
    | 16x16 read_region + np.asarray, tiny JPEG TIFF | 20.0 µs (18.2 to 21.3, n=7) | 17.8 µs (16.5 to 18.8, n=7) | −11% in both runs (run 1 p=0.004 with overlapping ranges, run 2 p=0.001) | nanobind build |
    | Full-level read_region 4096x4096, JPEG | 46.4 ms (45.6 to 47.4, n=7) | 46.6 ms (45.7 to 47.8, n=7) | none measurable | |
    | Full-level read_region 4096x4096, deflate | 60.0 ms (59.0 to 65.4, n=7) | 59.8 ms (59.0 to 61.6, n=7) | none measurable | |
    | 256 tiles of 256x256 via ThreadPoolExecutor(8), JPEG | 6.99 ms (6.78 to 7.48, n=7) | 6.76 ms (6.66 to 6.96, n=7) | none measurable (−3% and −5% in the two runs, ranges overlap) | |
    | Batched iterator, 256 random 256x256 patches, num_workers=8, batch_size=32 | 22.9 ms (22.3 to 24.3, n=7) | 22.8 ms (22.3 to 24.0, n=7) | none measurable | |
    | GPU read_region(device="cuda") 4096x4096 JPEG, synchronized | 45.4 ms (43.9 to 47.7, n=7) | 45.3 ms (44.3 to 45.8, n=7) | none measurable | |

    A profile of the metadata work shows about 25% fewer allocator samples after commit 4. This fits C++11 strings that store short JSON keys and values inline, but the mechanism is inferred, not measured directly.

    In a perf profile of the threaded JPEG tile scan, 76% (pybind11) and 80% (nanobind) of on-CPU samples are in the cuslide plugin, mostly JPEG decoding. The binding modules hold 0.8% and 0.5% of on-CPU samples. These percentages are not the total binding overhead, and they are not fractions of wall time.

    Limitations:

  • One machine and one Python version (3.12).

  • A desktop with other processes running. The load average was 4.5 to 6, and GPU utilization from other processes and the display was 42% before and 82% after the run. Pinning and interleaving reduce the effect.

  • Synthetic TIFFs from python/cucim/tests/util/gen_image.py. The deflate file is 185 KB because the pattern compresses well.

  • Locally built conda binaries, not CI wheels.

  • The pybind11 build links with LTO. The nanobind build does not, and it strips the module. "The nanobind build" means the binding together with its default build settings.

  • The cucim convert CLI is not benchmarked because it uses OpenSlide and tifffile rather than the bindings.
  • The benchmark scripts and raw measurements (339 processes over two runs) are not part of this PR and can be shared on request.

    </details>

    Binding build-mode comparison at 67b37775

    A separate study, run on October 29, 2026 at 67b37775, compared three nanobind configurations with byte-identical libcucim and plugin binaries: linked with STABLE_ABI (this PR), linked with the full API, and split mode. Its results support keeping the current build.

  • No image-read speedup was demonstrated for either alternative in the tested workloads.

  • The full-API build's keyword-argument call latency was about 5 to 9% lower, 6 to 11 ns per call. Uneven load on the sibling CPU thread makes the exact size uncertain.

  • 1,250 timed processes completed. On every variant, the tested cucim.clara tests gave 139 passed and 1 skipped.
  • The study used local builds on CPython 3.12.16 on one desktop machine. It does not validate production wheel or conda packaging at 67b37775, and it is separate from the historical measurements above.

    Pre-existing issues found, not fixed here

    These issues also occur on main.

  • Installed wheels contain two copies of libcucim. The plugins use the copy that auditwheel grafts, so they bypass a cache configured from Python. Current nightly wheels have the same layout.

  • The CuFileDriver.pread and pwrite bounds check ignores buf_offset, so a nonzero offset can access memory past the end of the buffer.

  • Calling repr, metadata, or save() on a closed CuImage crashes.

  • read_region(..., device="cuda") on a TIFF that is not JPEG-compressed aborts with "Unsupported compression method".

  • Concurrent reads with a small per-process tile cache can crash in PerProcessImageCache::remove_front. The crash happened in 4 to 7 of 20 runs on each build.
  • Assisted-by: Claude Code

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: gigony Review duration: 3648m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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 #1188"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%
    Repository