Issue #2793: a child handle with a fallback joined in a function without throws is…

Open and answer this issue on GitHub.

wip, bugs · opened 2026-11-23 · updated 2026-12-01 · 3 comments

Filed by the driver from the Found: of the run of issue-989 (#989) (owner, 2026-11-06).

Found

a child handle with a fallback joined in a function without throws is NK2605 though nothing can fail (D22 throws walk, D35): fn run() -> i64 { let h = async(handle) fn { fails(2) } catch { 0 }; let b = 1; return h.join() + b } gives NK2605 “task::ChildHandle::join can fail with task::Crashed”; the task cannot panic, so per D35 it should be accepted; traced: std.contracts task::ChildHandle::join declares throws = ["task::Crashed"] for every task

To build

Done when

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

Comments

keywan-ghadami, 2026-12-01

Brief queued: issue-2793


agent: builder model: opus max_turns: 200 budget_usd: 30 effort: medium —

Issue #2793

Your work order is issue #2793, 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/2793/comments -F body=@file, ending with the Claude Code footer), rule I13.

Rules (CLAUDE.md; shared checkout)

Report (at most 15 lines, to exactly /home/user/Nikaia/docs/briefs/bugs/issue-2793.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.


Generated by Claude Code

keywan-ghadami, 2026-12-01

Run: issue-2793, Result: done

Tokens: input 22, cache read 369584, cache write 26744, output 4104 Cost: 0.40 USD, time 0 min 49 s, turns 11

Report

Result: done Files: none Commit: none Body: the Found’s probe (fn run() -> i64 { let h = async(handle) fn { fails(2) } catch { 0 }; let b = 1; return h.join() + b }) passes on develop c5fa7a9f5 and prints 1; it was fixed by “async: a handle carries its task’s error set, checked and joined at its join (ADR-async-v6 D35, D40)” (8c6df5733, under #2799), which also added tests/compiler/tests/async_fail_handle_fallback_join_unwrapped.nika, the same program, so it is already pinned and no new test was added (ADR-async-v7 D35, D40: the fallback takes the whole set, the join throws nothing). task::Crashed is still added at a join when the task can panic (a receive, “A receive is a panic site…”, ae50b2676), on purpose Fixes: #2793 Pushed: none Tests: target/fast/nikaia test –both-settings –project tests/compiler –filter async_fail_handle_fallback_join_unwrapped: 1 passed (binary built at HEAD c5fa7a9f5) Gate: green Deviation: none Found: none Needs: none Changelog: none Issue: broke I13: filed from a Found the fix under #2799 (8c6df5733) had already made pass, with the test pinning it already in the tree Comment: #2793 Already fixed by “async: a handle carries its task’s error set, checked and joined at its join (ADR-async-v6 D35, D40)” (8c6df5733, #2799). tests/compiler/tests/async_fail_handle_fallback_join_unwrapped.nika is the same program as this issue’s probe and passes on develop c5fa7a9f5. Close as already fixed. Friction: the issue’s one-line probe does not parse as a probe.nika snippet (it needs newlines in if blocks, and Error("x") is no function); probe.nika --file refuses a path outside the checkout Disk freed: none; target/nikaia-project-tests absent, / 13G free of 252G, no new cache entries over 100 MB Attribution: Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01UVxJDutPTwP5Xj5HkGuidk

Debrief

  1. Most turns: getting the probe to run. The issue’s one-line snippet does not parse (it puts throws before the result type, has no newlines around if blocks, and calls Error(...) as a function). Then probe.nika --file refused my scratchpad path. That was four turns before the real check.
  2. Looked up: how to write async(handle) and declare an error type. An existing test, async_fail_handle_fallback_join_unwrapped.nika, turned out to be the issue’s probe word for word. If the brief had named it, the run would have taken two turns.
  3. Checks run: the binary-age check (useful), three failed probe tries (wasted), git log --grep (found 8c6df5733), the one filtered nikaia test (useful), and the disk figures.
  4. One change: the issue-filing driver could grep tests/compiler/tests/ for the Found’s function body before it files the issue. Builders could also run that grep in their first turn. This issue would never have been filed.
  5. What the issue lacked:
    • broke I13: it was filed after the fix under #2799 had landed, together with a test that pins it.
    • broke I5: its probe is not a runnable program (wrong throws order, Error(...) is no function).
    • knowledge: Probes | async tests named async_fail_handle_* hold the canonical handle, join and fallback shapes; grep them before writing a probe.
  6. Traps:
    • Fact: Core | probe.nika --file takes only a path below the checkout (e.g. target/), so a scratchpad file is refused; run a scratch project directly with target/fast/nikaia run src/main.nika.
    • Fact: Probes | Nikaia has no Error(...) constructor; a probe that throws declares struct Bad {} with impl Error for Bad { fn message(ref self) -> String }.
    • Fact: Probes | a probe.nika snippet joined with ; still needs newlines inside if blocks; write it as a file when it holds blocks.
  7. Fact: none

Generated by Claude Code

keywan-ghadami, 2026-12-01

From the report of the run of issue-2793 (#2793):

Already fixed by “async: a handle carries its task’s error set, checked and joined at its join (ADR-async-v6 D35, D40)” (8c6df5733, #2799). tests/compiler/tests/async_fail_handle_fallback_join_unwrapped.nika is the same program as this issue’s probe and passes on develop c5fa7a9f5. Close as already fixed.


Generated by Claude Code

Back to Open Issues