You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an explicit locked fetch boundary, isolated offline Cargo execution, global compiler observation, and exact output manifests for the graduated pure-Rust current-host check class.
Model build-script actions and results without circular identity, preserve normal execution for unsupported classes, and report every unproven boundary.
BREAKING CHANGE: Action plans and decision receipts now use schema version 4.
enable unstable Cargo semantics, or pass raw rustc arguments; those boundary overrides fail before fetch state.
152
+
153
+
The profile requires an existing exact `Cargo.lock` and has one network boundary: `cargo fetch --locked`. Before that
154
+
boundary, cargo-rail captures and classifies Cargo configuration, rejects configured compiler/rustdoc wrappers and
155
+
ambient `RUSTC`/`RUSTDOC`, and performs only locked/offline local-package metadata preflight. Toolchain discovery
156
+
disables rustup auto-install/update behavior, ignores ambient compiler wrappers, and pins the exact sysroot Cargo,
157
+
rustc, and rustdoc; wrappers, rustup staging homes, and a newly downloaded toolchain cannot enter the fetch identity.
158
+
The fetch binds the lockfile, acquisition configuration, credential capability names, and exact Cargo implementation,
159
+
captures locked registry or Git packages as an immutable source inventory, and runs full metadata locked/offline
160
+
against that inventory. A warm run exactly revalidates and reuses this dependency inventory without contacting the
161
+
registry. It does not restore compiler output.
162
+
163
+
Each check runs with `--locked --offline` in a fresh root containing a streamed, byte-verified, read-only source tree,
164
+
a fresh mutable Cargo bookkeeping area, an isolated `target-dir`, stable `build.build-dir`, temporary and home
165
+
directories, and a controlled environment. Effective supported Cargo `[env]`, remote registry source replacement,
166
+
profile environment, target rustflags, and repository-relative values are materialized explicitly. Cargo dep-info and
167
+
rustc output paths are remapped to logical workspace, target, build, Cargo-home, toolchain, and run roots. The source,
168
+
dependency inventory, and exact toolchain/platform read boundary are revalidated after observation and immediately
169
+
before the manifest is published.
170
+
171
+
Cargo invokes cargo-rail as a global observation-only rustc wrapper for this profile, so registry and Git dependency
172
+
compilations are observed with the same exactness as workspace units. Rustc version/help/print probes are excluded
173
+
from the unit set. Before a key can be issued, the multiset of Cargo compiler artifacts must match the raw observed
174
+
crate invocations exactly, every invocation must have observed outputs, and dep-info outputs must survive into the
175
+
declared output manifest. Missing or extra coverage fails closed instead of producing a partial key.
176
+
177
+
On macOS, `sandbox-exec` denies network and defaults filesystem access to denied. The policy admits only the isolated
178
+
run, immutable dependency inventory, exact Cargo/rustc/driver and host sysroot inputs, the observer executable, and the
179
+
small sealed host file set required by the selected toolchain. Other operating systems still get offline Cargo and
180
+
isolated roots, but receive `platform_limited` and no authorizing action key until an equivalent filesystem/network
181
+
boundary is implemented.
182
+
183
+
The result is a versioned manifest of every declared compiler-output file, directory, symlink, mode, digest, and byte
184
+
count under the isolated Cargo build directory. Cargo's internal fingerprints and incremental state are intentionally
185
+
excluded: their layout is unstable, they are never synthesized, and P7 must not restore a whole Cargo build directory
186
+
as if it were valid state. After source, inventory, toolchain, and platform revalidation, every declared output is
187
+
re-read and compared with that manifest immediately before the report is published.
188
+
189
+
| Action class | macOS proof | Other hosts | Current contract |
190
+
|---|---|---|---|
191
+
| Pure current-host `cargo check` for libraries and binaries |`eligible`|`platform_limited`| Two-root action key and output manifest converge. |
192
+
| Pure test, example, and bench compilation via `cargo check --all-targets`|`eligible`|`platform_limited`| Compilation only; no test or benchmark process runs. |
193
+
| Locked crates.io, remote registry-mirror, or Git dependencies | input supported | input supported | Network only during fetch; full metadata/build are locked and offline, and a warm inventory performs zero registry requests. Local directory/source replacement remains ungraduated. |
194
+
| Build scripts, proc macros, native/generated code |`uncacheable`|`uncacheable`| Dynamic runtime/tool inputs are not yet sandboxed as complete action classes; normal execution remains available. |
195
+
| Documentation, actual test execution, linked build/package artifacts |`uncacheable`|`uncacheable`| Output/runtime boundaries are incomplete or not implemented by the profile. |
196
+
| Cross/custom targets, configured linker/runner, repository wrappers, sccache |`uncacheable`|`uncacheable`| Tool/SDK/wrapper coexistence has not passed the per-class proof gate. |
197
+
198
+
Physical checkout roots, unrelated files/packages/environment, and Cargo's mutable cache representation do not affect
199
+
the graduated key. Exact source, resolution, profile, feature, target, flags, environment, toolchain, platform, and
0 commit comments