Open and answer this issue on GitHub.
selfhosting, performance, blocked, ci · opened 2026-11-17 · updated 2026-11-21 · 5 comments
Part of #125 Found while #1913 (owner’s decision, 2026-11-17: option A, move the passes into Nikaia first; no new Rust plumbing as #1277 allowed)
Facts: Ledger and bounds proofs
Each of the seven contract passes gets a per-function entry, and what is left of their Rust adapters in crates/nikaia/src/contracts/ moves into Nikaia. The incremental ledger needs each pass to run per function, with facts it can store: “lower-std: incremental ledger, facts per function and per unit recomputed only when their inputs change” (#1308) and “a per-function or per-unit ledger store that outlives one lower-std process” (#1913).
Corrected 2026-11-21: the first version of this issue said the passes are Rust. They are not. On develop 7ca8390c, the logic of all seven is already Nikaia (crates/nikaia-std/src/compiler/{locks,panics,keeps,touch,sync,throws,tether}.nika). The .rs files are adapters: they hand over the views, the holes and the ledger, and write the column back. Each pass has only a whole-package entry.
ADR-100 D7 (docs/specification/adr/adr-100.md, owner, 2026-11-17) decides the per-function entry. It returns one function’s final column from the stored columns of its callees. Callees go first. An SCC is one unit, with the fixpoint inside it only. The whole-package entry stays as the reference.
One pass per issue. All of them wait on “a tests/compiler program cannot call a compiler pass entry” (#1983), which gives the equivalence test its route. Locks goes first, to find the missing forms early; the other six wait on it.
lower-std leaves lowered/ unchanged.This issue is closed by hand once the last sub-issue is closed.
Brief queued: issue-1982
agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —
Your work order is issue #1982, 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/1982/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-1982.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-1982, Result: blocked
Tokens: input 36, cache read 1014240, cache write 61580, output 10234 Cost: 0.94 USD, time 4 min 32 s, turns 18
Result: blocked
Pushed: none
Tests: none run (nothing changed); built target/fast/nikaia from HEAD e292b297 to probe
Gate: green
Deviation: none
Found: no decision yet: a tests/compiler program cannot call a compiler pass entry, so the To-build test “the per-function entry gives the same facts as the whole-package entry” has no means. Shapes tried on target/fast/nikaia built at e292b297: probe.nika use compiler::locks draws NK1337 (“use takes a package name only”); use compiler in a single file draws NK1339 (“no dependencies”); a project with [dependencies] compiler = { path = "/home/user/Nikaia/crates/nikaia-std/src/compiler" } and use compiler / compiler::locks::with_owner("A", "f") stops with “Error: reading …/compiler/nikaia.toml: No such file or directory”. Expected: a decided route (a nikaia flag or env var that runs both entries and prints the facts, or the compiler .nika made a package tests may depend on). Cause: by design today, the compiler .nika is lowered into nikaia_std::compiler and is no package.
Found: no decision yet: what “an entry for one function that returns that function’s facts” (#1982, #1308, #1913) means for the fixpoint passes (locks least fixpoint, sync greatest, throws/touch/panics/keeps over the call graph) is not specified: either the function’s local facts before the fixpoint (locks.nika Reaches: itself + callees, recomputed when the body changes, the whole-package entry runs locking_of over them; then the two agree by construction and the test is vacuous), or the function’s final column given the stored facts of its callees (one transfer step: theirs_of over a ledger holding the others, agreeing with the whole package only outside recursive cycles, which need the fixpoint). The two give different stored shapes for the incremental ledger.
Needs: supervisor decision on the per-function entry’s result for a fixpoint pass, and on the route by which a tests/compiler program compares it with the whole-package entry
Changelog: none
Issue: wrong I7: the seven passes are already Nikaia (locks.nika 454, sync.nika 579, throws.nika 889, touch.nika 439, keeps.nika 2541, panics.nika 476, tether.nika 445 lines; locks moved under 00cabd66 “contracts/locks: the column’s assembly and its write into the ledger move into Nikaia”); the 1651 Rust lines are adapters (locks.rs 55 lines is only the hand-over of views and holes; panics.rs keeps the bounds proving, crate::proofs::in_parallel and the ledger writes); broke I6: the per-function entry’s result and the test’s route are undecided and need a decision paper, so the issue is decision, not ready; broke I11: no time figure or split by pass for an issue that serves the incremental ledger
Comment: #1913 #1982’s run found the seven contract passes already in Nikaia with Rust adapters; what is left is the adapters’ glue (bounds proving, parallel proofs, ledger writes) and a per-function entry whose meaning for a fixpoint pass and whose test route are undecided.
Friction: none
Disk freed: none (target/nikaia-project-tests 1.6G, / 6.3G free; no cache entry over 100 MB made)
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UVxJDtmukJNapbMLmZMzTV
target/fast/nikaia predated HEAD. After that, working out that the issue’s starting point was out of date: I had to read each .rs/.nika pair and the commit that moved locks.locks.nika, sync.nika, throws.nika, touch.nika, keeps.nika, panics.nika and tether.nika already exist and the Rust files only pass data to them. I also had to find out whether a test program can reach compiler:: code (it can’t), and how #1913 and #1308 define “per-function facts” (neither does).probe.nika runs, one scratch-project run and the disk check. None were wasted. The first probe ran on the stale binary, so I repeated it after the build.git log -400 --grep for the issue’s precursor (#1913 here) and list each file the issue names next to its latest commit. “contracts/locks: … move into Nikaia” would have shown at once that the move was largely done.wrong I7: it says the seven passes are Rust, but their logic is already Nikaia behind Rust adapters.broke I6: what the per-function entry returns for a pass that settles over the whole call graph is undecided, so the issue should be labelled decision.broke I11: no time figure and no split by pass, though the issue exists for the incremental ledger.rules-gap: the To build list asks for a tests/compiler test of compiler internals, and nothing gives a test program a way to reach them. No rule asks an issue to check that its required test can be written.| Fact: Core | A tests/compiler program cannot call the compiler’s .nika functions: use compiler::X is NK1337, use compiler is NK1339, and a path dependency on crates/nikaia-std/src/compiler fails for want of a nikaia.toml, so compiler internals are tested only through the nikaia binary. |
| Fact: Core | Before planning a “move X.rs into Nikaia”, check whether crates/nikaia-std/src/compiler/X.nika already exists and whether X.rs only passes data to nikaia_std::compiler::X: most of contracts/*.rs already does. |
Generated by Claude Code
The report of the run of issue-1982 (#1982) judged this issue against docs/issues.md; the author fixes the issue by the rule it names (How a run judges its issue):
decision, not readyGenerated by Claude Code
Driver: not queued, this issue waits for #1308, #1913, #1983, #1984, which is still open (#1819). Set ready again when it is closed.
Generated by Claude Code
The per-function entry is decided: ADR-100 D7 (owner, 2026-11-17, from #1984). Each contract pass gets an entry that returns one function’s final column from its callees’ stored columns, processed callees first, a recursive group (SCC) as one unit with the fixpoint inside it only; the whole-package entry stays and is the reference, compared on a package with a call chain and a recursive pair.
Generated by Claude Code