Open and answer this issue on GitHub.
blocked, safety · opened 2026-11-22 · updated 2026-11-22 · 4 comments
Builds D18 item 6 of ADR-raw-sinks-1, the owner’s decision on “Decision: a Windows option that starts with /” (#2718), alternative C. Follows “Build ADR-raw-sinks-1 D18” (#2694).
let pattern = args[1]
process::run("findstr", [pattern, "log.txt"]) // pattern = "/G:secrets.txt"
builds today: process::is_operand checks only -, and Windows programs read a leading / as an option.
process::is_operand in crates/nikaia-std/src/runtime/raw_sinks.nika: false for a leading - or /, on every target. Its doc comment and help say why.prover_walk.nika, D18 item 3): a literal "--" proves only the - part. An outside element after it still needs the / part, so is_operand or a root.untrusted-option names both characters and the ways through: "./" + name, or a path under a root (D14).raw-sinks = "warn" (D7) refuses a leading / as well.tests/compiler/tests/, each a .nika with its .stdout/.stderr:
/G:x;/x after "--";"./" + name;Root::join path;is_operand-guarded.scripts/solver.nika hands absolute paths, drive.nika, agent.nika, ledgers.nika and so on) and prove each one through a root or "./". Add no new untrusted-option and no trusted:.std::process) and website/safe state the rule.scripts/ and tools/ has no new allow.Brief queued: issue-2722
agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —
Your work order is issue #2722, 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/2722/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/safety/issue-2722.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-2722, Result: partial; items left: 4 (the run-time check under warn, which D7 has not built for D18: #2694) and the rest of 6 (25 NK1308 warnings in scripts/ that the old “–” proved: agent.nika 540-655, commit.nika 154-484, cycle.nika 135/157, status.nika 100, drive.nika +13)
Tokens: input 218, cache read 7524319, cache write 176415, output 61218 Cost: 4.32 USD, time 27 min 2 s, turns 109
Result: partial; items left: 4 (the run-time check under warn, which D7 has not built for D18: #2694) and the rest of 6 (25 NK1308 warnings in scripts/ that the old “–” proved: agent.nika 540-655, commit.nika 154-484, cycle.nika 135/157, status.nika 100, drive.nika +13)
Files: crates/nikaia-std/src/runtime/raw_sinks.nika crates/nikaia-std/std.contracts crates/nikaia-std/src/runtime/lowered.rs crates/nikaia-std/src/runtime/lowered/raw_sinks.rs crates/nikaia-std/src/compiler/prover_walk.nika crates/nikaia-std/src/compiler/prover_scope.nika crates/nikaia-std/src/compiler/prover_state.nika crates/nikaia-std/src/compiler/lowered.rs crates/nikaia-std/src/compiler/lowered/prover_walk.rs crates/nikaia-std/src/compiler/lowered/prover_scope.rs docs/specification/30-nikaia-tooling.md website/safe/index.html scripts/solver.nika tests/compiler/tests/an_argument_that_starts_with_a_slash_is_a_raw_sink.nika tests/compiler/tests/an_argument_that_starts_with_a_slash_is_a_raw_sink.stdout tests/compiler/tests/an_argument_of_process_run_is_a_raw_sink.nika tests/compiler/tests/an_argument_of_process_run_is_a_raw_sink.stdout tests/compiler/tests/the_program_of_process_run_is_a_raw_sink.nika
Commit: raw sinks: an argument of process::run that starts with / is an option too, “–” proves only - (ADR-raw-sinks-1 D18 item 6)
Body: process::is_operand refuses a leading “/” as well as “-“ on every target. In the prover a literal “–” no longer proves what follows it. A path passes as “./” + name or as root.join(name).path().to_text() (D18 item 4); the NK1308 help names both characters and both forms. A name bound by an immutable let to a text starts where its value starts (ProverScope::starts, forgotten when that start’s name is bound again): let kept = f”{repo}/x/{key}” is judged by repo, not by key. scripts/solver.nika no longer refuses its own absolute paths at run time: the guards on values from current_main/current_exe are gone, the key’s files are listed by the shell under repo, and $NIKAIA must not start with - or /. Part III 17, the [allow] key line and website/safe state the rule.
Part: #2722
Tests: new an_argument_that_starts_with_a_slash_is_a_raw_sink (FAILED on the unfixed compiler target/bins/5195bfbd03f4/nikaia, passes now; covers outside /G:x refused, a name after “–” refused, a list with “–” first refused, “./”+name passes, a root-join path passes, Root::Dir(outside).path() refused, a let-bound “./” text passes, a let-bound text that starts with an outside name refused, an is_operand guard passes); re-blessed an_argument_of_process_run_is_a_raw_sink; 81 raw_sink/process_run/option programs pass under –both-settings; solver_targets, solver_fuzz and solver_run pass (all 3 failed after the is_operand change and before the solver.nika fix); test –std –filter operand passes; the lower-std fixpoint holds; cargo fmt –all clean
Gate: green
Deviation: item 6 is done for scripts/solver.nika only (it broke at run time); 25 warnings stay in agent/commit/cycle/status/drive, and the scripts/ total went from 162 to 187 (warn mode, nothing refused at run time; no allow or trusted: added)
Deviation: item 4 is not built: no run-time check of D18 exists under warn yet (#2694 item 4 is open); is_operand, the function such a check would call, now refuses “/”
Found: none
Needs: #2694
Changelog: Raw sinks: an argument of process::run that starts with / counts as an option too | process::is_operand refuses a leading / as well as - on every target, since a Windows program reads /G:file as an option. A literal "--" no longer proves the names after it. Pass a file as "./" + name or as a root’s joined path. A name bound to a text now starts where its value starts (ADR-raw-sinks-1 D18 item 6).
Issue: fits I1-I13; item 4 depends on #2694 item 4 without saying Needs #2694; item 6 listed callers but did not say that the solver guards from ccb905bb9 fail at run time on absolute paths
Owner: none
Comment: #2694 With #2722, process::is_operand refuses a leading “/” too: the D18 run-time check under warn (item 4) should call it, and #2722 item 4 waits for that check
Friction: none
Disk freed: none; target/nikaia-project-tests 1.6G, / 6.4G free of 252G (84% used), no new cache entry over 100 MB
Reviewed: 878993a1d9a810c857c2d94e9829a6e5b30b679296d9a35e00effde74448db59
Pushed: local 653abd8bb92617e291dda18f88f53ceaf0917752
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UVxJDvbkNUUMs8HdjJ8ixV
scripts/solver.nika. The is_operand guards from ccb905bb9 called exit(2) on the script’s own absolute paths (from current_main/current_exe), and all 3 solver tests failed. Tracing why each guard existed took about 15 turns. It turned up a prover gap: a let-bound f-string was judged as a whole, not by its start. On top of that, compaction made me dig the old test command back out of the transcript.ProverScope is copied (unknown, rebind, blind). Also the Root::join/.path() API, and that Root::Anywhere.join("/abs") gives ".". And the fact that $NIKAIA has no setter in the repo.--both-settings.test --std --filter operand, the lower-std fixpoint, pre-push, and two counts of warnings across scripts/.nikaia run of a test file, which run refuses.scripts/ and tools/ for its callers, and run the tests of each caller that guards with it”.broke I5: item 6 lists callers but has no probe of the run-time effect. The solver guards exit on absolute paths, which the new / rule turns into a regression.broke I3: item 4 needs the D7 run-time check (#2694 item 4, still open), but the issue has no Needs #2694.rules-gap: item 6 is scoped as “our callers”, but it is about 37 sites across 6 scripts, too much for one run alongside items 1–5.knowledge: Lowering | an optional value in compiler .nika takes scope.map[k]?.clone() ?? fallback after a contains_key check; ?? null and String? = null locals inside loops draw NK1185/NK2105.| Fact: Core | nikaia run tests/X.nika refuses a test program; bless with nikaia test --project tests/compiler --filter X --bless. |
| Fact: Self-hosting | fs::Root::Anywhere.join(p) with an absolute p gives ".", so an absolute path from outside cannot be proved through a root. |
| Fact: Raw sinks | key files: prover_walk.nika (raw_sink_option_start, raw_sink_first_part, raw_sink_option_pushed) and prover_scope.nika (starts/start_names, new in 653abd8b). |
| Fact: Raw sinks | measure: run nikaia check on each scripts/*.nika and count lines matching may read as an option. Total 162 before #2722 and 187 at 653abd8b (2026-11-22). The rest are in agent/commit/cycle/status/drive and come from "--" no longer proving. |
Generated by Claude Code
Driver: not queued, this issue waits for #2694, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code
Driver: not queued, this issue waits for #2694, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code