feat: promote rust streaming from nominal.experimental into nominal.core #1072
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 371 lines diff across 4 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.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1072"
general
weight: 0.35
stefanv
What and why
Rust streaming has been what
get_write_stream()returns by default since #974, butRustWriteStreamstill lived innominal.experimental.rust_streaming, andnominal.core.datasourceimported fromnominal.experimentalto build its default stream.This moves
RustWriteStreamintonominal/core/_stream/rust_write_stream.py, next to the pythonWriteStream.get_write_stream()behaves exactly as before: rust by default, falling back to python whennominal-streamingis unavailable, and refusing to fall back when rust or a rust-only argument was asked for.It also consolidates the missing-
nominal-streaminghandling. Previously the rust module wrapped its failed import in a generic message, and_get_write_streamcaught that to choose between falling back and refusing. Now_get_write_streamalone writes the error, and names why rust was needed (implementation='rust'and/or the rust-only arguments passed). The module importsnominal_streamingplainly.Compatibility
nominal.experimental.rust_streamingand itsrust_write_streamsubmodule keep working as deprecated aliases that re-export thenominal.coreclass. It is the same class object, soisinstancechecks keep passing. Importing either path emits oneUserWarningat the importing line, saying the path will be removed in a future release and pointing toget_write_stream()andnominal.core.DataStream.UserWarningmatches the neighboringget_write_streamdeprecations. No removal version is proposed. The warning fires when the module is first imported in a process, like any deprecated-module warning.nominal-streaming, importing either alias fails up front withModuleNotFoundError, as importing the package did before this PR.RustWriteStreamis not exported fromnominal.core.nominal-streamingonly installs on some platforms, so a top-level export would breakimport nominal.coreon the others, andDataStreamalready declares every enqueue method.Validation
just verify: 1391 passed, ruff format/lint clean, mypy clean; mypy also clean with--python-version 3.10.__getattr__version of the alias, which warned twice and dropped the submodule. Existing tests cover the default stream paths, which would fail if they warned (warnings are errors).stacklevel=2names the importing line was checked on Python 3.10 and 3.12, forimport pkg,from pkg import X, andfrom pkg.sub import X.nominal_streaminghidden:get_write_stream(implementation='rust', file_fallback=...)raises anImportErrornaming both, chained to the originalModuleNotFoundError, and both alias imports raise thatModuleNotFoundError.🤖 Generated with Claude Code