Execution boundaries
| Surface | V1 owner | Boundary |
|---|---|---|
| Python library | DAG-ML for general execution; explicit native portable profile | engine="legacy" remains an explicit rollback available only to direct Python callers. |
| Studio | Rust for HTTP, WebSocket, storage, jobs, and scheduling | No Python backend and no legacy fallback on strict paths. |
| Studio Python plugins | Bounded CPython host using JSON over stdio after capability preflight | It does not listen on the network and owns no storage, jobs, or scheduler. |
| Web | Client-side WASM | No Python runtime or analysis backend. |
Preserve without modifying the source
The published nirs4all-tools 0.0.7 package inspects historical stores and can create a separate, exhaustive, verified preservation copy. The source retains its path, inode, and bytes. V1 refuses requests for semantic conversion into a new workspace until a complete reconstruction contract is available.
python -m venv /opt/nirs4all-tools-0.0.7
/opt/nirs4all-tools-0.0.7/bin/python -m pip install "nirs4all-tools==0.0.7"
/opt/nirs4all-tools-0.0.7/bin/nirs4all-tools legacy inspect /data/legacy --format text
/opt/nirs4all-tools-0.0.7/bin/nirs4all-tools legacy migrate /data/legacy \
--output /data/legacy-preserved --copy-only --verify
/opt/nirs4all-tools-0.0.7/bin/nirs4all-tools legacy verify /data/legacy-preserved \
--manifest /data/legacy-preserved/migration-manifest.json
Main exit codes: 0 successful copy-only preservation; 20 unsupported capability, including semantic conversion; 30 verification failure; 40 security-policy refusal; 70 internal error. Code 10 is reserved for a future best-effort transformation.
Read / write / migrate matrix
Every write targets a new, separate preservation directory. V1 does not create a nirs4all-workspace-v2 from a legacy store and never starts migration automatically. Any change to this policy must be announced with an explicit migration path.
| Input | Read | Write | Migrate |
|---|---|---|---|
| DuckDB / SQLite workspace | Read-only inspection | Preserved copy under payload/ | Semantic conversion refused |
| Filesystem runs / predictions | Inventory without execution | Preserved, checksummed copy | Semantic conversion refused |
.n4a bundle | Detection only; Python objects are never executed | Preserved, checksummed copy | Semantic conversion refused |
| Unknown input | Detection only | Copy-only when policy allows it | Refused |
APIs, ABIs, and schemas
| Contract | V1 identity | Rule |
|---|---|---|
| Python API | PipelineRunner, export, predict, and native session | Legacy selection must be explicit and is reserved for direct Python rollback. |
| Methods C ABI | libn4m 2.5.0, SONAME 2 | Verify header/runtime compatibility before any other operation; keep bindings thin. |
| Methods model | N4MM v1/v2 | Bounded decoding; validate types and sizes before allocation or execution. |
| Portable archive | Core Archive V2 | Validate format, bounds, Methods identity, and fingerprint before replay; never refit implicitly. |
| Workspace | nirs4all-workspace-v2 | SQLite for metadata and Parquet for arrays. |
| Studio | V1 HTTP/OpenAPI/WS snapshots | Single Rust control plane; plugins communicate only through bounded JSON over stdio. |
General Python example
import nirs4all
result = nirs4all.run(pipeline="pipeline.yaml", dataset="dataset.yaml")
archive = result.export("./run.n4a")
prediction = nirs4all.predict(model=archive, data="new_dataset.yaml")
Select the strict portable profile explicitly with engine="native". It requires a list-form pipeline, a splitter, a supported Methods model, and a dataset containing X, y, and sample_ids. Read the V1 Python guide before presenting its export as a portable Core archive.
Explicit Python rollback
rollback = nirs4all.run(
pipeline="pipeline.yaml",
dataset="dataset.yaml",
engine="legacy",
)
FAQ
Does Studio need to bundle Python?
Not as a backend. An embedded CPython runtime may host an explicitly selected library or plugin through bounded JSON over stdio. The server, storage, and scheduler remain in Rust.
Can Studio automatically fall back to the historical backend?
No. Studio/Web paths and strict Python profiles reject unavailable capabilities. Legacy rollback is only a visible choice made by a direct Python caller.
Is a legacy workspace migrated when it is opened?
No. Detection is read-only. An operator may create a preservation copy at a new destination and verify its report. That copy is not a reconstructed V1 workspace and does not trigger an automatic cutover.
Does this page announce V1?
Yes. It accompanies the corrected nirs4all 1.0.1 / Studio 0.11.3 stable line. The Cockpit reports current operational status, while the release receipt preserves a verifiable snapshot of the initial V1 publication.