Skip to content

One refusal shape: a refused call is her typed cause and her next moves, in the kernel and on the wire (card 3d7931b7) - #5830

Merged
joelteply merged 5 commits into
canaryfrom
3d7931b7/one-refusal-shape
Nov 7, 2026
Merged

joelteply merged 5 commits into
canaryfrom
3d7931b7/one-refusal-shape

Conversation

@joelteply

@joelteply joelteply commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Card 3d7931b7. How this serves the minds: a refused call reaches her as a typed cause plus the calls she can make next (each one a verb in her hands, with that verb's own params), or a typed reason there is none. It never arrives as a prose string she has to parse, and never as "do one of these:" followed by nothing. This advances goal 7's newest-result rule (a refusal is her latest result: it must end the recursion with a next move) and the order of work's typed-refusals line. #5821 (Fable: latest as a typed submission handle) stacks on it.

The shape

  • kernel (sdk_codegen::refusal): Refusal is its typed cause chain plus NextMoves: one or more calls, built only from verbs in her hands with their own params, or a typed NoMove. CommandError::Refused(Arc<Refusal>) carries it; Invalid / NotFound / Denied(String) are its predecessors, migrated by the stringly_command_errors ratchet.
  • protocol (continuum-airc-protocol::refusal): CommandRefusal { category, cause, next } is the one wire form, in-process and over the grid. NextMoves::Calls holds a non-empty Calls type with its own decoder, so an empty call list does not decode. The wire is {"calls":[...]} | {"none":...}, and the ts-rs bindings are in protocol/typescript/transport/.
  • outlier A (tool/output): an act that reopens nothing is her typed refusal with its next move, rendered by her act's renderer.

Validation (IntelMac, 2026-11-07, at 960431e on canary 900ab80)

  • cargo check -p continuum-cognition -p continuum-airc-protocol -p continuum-kernel --tests --features continuum-cognition/metal,continuum-cognition/test-fixtures: clean. No new warnings in touched files; handler.rs's EnvSpec warnings are canary's.
  • continuum-airc-protocol --lib refusal: 7 passed.
  • continuum-kernel --lib refusal: 6 passed.
  • continuum-cognition --lib -- tool_output action_log act_output: 24 passed.
  • source-hygiene --bin ratchets -- origin/canary: 87/87 on both trees. error_text_matches 26 -> 26, unjustified_serialization 208 -> 208 (the two serialization sites name their boundary: her tool-call wire, the grid wire).

Removed

  • NextMovesWire, TryFrom<NextMovesWire> and NoCallsListed: the non-empty rule lives in Calls' Deserialize.
  • The engine-side string refusal in tool/output.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

joelteply and others added 5 commits November 7, 2026 09:57
… cause chain, next moves; an empty call list does not decode); the kernel's Refusal projects onto it

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…s next move (outlier A)

ActOutputRefusal is a RefusalCause (NotFound). An unknown act number carries her newest saved
act, so the refusal's next call is read_output({"act": that}); a failed save is NoMove::
NothingMoreExists, and nothing saved yet is NoMove::NothingSaved (new). No resident mind for the
caller is the substrate's fault, not hers: act_output_handle returns it as the outer error
(NoResidentMind), which named_output maps to Internal.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…own decoder; the try_from shadow enum and NoCallsListed are gone

ts-rs could not parse serde's try_from on NextMoves (a warning on every build). The non-empty
rule now lives in Calls' Deserialize; the wire shape is unchanged ({"calls": [...]} | {"none": ...}).
The kernel's refusal test body binds its result first, so action_command!'s block raises no
unused_braces warning.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…r tool-call wire, the grid wire); its test asserts the typed Refused variant, never the error's text

Ratchets at canary 900ab80: error_text_matches 26 -> 26, unjustified_serialization 208 -> 208.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply joelteply changed the title kernel: the refusal's two serialization sites name their boundary (her tool-call wire, the grid wire); its test asserts the typed Refused variant, never the error's text One refusal shape: a refused call is her typed cause and her next moves, in the kernel and on the wire (card 3d7931b7) Nov 7, 2026
@joelteply
joelteply merged commit a5134e1 into canary Nov 7, 2026
44 checks passed
@joelteply
joelteply deleted the 3d7931b7/one-refusal-shape branch November 7, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant