let name: OsString = "Path" draws NK1135 “There’s no type called…Open and answer this issue on GitHub.
blocked, bugs · opened 2026-11-19 · updated 2026-11-20 · 8 comments
Filed by the driver from the Found: of the run of issue-2304 (#2304) (owner, 2026-11-06).
let name: OsString = "Path" draws NK1135 “There’s no type called OsString”, so process.rs’s merged test (OsString pairs, its Windows half) stays Rust; no decision yet
The Found does not say how sure its cause is (docs/issues.md I7): a cause it names is a hypothesis, unknown until checked. The second item checks it (nikaia run scripts/where.nika, a probe, callgrind) before anything is built on it; a cause shown false is answered wrong I7: ... in the report.
develop first: the run that wrote it may have used a binary older than the tip, so it may be fixed already (#1822: #1788 was filed from a probe a fix under #1754 had already made pass). A probe that passes there names the commit that fixed it (git log -400 --grep by topic, since a fix often lands under another issue’s number), and the run builds only a tests/compiler/tests/ test that pins it (docs/issues.md I13).std defect with a probe (nikaia run scripts/probe.nika -- SNIPPET; a lowered file that differs, with an uncached lower-std of a git archive HEAD copy, NIKAIA_LOWER_CACHE_SALT fresh and --sysroot COPY/crates, its lowered/ diffed against the copy’s, never the shared working tree’s, #1793), a defect in docs/, guide/, website/ or scripts/ (a stale example, a wrong rule) with the command or check that shows it; a behaviour the code does on purpose (name the function or ADR) closes it as by design. The Found line may lack them (#1710): the commit message, or the report’s Body: when closed, gives the probe or check with its expected output, the ADR or Part I-III section that says so, and its actual output (docs/issues.md I5, I6), and the cause, file and function, traced or suspected (I7).std defect in the compiler, a stale page example or rule in its page or docs/ file, a script defect in the script. Add a test in tests/compiler/tests/ unless a check that already runs turns red on it (name it: pre-push’s page-examples for guide/ and website/, check-adr-refs.nika for a docs citation).The probe or check gives the expected output the first item names from its ADR or Part I-III section, and a tests/compiler/tests/ test (or the named check) that failed on the unfixed tree is green; or the probe already passes on develop and a test pins it, naming the commit that fixed it; or the issue is closed as by design, naming the function or ADR.
Generated by Claude Code
Decided (supervisor, 2026-11-19): an obvious extension of the type map, written as Part III 15.2 in 6fca29b4.
The test needs a windows flag, not an OsString in Nikaia. OsString is left out on purpose (Part I 2.2, NK1135) and stays out. The whole Windows rule is same_name(a: &OsStr, b: &OsStr, windows: bool). A Nikaia String is UTF-8, and every platform’s OsStr holds UTF-8, so it can cross to an &OsStr parameter for free (OsStr::new). The way back (an OsStr or OsString returned) is not mapped, because it may hold text that isn’t UTF-8.
The Unix half is already a program: process_a_childs_environment_is_cleared_removed_then_set.nika.
To build
&OsStr accepts a Nikaia String and lowers the argument as std::ffi::OsStr::new(<text>.as_str()), or whatever the lowered Text offers to get a &str. The describer (nikaia describe crate) writes &OsStr as String. Test: a tests/compiler program or std test block that calls such a function.same_name to pub(crate) and describe it in crates/nikaia-std/std.contracts with pub = false, as (a: ref String, b: ref String, windows: bool) -> bool sync.runtime/*.nika file (for example runtime/env.nika) that checks:
same_name("Path", "PATH", true) and same_name("path", "PATH", true) hold;same_name("Path", "PATH", false) does not hold;same_name("PATHX", "PATH", true) does not hold.names_compare_without_case_on_windows and, if nothing else uses them, its helpers pairs and the test module.Done when process.rs has no #[test] left, nikaia test --std passes, and the lower-std fixpoint is clean.
Generated by Claude Code
Brief queued: issue-2314
agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —
Your work order is issue #2314, inlined below with its comments. There is no
brief written around it: plan your own steps from its To build list, build
them in order, commit after each finished step, and end when its Done when
holds (or at the limits of builder.md, reporting what is left). The
facts in your prompt are Core of docs/builder-facts.md; more on a topic:
nikaia run scripts/syntax.nika -- KEYWORD, a probe: nikaia run scripts/probe.nika -- SNIPPET.
Measure the issue against docs/issues.md while you work: what it lacked,
what was wrong in it. That answer goes into the report’s Issue: field.
A finding, a changed plan or a finished item also goes into the issue as a
comment (gh api repos/Nikaia-Foundation/Nikaia/issues/2314/comments -F body=@file,
ending with the Claude Code footer), rule I13.
develop in the main checkout; other agents’ uncommitted files are not yours: never touch or stage them.target/fast/nikaia run scripts/commit.nika -- REPORT (it adds exactly the report’s Files:); the driver pushes.cargo build --profile fast -p nikaia, lower-std and its fixpoint when a tools/*.nika changed, cargo fmt, cargo clippy --all-targets -- -D warnings, nikaia run scripts/pre-push.nika, the tests the issue names and the ones your change touches.CHANGELOG.md, badges and NK codes are the supervisor’s. New tests in Nikaia only: a Rust test file an older issue names is built as a tests/compiler/tests/ program, no Deviation: and no Issue: point (I9, #1671).Body:. Found: is only for what lies outside the area, cannot be fixed this run or needs a decision; the driver files it as an issue.std or the toolchain lacks stops the work, unless an ADR or Part I-III refuses it (name it): Result: blocked, Found: the gap with a probe, Needs: supervisor decision.NIKAIA_CACHE_LIMIT=2G; at the end delete your own clone’s target/ and target/release/nikaia-scratch.suspected, or does not mark (docs/issues.md I7), is a hypothesis: run the check that settles it (nikaia run scripts/where.nika -- NAME, the probe with a trace, callgrind for a cost) before you build on it (owner, 2026-11-16). Shown false: say so in Issue: as wrong I7: <what the check showed> (the driver comments it on the issue) and follow the real cause.Result: partial with what you ruled out, the probe, and the suspected file and function./home/user/Nikaia/docs/briefs/ci/issue-2314.md.report.md)Fields: Result, Files, Commit, Body (optional), Fixes, Pushed, Tests, Gate, Deviation, Found, Needs, Changelog, Issue, Owner (a question for the owner), Comment (#N <text>, what to say on another issue; the driver posts it, one line each), Friction, Disk freed, and last Attribution: with your commit trailer lines below it.
Result:, Gate: (green or red <check>), Deviation:, Found: and the other fields with nothing to say hold the bare word: done, none. Anything after it reads as content.Result: done only when the issue’s Done when holds; partial with the items left otherwise.Deviation: only for an item of the issue built otherwise than written, or not built. Found: only for a defect outside your area, or one this run cannot fix: one defect per Found: line, with its probe and the output it gives, only the shapes that fail today, and the suspected file and function or cause unknown (#1695); a by-design behaviour is none (#1677). A correct program your own change refuses (a fail-closed check’s false refusal) is no Deviation: but one Found: line per shape, with its probe (#1680). Everything else goes into Body:; how you verified goes into Tests:.Issue: by docs/issues.md, How a run judges its issue: complete, or broke I<n>: ..., rules-gap: ..., wrong I<n>: ..., joined with ;; a point your own commit built gets (built) after its kind (rules-gap (built): ...), and the driver does not file it. complete is the bare word: prose after it (complete; the earlier runs ...) is filed as an improvement issue (#1931); history or a note for your own issue goes into Body: or Comment: #N <text>.done <sha>, report <path> (or BLOCKED: ... / PUSH REJECTED ...).Generated by Claude Code
Run: issue-2314, Result: blocked
Tokens: input 34, cache read 733269, cache write 48304, output 8887 Cost: 0.75 USD, time 1 min 44 s, turns 17
Result: blocked
Files: none
Commit: none
Body: The decision (comment 2026-11-19, Part III 15.2 in 6fca29b4) has the describer write &OsStr as String and std.contracts describe same_name as (a: ref String, b: ref String, windows: bool) -> bool sync. That leaves the lowering nothing that says the Rust parameter is &OsStr. A contract entry’s fields are signature/sync/panics/touches/pub/views/places/keeps/throws/… and none records a parameter’s Rust type. The emitter does not read the Rust source (D25 keeps only hashes in crate.derived). So a ref String argument lowers as it does for &str: runtime/lowered/raw_sinks.rs:15 has html::Raw::escaped("a < b & c"). Lowered the same way, process::same_name("Path", "PATH", true) would be rustc E0308 (expected &OsStr, found &str). Turning every text argument into AsRef::as_ref(x) would break generic impl AsRef<_> parameters, so that is not a way out. Nothing was built and no build was run.
Fixes: none
Pushed: none
Tests: none run; nothing changed
Gate: green
Deviation: none
Found: The ledger has no way to say a described Rust parameter is &OsStr, so Part III 15.2’s &OsStr bridge cannot lower: std.contracts (a: ref String, ...) for crate::process::same_name(a: &OsStr, b: &OsStr, windows: bool) lowers its call like html::Raw::escaped("a < b & c") (runtime/lowered/raw_sinks.rs:15), i.e. same_name("Path", "PATH", true), which rustc refuses with E0308; expected per Part III 15.2 same_name(std::ffi::OsStr::new("Path"), ...); two candidate records: a ledger type ref ffi::OsStr that the checker lets a String fill, or an entry field naming the &OsStr parameters (e.g. os_text = ["a", "b"]) written by translate in signature.nika and read by the emitter’s argument lowering; no decision yet
Needs: supervisor decision: how a contract entry records that a parameter’s Rust type is &OsStr (a ledger type such as ref ffi::OsStr, or an entry field next to a ref String signature), since the lowering of #2314’s bridge depends on it
Changelog: none
Issue: broke I3: step 1 of the decision says the describer writes &OsStr as String, but it does not say where the lowering learns that a parameter is &OsStr once the signature says ref String, and no contract field holds it
Owner: none
Comment: none
Friction: none
Disk freed: none (no build, no tests run)
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UVxJDtmukJNapbMLmZMzTV
std.contracts fields, signature.nika, describe.rs and ADR-rust-boundary-1 D24-D28, before I could see that no record carries it.translate in compiler/signature.nika;html::Raw::escaped("a < b & c") already shows how a text argument crosses. Nothing was wasted, but I never ran the stale NK1135 probe on develop (To build’s first item); it is by design under Part I 2.2 anyway.ready. It should name the record the emitter reads, or the builder should be told to check that first. This run spent about 25 turns finding that out.broke I3: the decision’s step 1 says the describer writes &OsStr as String, but not where the emitter learns a parameter is &OsStr. No contract field holds that.knowledge: Lowering | A contract entry carries only Nikaia types (signature, views, keeps, ...), so the emitter can't tell Rust parameter types apart that map to the same Nikaia type.Fact: Lowering | A ref String argument to a described Rust function lowers as plain &str (runtime/lowered/raw_sinks.rs: html::Raw::escaped("a < b & c")), so any Rust parameter type other than &str/&String needs its own record in the contract before it can be bridged.Fact: Core | The describer's Rust-to-ledger type mapping is translate/result_of in crates/nikaia-std/src/compiler/signature.nika, not describe.rs.Generated by Claude Code
The report of the run of issue-2314 (#2314) judged this issue against docs/issues.md; the author fixes the issue by the rule it names (How a run judges its issue):
&OsStr as String, but it does not say where the lowering learns that a parameter is &OsStr once the signature says ref String, and no contract field holds itGenerated by Claude Code
Decided by the supervisor (2026-11-19), for the builder’s question of how the ledger says a described Rust parameter is &OsStr: candidate B.
The Nikaia type stays ref String (Part III, &OsStr as a parameter -> String). A contract entry names its &OsStr parameters in a new key, os_text = ["a", "b"]; the row is in the contract field table of docs/specification/30-nikaia-tooling.md (commit 49ea5d10). No new Nikaia type, and no blanket AsRef::as_ref, which breaks generic parameters.
To build:
translate in crates/nikaia-std/src/compiler/signature.nika writes os_text for each &OsStr parameter of the Rust signature; the ledger reader keeps it.os_text as std::ffi::OsStr::new(x).std.contracts: process::same_name’s entry gets os_text = ["a", "b"].#[test] becomes a test of same_name in Nikaia, plus a test that a described &OsStr parameter takes a String (fails before step 2).Status stays ready; re-queued in the ci lane.
Generated by Claude Code
This corrects my earlier comment. This issue does not go back into the queue as it is: it is blocked and waits on the build of the os_text decision, The ledger has no way to say a described Rust parameter is &OsStr (#2351), which now holds the decision and its To build list. Once #2351 closes, the driver re-queues this issue.
Generated by Claude Code
Driver: not queued, this issue waits for #2351, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code
Open question moved here from the closed improve issue #2352 (Found: #2351): how does a contract entry record a &OsStr parameter — as a ledger type ref ffi::OsStr, or as an entry field such as os_text?
Generated by Claude Code