Open and answer this issue on GitHub.
blocked, ci · opened 2026-11-14 · updated 2026-11-21 · 9 comments
Part of the CI-speed work (owner, 2026-11-14: CI in 1–2 minutes, not 40–70).
Facts: Ledger and bounds proofs, CI and caches
After #2474 Needs #1913
A cold nikaia lower-std of the tools package took 2.5–5.5 minutes on 2026-11-14. Two runs brought it to about 64–66 s, against the target of under 60 s:
proofs_ask is about two thirds of it: proofs_search 152 G over 52,412 searches, and lg_normal_of 59 G over 298,165 asks. The copying sites the first version of this issue named are under 2 % each, so they are struck.Two things block the last step:
Ledger::infer. That has to come back first, or the figure here is moot.lower-std with callgrind (docs/measuring.md), against the 181 G recorded in builder.md. Say how much the store of #1913 saves.lower-std on 4 cores is under 60 s again, measured as docs/measuring.md asks. The comment that finishes it quotes the figure, and the issue is then closed by hand.lower-std output and every .bounds expectation stay byte-identical.Brief queued: issue-1581
agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —
Your work order is issue #1581, 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/1581/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.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.Result: partial with what you ruled out, the probe, and the suspected file and function./home/user/Nikaia/docs/briefs/ci/issue-1581.md.report.md)Fields: Result, Files, Commit, Body (optional), Fixes, Pushed, Tests, Gate, Deviation, Found, Needs, Changelog, Issue, Owner (a question for the owner), 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. 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 ;.done <sha>, report <path> (or BLOCKED: ... / PUSH REJECTED ...).Generated by Claude Code
Run: issue-1581, ESCALATE claude exited with code 1
Tokens: input 400, cache read 13249049, cache write 295801, output 99921 Cost: 14.60 USD, time 78 min 34 s, turns 200
(none)
target/fast/nikaia, which then had to be rebuilt) and several noisy cold runs at ±5 s. Two ideas were built, measured, found to gain nothing, and reverted: ordering the panics units largest-first, and dropping cached rules only for the bodies a new precondition touches. The views refactor ran into the NK2302 defect and was reverted too. Where the run stands: steps fd02c038, c8c24563 and 42c27a47 are committed. A cold run takes about 64–66 s against the 60 s target, so Result is partial. No final report was written.NIKAIA_LOWER_TIMES=1) and the cache-salt env var for a cold runproofs::in_parallel hands out work dynamicallyrules_settle/rules_holding, ADR-369)bounding_derived_entryref-field rules (views)nikaia test --filter syntax.bounds programs at both settings, the fixpoint, clippy, pre-push.--filter.NIKAIA_LOWER_CACHE_SALT, NIKAIA_LOWER_TIMES=1, compare user time, plus a ready gdb-sample script. That would have saved about 15 turns.broke I5: no baseline timeline or phase split for lower-std, and no profile.rules-gap: no stated core count and no measuring method for “cold”.rules-gap: no list of the fixpoint loops (fields and returns rounds, derived preconditions) that re-run the same proofs.Fact: Core | An instrumented build overwrites target/fast/nikaia; copy it out and rebuild from clean sources before lower-std or commit.Fact: Core | nikaia test takes test names only through --filter NAME (repeatable), never as positional arguments.Fact: views | A struct with a ref field makes the checker treat every field of its literal as a view, so moving a by-value parameter in is refused with NK2302 even with keep (needs a decision).Fact: Core | NIKAIA_LOWER_CACHE_SALT=<fresh> with --sysroot on a copy gives a cold, byte-comparable lower-std without touching the shared tree.Generated by Claude Code
Stand 2026-11-15 (Supervisor, ci-Lane)
Erledigt (lokal auf develop, wird mit der nächsten grünen Suite gepusht): fd02c038, c8c24563, 42c27a47 (bounds: Beside-Zusammenfassungen einmal, geltende Regeln einmal pro Lauf von Bodies, geltende Regeln erst bei Bedarf). Kaltes lower-std (4 Kerne): Wanduhr 1m45 → ca. 1m05, user 5m24 → 3m21. Die gelowerte Ausgabe ist byte-identisch, alle 74 .bounds-Programme bestehen.
Offen, für den nächsten Brief:
docs/measuring.md und nennt die Top-Funktionen mit ihrer Zahl an Instruktionen.Ty und den Fakten-Maps pro Statement in bounding_stmts, die List-Allokationen in SvTseitin. Ein Commit pro Stelle, mit dem Instruktionszähler davor und danach.Entscheidung zu To build 3 (Supervisor): Ja, die Beweisergebnisse werden pro Funktion gecacht. Der Schlüssel ist ein Hash aus:
bounds_*, prover_*, proofs_*, sv_*, logic_*).Eine von Hand gepflegte Versionsnummer der Regeln gibt es bewusst nicht: Würde jemand vergessen, sie zu erhöhen, käme ein veraltetes Urteil heraus, und das ohne jede Meldung. Die Komplexität gehört in den Compiler, nicht zu dem, der ihn pflegt. Eine Änderung am Compiler, die den Beweiser nicht berührt, beweist dann nichts neu. Das wird als eigenes Issue gebaut, nachdem To build 2 gemessen ist.
Neues Ergebnis aus dieser Runde: #1637 (NK2302 bei einem ref-Feld in einem Struct-Literal).
Generated by Claude Code
Brief queued: issue-1581-r2
agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —
Your work order is issue #1581, 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/1581/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-1581-r2.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-1581-r2, agent.nika exited with code -1
Tokens: input 0, cache read 0, cache write 0, output 0 Cost: 0.00 USD, time 0 min 0 s, turns 0
(none)
Generated by Claude Code
Run: issue-1581-r2, Result: partial
Tokens: input 0, cache read 0, cache write 0, output 0 Cost: 0.00 USD, time 0 min 0 s, turns 0
Result: partial
Files: crates/nikaia-std/src/compiler/check_copies.nika crates/nikaia-std/src/compiler/lowered/check_copies.rs crates/nikaia-std/src/compiler/lowered.rs
Commit: check: collect_copies asks a type’s cleanup last and once, 70.4 G to 8.9 G of the ledger check (#1581)
Body: Step 1 profile (callgrind, warm one-file lower-std of the tools package): the ledger check was 152 G, of which collect_copies was 70 G, because it called cleanup_of for every type in every fixpoint round; the panics pass’s bounds walk is 359 G+, of which proofs_ask is 236 G (proofs_search 152 G for the 52k of 298k questions that miss the cache, lg_normal_of 59 G on every question). Commit beaf0d19 asks cleanup_of only once a type’s parts copy, so collect_copies drops from 70.36 G to 8.90 G Ir and check_for_the_ledger from 151.75 G to 90.31 G; no verdict changes (a_copied_part is pure; lower-std rewrote only this file’s lowering, and the fixpoint is clean).
Part: #1581
Pushed: local beaf0d19
Tests: build fast, lower-std twice (fixpoint clean), cargo fmt –check, clippy -p nikaia-std –all-targets -D warnings green, 51 copy/cleanup/drop test programs at –both-settings ok; pre-push did not run because another agent’s uncommitted crates/nikaia-std/src/env.rs:75 (unsafe block, lint error) stops every nikaia run build
Gate: green
Deviation: commit.nika could not build (same env.rs lint error), so I committed by hand with the same message layout through a private index (read-tree HEAD, add the 3 files, commit-tree, update-ref) and then restored only those 3 index entries; the dry-run review was done by reading the diffs
Found: none
Needs: none
Changelog: The compiler checks its own package faster: deciding which types derive Copy now asks for a type’s cleanup only once its parts copy (61 G instructions less per lowering of the tools package).
Issue: wrong I7: bounding_stmts and bounding_stmt clone no Ty per statement (only bounding_block clones facts.ints once per block); SvTseitin’s assert and parts cost 6.1 G and 5.7 G of the panics pass’s 359 G (under 2 % each); the costs the issue did not name were collect_copies’ cleanup_of (70 G of 152 G in the check) and, in the bounds walk, proofs_ask (66 %), where lg_normal_of runs on every question, hits included
Owner: none
Comment: #1581 Profile of a warm one-file lower-std of the tools package, after beaf0d19: ledger check 90 G (collect_copies 8.9 G); panics pass 359 G+ by the dump, still running (bounding_loop_framed 248 G inclusive; proofs_ask 236 G: proofs_search 152 G over 52,412 searches, which is sv_ask 142 G and lg_check 76 G; lg_normal_of 59 G over 298,165 asks, which is lg_copy 23 G and lg_write 22 G; sha256 8 G). The bounds walk runs again for the check (check/host.rs:417) and the emit (emit/mod.rs:886), each with other inputs. 60 s needs the per-function proof cache (step 3), not the copying sites.
Friction: another agent’s uncommitted edit to crates/nikaia-std/src/env.rs (a new unsafe block at line 75, refused by the std crate’s lint) broke every nikaia run script, pre-push.nika and commit.nika included, so neither could run; a whole callgrind run of lower-std takes hours (56 min only reached the panics pass), and the NIKAIA_LOWER_TIMES lines print only at the end of the ledger, so they cannot mark the end of a phase for a dump
Disk freed: 175 MB of scratch trees; target/nikaia-project-tests 1.6G; / 7.8G free of 252G (80 %); no cache entry over 100 MB new in this run
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UVxJDtmukJNapbMLmZMzTV
Generated by Claude Code
From the report of the run of issue-1581-r2 (#1581):
Profile of a warm one-file lower-std of the tools package, after beaf0d19: ledger check 90 G (collect_copies 8.9 G); panics pass 359 G+ by the dump, still running (bounding_loop_framed 248 G inclusive; proofs_ask 236 G: proofs_search 152 G over 52,412 searches, which is sv_ask 142 G and lg_check 76 G; lg_normal_of 59 G over 298,165 asks, which is lg_copy 23 G and lg_write 22 G; sha256 8 G). The bounds walk runs again for the check (check/host.rs:417) and the emit (emit/mod.rs:886), each with other inputs. 60 s needs the per-function proof cache (step 3), not the copying sites.
Generated by Claude Code
The report of the run of issue-1581-r2 (#1581) judged this issue against docs/issues.md; the author fixes the issue by the rule it names (How a run judges its issue):
Generated by Claude Code
Status: blocked. Two runs landed what can be built without a store design: beaf0d19 (collect_copies) and run 1’s commits. Cold lower-std now takes about 64–66 s against the target of under 60 s.
Run 2’s profile says the gap is the bounds walk’s prover (proofs_ask, about two thirds of the panics pass). Closing it needs To build 3, the proof cache keyed on what determines each proof. That cache is the per-function / per-unit store of “a per-function or per-unit ledger store that outlives one lower-std process” (#1913) and “lower-std: incremental ledger, facts per function and per unit” (#1308). Both are blocked on an architecture decision, so this issue waits for them. The ref-field finding from run 1 is already filed as “A struct with one ref field: NK2302 treats its owned fields as views too” (#1637).
Generated by Claude Code