Open and answer this issue on GitHub.
blocked, bugs · opened 2026-11-18 · updated 2026-11-19 · 14 comments
Filed by the driver from the Found: of the run of issue-2082 (#2082) (owner, 2026-11-06). Title shortened by the supervisor (2026-11-19); the driver had set the Found line as the title.
test = false while a #[test] is left in nikaia-std (“The std crate’s Rust unit tests move into Nikaia, so nikaia-std has no cfg(test) build” (#2082)).tests/compiler/tests/; a pure branch becomes a test block (ADR-403 D3) of a function moved into runtime/*.nika.#[test] with a “Kept as Rust (#2082)” comment.test = false is set for nikaia-std once no #[test] is left; then the one-profile build (#2083).Waits for #2233 and the open sub-issues.
no program or test block can reach these Rust tests, so they stay #[test]: build_time.rs (needs a step budget below the 10^10 default, comptime_run::Bounds, which no program sets); rt/exit.rs (the LEAVING flag of the at-exit allocator); rt/library.rs (thread reuse for C library _async calls, needs a C caller); either_text.rs (is_view is not observable); rt/worker.rs (I/O workers and the drain deadline); concat.rs tests 2-3 (buffer pointer reuse, as_ptr); count.rs test 3 (of("text") passes through, no emitter site writes count::of around text)
Every sub-issue is closed, no #[test] is left in crates/nikaia-std, and #2082 can set test = false.
Question. Some hand-written #[test]s in nikaia-std check runtime internals that no Nikaia program and no test block can observe. What happens to them, so that test = false (the Decision of “The std crate’s Rust unit tests move into Nikaia, so nikaia-std has no cfg(test) build”, #2082) can hold?
Affected so far (from the run of #2082; about 236 tests in 28 files are not probed yet, so the list may grow):
comptime_run::Bounds)._async calls.is_view.of("text").Options
#[test] and cfg(test). They are registered with the dispatcher that nikaia test --std already runs (the 94 lowered test blocks), so they are compiled into the release binary like those.
test = false holds, no second compile.#[test]. The cfg(test) build of all of nikaia-std stays. #2082’s goal fails for the largest crate.Recommendation: a). It is the only option that keeps both the coverage and the single compile. Before a test goes into the hook, the run checks whether a program does reach it after all. For example, build_time.rs could be reached if a budget can be set.
Until the owner decides, #2082 continues with the 28 files not yet probed. Tests found unreachable stay #[test]; step 4 (test = false) waits for this decision.
Generated by Claude Code
More cases from the #2082 run of 2026-11-18 (2f613638). The driver filed them as their own issues (#2104, #2105, #2106); they are closed as duplicates of this one, and the decision here covers them:
supervision.rs: the_default_policy_grows_and_gives_up and a_healthy_run_starts_a_new_cycle. supervisor::Backoff has no decide a program can call (NK1171). The default policy shows only after 60 s of uptime or 300 s of crashes (#2104).process.rs: names_compare_without_case_on_windows. No Unix program reaches it, and CI runs no Windows target (#2105).abort.rs: an_operand_prints_where_it_can (Opaque operand, None) and an_unknown_line_is_not_guessed_at. Every operand a claim shows is printable, and every line of a program is in its table (#2106).cli.rs: impl Word for u128 lost its test line. Part I 2.2 has no u128, so no program can reach it (the run’s Deviation).Generated by Claude Code
From the report of the run of issue-2082 (#2082):
kept as Rust because no program reaches them (#2082 run): num to_usize/to_isize; map a_text_key_hashes_as_its_text, the_order_is_hashbrowns, colliding_keys_are_told_apart and entries_drain_and_retain (HashMap remove/retain missing); bytes a_clone_shares_the_buffer, a_vec_is_handed_over (buffer address), a_copy_is_asked_for (to_vec/collect not in Bytes’s contracts); html text_that_needs_nothing_is_returned_unallocated, escaped_text_becomes_markup (Raw::escaped not in contracts); hash’s 8 FxHasher tests
Generated by Claude Code
Decided (owner, 2026-11-18) for concat.rs’s “an owned left side keeps its buffer” and “a borrowed left side reuses the right”: a test compares mem::allocations() (and mem::usage()) before and after the operation; no address of a value is readable. Recorded in ADR-400 (91361407); the build is “std::mem: allocations() and usage() per thread (ADR-400)” (#2112), which also moves the two tests. Raw addresses and writing through them with unsafe stay a later question for std::backend::<arch>.
Generated by Claude Code
Supervisor, 2026-11-18: four more items sorted; none needs a new tool.
a_step_counts_and_a_frame_leaves_the_path): reachable today through Part II’s comptime(steps: N). Probe: fn spin(n: int) -> int { let mut i = 0 while i < n { i = i + 1 } return i } / comptime(steps: 100) TOTAL = spin(1000) draws NK1152 “TOTAL took more than 100 steps” with “It was in TOTAL > spin”; with steps: 100000 it prints 1000. The test becomes a .nika with .stderr: one comptime that calls a function that returns and then one that spins, so the path names only the open frame (TOTAL > b, never TOTAL > a > b), and a budget exactly at and one under the steps needed.is_view): by ADR-400 D1. A view of text (trim, a line of lines()) is taken with mem::allocations() unchanged; text of its own (f"{x}!") raises it. Waits for “std::mem: allocations() and usage() per thread (ADR-400)” (#2112).the_drain_frees_again): by ADR-400 D2. A program built with skip-free-at-exit:on whose unjoined task runs in the drain allocates and drops a list there and prints whether mem::usage() fell back. Waits for #2112.of("text") passes through): no longer reachable on purpose. The emitter writes count::of only where the checker resolved a std entry that takes a count (emit_core_args.nika:626-632, “never a function of the program’s own that is called repeat”), and a count is always an integer. The identity for non-integers and its test are deleted, not moved; the builder confirms no emitter site passes anything but an integer.Left for a decision: rt/library.rs (thread reuse for a C caller’s _async calls) and rt/worker.rs (the drain deadline).
Generated by Claude Code
supervision.rs, the two Backoff tests: no new tool is needed. The owner decided on 2026-11-18 to move Backoff into Nikaia as supervisor::Backoff(); a program then calls its decide directly. Filed as “std’s default restart policy supervisor::Backoff() is written in Nikaia, its tests too” (#2118).
Generated by Claude Code
Decided (owner, 2026-11-18) for process.rs names_compare_without_case_on_windows: no new tool. The environment assembly moves into Nikaia with a windows input and a Nikaia test calls it directly with Windows = yes: “Child environment assembly in Nikaia, Windows case tested directly” (#2119).
Generated by Claude Code
Owner, 2026-11-18, for every remaining test of this issue: a branch no program reaches is moved into a pure Nikaia function with the deciding condition as an input, and a Nikaia test calls it directly. Where that is not enough, the owner proposes to consider again a way to call std’s Rust from Nikaia; such a case comes back to the owner first.
abort.rs: “Abort line lookup in Nikaia, unknown lines and type-parameter operands tested from Nikaia” (#2120). The Found’s claim for an_operand_prints_where_it_can is wrong: an operand of a type parameter is left out, a program reaches it.build_time.rs: “Build-time step budget and call path tested from Nikaia” (#2121). The Found’s claim is wrong: comptime(steps: …) sets the budget, and NK1152 names the path.Generated by Claude Code
Decided (owner, 2026-11-18) for rt/worker.rs (the drain deadline): no new tool. A Nikaia test runs a child program whose I/O worker does not finish before the drain deadline and pins what the runtime does then: exit code 70 and its message on stderr. The Rust test goes once that test passes.
Generated by Claude Code
From the report of the run of issue-2188 (#2188):
Two layout tests in crates/nikaia-std/src/error.rs stay Rust, marked “Kept as Rust (#2082)”: a_result_around_an_envelope_is_as_small_as_around_the_bare_error (size_of of Result/Thrown/Site/Raised) and a_site_alone_is_the_tagged_word (a site alone is the tagged word, no cold box). No program sees them and no test block can name size_of. This is a gap with no decision yet (from #2188).
Generated by Claude Code
From the report of the run of issue-2189 (#2189):
lock.rs keeps update_appends_without_copying_the_value and access_reads_a_large_value_in_place under a comment that points here (961bd9b6): they check that a door does not copy, by the buffer’s address, which no program can observe
Generated by Claude Code
From the report of the run of issue-2196 (#2196):
Gap, no decision yet: two layout tests of crates/nikaia-std/src/error.rs stay Rust (#2196). They are a_result_around_an_envelope_is_as_small_as_around_the_bare_error (size_of of Result/Thrown/Site/Raised) and a_site_alone_is_the_tagged_word (a site alone lives in the tagged word, no cold box). No program can see either, and no test block can name size_of.
Generated by Claude Code
From the report of the run of issue-2215 (#2215):
Gaps left by #2215 (each kept as Rust with a “Kept as Rust (#2082)” comment): abort.rs an_unknown_line_is_not_guessed_at (the emitter maps only lines it writes, no program reaches an unknown one); num.rs a_usize_and_an_isize_convert_toward_zero_or_stop (Part I 2.2 has no usize); concat.rs a_borrowed_left_side_reuses_the_right (no program’s text reaches Plus
Generated by Claude Code
“A package’s Nikaia code and test blocks call the package’s own Rust” (#2233) is built and pushed (0.0.1468). The 24 std tests that were kept as Rust now move through that bridge in “std’s tests kept as Rust become test blocks that call std’s own Rust through the bridge” (#2304). The rt/exec.rs test moves in #2209, which waits for #2208. All of them are queued in the CI lane. This issue stays blocked until they are done.
Generated by Claude Code