nikaia check tests/other.nika, run in a package user with…Open and answer this issue on GitHub.
blocked, bugs · opened 2026-11-18 · updated 2026-11-22 · 3 comments
Filed by the driver from the Found: of the run of issue-2135 (#2135) (owner, 2026-11-06).
nikaia check tests/other.nika, run in a package user with [dependencies] pk = { path = "../pk" } and a src/main.nika, where tests/other.nika is use pk / fn main() throws { println(f"{pk::secret()}") }, gives NK1341 “There’s no dependency called pk” on HEAD and on the old binary. It should resolve the manifest’s dependencies as nikaia test does for the same file. Cause unknown; suspected: check’s member resolution for files outside src/ in crates/nikaia/src/project.rs.
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.py 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
Brief queued: issue-2145
agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —
Your work order is issue #2145, 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/2145/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/bugs/issue-2145.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-2145, Result: blocked
Tokens: input 36, cache read 715348, cache write 38227, output 6495 Cost: 0.61 USD, time 1 min 17 s, turns 18
Result: blocked
Body: check and test agree by construction. A test program is built as its own package whose manifest names only the tested package: project_tests_program_manifest (project_tests.nika:254, read by packages_of_file in project.rs) for check, and the [dependencies] text nikaia test writes (project_tests.nika:895, 1057). Neither copies the package’s own [dependencies] (traced). ADR-269 D22 says only that a test program “may use the package, as an integration test does”, and says nothing about the package’s dependencies.
Pushed: none
Tests: probe run on $NIKAIA_OLD (HEAD c9c51bddb): nikaia check tests/other.nika and nikaia test both give NK1341; nothing built or committed
Gate: green
Deviation: none
Found: A test program tests/NAME.nika cannot use a dependency of its own package (no decision yet). Probe: package pk (nikaia.toml [package] name = "pk" version = "0.1.0", src/lib.nika pub fn secret() -> i64 { 42 }); package user (nikaia.toml [package] name = "user" version = "0.1.0" [dependencies] pk = { path = "../pk" }, src/main.nika and tests/other.nika both use pk / fn main() throws { println(f"{pk::secret()}") }, tests/other.stdout 42). In user/, nikaia check src/main.nika gives Checked src/main.nika, but nikaia check tests/other.nika and nikaia test both give error[NK1341]: There's no dependency called pk. at tests/other.nika:1:1, with help “Add it to the project’s [dependencies]”, where it already is. This is by construction (traced): the test program’s manifest, project_tests_program_manifest and the [dependencies] text in project_tests.nika:895/1057, names only the tested package. ADR-269 D22 (“may use the package, as an integration test does”) does not say whether a test program also reaches the package’s [dependencies], as a Cargo integration test does. Expected once decided: either 42, or a refusal whose help does not tell the user to add a dependency that is already there.
Needs: supervisor decision
Changelog: none
Issue: wrong I5: nikaia test refuses the same file with the same NK1341, so the Found’s expected result (“as nikaia test does”) has no reference run behind it; wrong I7: the cause is not check’s member resolution in project.rs: both commands deliberately build a test program under a manifest that names only the package (project_tests_program_manifest)
Owner: none
Comment: none
Friction: none
Disk freed: none (target/nikaia-project-tests 560M; / 17G free; no new cache entry over 100 MB)
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UVxJDutPTwP5Xj5HkGuidk
main.rs through single_file, explained and packages_of_file to project_tests_program_manifest. That took about 6 reads. Running nikaia test on the probe settled the question in one turn, so I should have run it first.project_tests_program_manifest and of the manifest text nikaia test writes (project_tests.nika lines 895 and 1057), and ADR-269 D22. The issue could have named all three.check on src/main.nika and on tests/other.nika, nikaia test on the probe package, greps of the spec and ADR-403, and the disk figures. The bare check with no file argument was wasted (it only printed a usage error). Nothing was built.nikaia test) on the same probe first; if it refuses too, the expected result has no basis and the issue is a decision.”wrong I5: “as nikaia test does” is false, since nikaia test gives the same NK1341.wrong I7: the suspected project.rs member resolution is not the cause. A test program’s manifest names only the package, by construction (#972).broke I6: no ADR is cited for the expected result. ADR-269 D22 is silent on the package’s dependencies, so this should have been filed as decision, not ready.broke I5: the probe was prose, not files written out whole; I had to rebuild the manifests by guessing.| Fact: Core | nikaia is not on PATH in the builder shell: call target/fast/nikaia or $NIKAIA_OLD (nikaia run scripts/where.nika failed with “command not found”). |
| Fact: Probes | A test program tests/NAME.nika is built under project_tests_program_manifest (project_tests.nika), which depends only on the tested package and not on that package’s [dependencies], for check and test alike. |
Generated by Claude Code
Driver: not queued, this issue waits for #2686, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code