Open and answer this issue on GitHub.
ready · opened 2026-10-28 · updated 2026-11-02 · 2 comments
agent: builder model: opus max_turns: 100 budget_usd: 20 —
Owner, 2026-10-28: crates/orchestrator moves into Nikaia completely; a missing std entry is no reason for Rust to stay, it is work to plan. Nothing that exists in std moves (owner’s addition, same day); these are new thin entries over Rust, the kind of std that stays Rust by design. Plan: docs/bootstrap.md, section 1, crates/orchestrator. The spawns are #920.
Checked absent in crates/nikaia-std/std.contracts (2026-10-28): any digest but hash::crc32c; any environment read; any file lock; fs::Metadata has only len, is_dir, is_file; time has only the monotonic clock (ADR-368).
| Entry (decided signature) | Needed by (crates/orchestrator/src/) |
Rust under it |
|---|---|---|
hash::sha256_hex(data: ref Vec[u8]) -> String sync: lowercase hex, 64 characters |
cache.rs:46 sha256_hex, :382-418 KeyBuilder |
sha2 (already a dependency of the toolchain) |
env::var(name: ref String) -> String? sync: null when unset, empty or not Unicode; env::temp_dir() -> fs::Path sync |
cache.rs:638-663 user_cache_dir, :742 limit, project.rs:562 cargo_binary |
std::env |
fs::lock(path: ref fs::Path, root: ref fs::Root; exclusive: bool = false, create: bool = true) -> fs::Lock? throws: a non-blocking flock; null when another holds it; held while the fs::Lock lives (released by its cleanup); create opens read/write without truncating, as open_lock does. Where the platform has no flock: always granted, as today |
cache.rs:812-843 use_entry/hold/open_lock, :975-994 cargo_holds, :996-1031 mod lock |
rustix::fs::flock (no unsafe in nikaia-std, ADR-218 D4) |
fs::Metadata::modified(self) -> time::Duration sync (since the Unix epoch; zero where unknown), fs::Metadata::links(self) -> u64 sync, fs::Metadata::file_id(self) -> (u64, u64)? sync (device and inode; null off Unix); time::since_epoch() -> time::Duration sync (the wall clock) |
cache.rs:1142 used_at, :962-973 first_link, :1025 the one-hour rule off Unix |
std::fs::Metadata, std::os::unix::fs::MetadataExt, SystemTime |
The process-wide HELD/ADDED statics (cache.rs:800-803) need no entry: in Nikaia the held locks and the added flag are a value the driver keeps and hands to settle.
hash::sha256_hex: hash.rs, std.contracts, Part III’s std table; test tests/compiler/tests/hash_sha256.nika (+ .stdout, the digest of "one\n" as crates/nikaia/tests/it/cache.rs has it).env::var, env::temp_dir: a new module env.rs, std.contracts, Part III; test with an env: given to a child through process::run, or nikaia test’s own environment.fs::lock and fs::Lock: fs.rs, ADR-319 amendment (a lock is a capability on a path under a Root), std.contracts, Part III; test: a second shared lock is granted, an exclusive one beside a shared one is null, dropping releases.fs::Metadata::modified, links, file_id, time::since_epoch: fs.rs, time.rs, ADR-319 and ADR-368 amendments (the wall clock is not the monotonic one: say why both), std.contracts, Part III; test over a file the program writes.Each step its own commit; the version raises are the supervisor’s (report a Changelog line). Then the orchestrator moves (O1 cache.rs, O2 project.rs, see the plan) have no Rust left but the toml reading of the compiler’s manifest.rs adapter.
The report form of docs/architect.md, Briefs and reports.
Architect, 2026-10-31: steps 1-2 are briefed as docs/briefs/s922-sha256-env.md (main lane, after BT, before GR).
hash.rs, not taken from sha2. The table above says sha2 is “already a dependency of the toolchain”. It is a dependency of nikaia and orchestrator, but not of nikaia-std, which every user program links (crates/nikaia-std/Cargo.toml, ADR-002 D4). hash.rs already copies rustc-hash’s byte hash for the same reason. The NIST vectors in a Nikaia test are the oracle.env::var and env::temp_dir carry no touches line. Part III’s contract table says an absent touches means touches everything, so an environment read keeps its order against every effect. That is correct, and it needs no new touch kind.env::var hands back null for unset, empty or not Unicode, as cache.rs:742 and project.rs:562 treat empty.sha256_hex methods in tools/ (sysroot_cache, project_settings, project_members, modules).Steps 3-4 (fs::lock, the Metadata/wall-clock entries) stay open.
Generated by Claude Code
Step 4 (fs::Metadata::modified, links, file_id, time::since_epoch) is briefed as docs/briefs/s922b-metadata-times.md, first in the main batch (K3b needs modified). Step 3 (fs::lock) stays open for O1.
Generated by Claude Code