agent: builder model: sonnet max_turns: 90 budget_usd: 15 —

Brief: #645 item 1, two overlap branches that change one mut binding are refused with NK2104

Score: bugs lane (docs/priorities.md): a program nikaia check accepts fails in rustc (Part III C.1). Items 2 and 3 of #645 no longer reproduce (architect, develop 41f30ed); item 4 is a doc line.

Facts (issue #645, checked on develop 41f30ed)

Probe o.nika:

fn main() {
    let mut a: Vec[i64] = []
    let p = overlap {
        a.push(1)
        a.push(2)
    }
    println(a.len().to_string())
}

nikaia check passes; nikaia run fails with the rustc message mapped back: Cannot borrow a as mutable more than once at a time at 3:5. Expected: NK2104 from the checker, naming a, at the second branch.

Spec (Part I, 10-nikaia-light.md, The branches meet on nothing, written this round): a pair where one branch changes a binding (a mut method, an assignment, a mut argument) that the other names is refused the same way: the message names the binding. Two branches that only read a binding meet on nothing. ADR-292 D3: &/&mut are read/write.

Item 2 (ns.par_iter().map(fn(n) { spin(n) }).collect() over Vec[i64]) runs today and prints 3; item 3 (An. in NK2202) is gone. Do not change them; one pin test for item 2 at both settings if tests/compiler/tests has none. Item 4: benches/overlap/README.md:59 still names ordering = "effects", which no longer exists: say what the bench measures today (read benches/overlap/), in its own commit.

Locations

To build

  1. The checker refuses the probe with NK2104: message These two branches can’t run at the same time., a note naming the binding (both change a / one changes a, the other reads it). Tests in tests/compiler/tests/: overlap_two_branches_change_one_binding.nika + .stderr; overlap_one_changes_one_reads.nika + .stderr; overlap_two_branches_read_one_binding.nika + .stdout (still runs). lower-std, commit.
  2. benches/overlap/README.md line, own commit. Last commit says Fixes #645. Run: nikaia test --both-settings --project tests/compiler, cargo test --profile fast -p nikaia --test it -- overlap:: sysroot.

Rules (CLAUDE.md; this block is pasted into every brief, also a fix-forward)

Report (at most 15 lines, to exactly /home/user/Nikaia/docs/briefs/b645-overlap-shared-mut.md.report.md)

Fields of docs/architect.md, Briefs and reports: Result: done|noop|partial|blocked (the bare word first; Owner: is a question for the owner or none, never a role), Files, Commit, Fixes, Pushed, Tests, Gate (green|red), Deviation, Found, Needs, Changelog, Owner, Disk freed. none where nothing, and then the bare word: Deviation: none (a note) cuts the batch (batch.nika compares exactly); a note goes into the commit message. Found: is only for a defect outside your change (it cuts the batch); how you solved your own step goes into the commit message. A noop says why under Tests: (what was probed), not under Deviation:. Final answer, one line: done <sha>, report <path> (or BLOCKED: ... / PUSH REJECTED ...).

Attribution: Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01GFeMqxRbtUMiGVyDMxsvEq

This site is open source. Improve this page.