Skip to content

chat fails loud per-request + expert_observe harness (final rescue from #2056) - #2252

Merged
joelteply merged 4 commits into
canaryfrom
fix/loud-failures-and-expert-observe
Aug 15, 2026
Merged

chat fails loud per-request + expert_observe harness (final rescue from #2056)#2252
joelteply merged 4 commits into
canaryfrom
fix/loud-failures-and-expert-observe

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Fifth and final rescue from #2056. With this, every unique unit of that 56-commit branch is on canary in reviewable pieces.

What lands

  • 8d77db049 ChatModule executor fails loud per-request, not process panic (Shell Timeout Mitigation Strategies - Architectural Patterns for Command Resilience #201). executor() becomes Result<Arc<CommandExecutor>, String> with a message naming the actual cause ("CommandExecutor not installed — start_server must call install_executor_on_all"), so a missing executor is a failed request instead of a downed core.
  • b357ab112 + c7032fd8d expert_observe — glass-box LIVE MoE expert routing: per-domain concentration, working-set size, Jaccard overlap.

9d4509bce (airc room-route error echo) was dropped as already upstream — cherry-pick reported it empty, confirming canary has it.

One fix on top

The fail-loud commit converts executor() to fallible but missed its own call site at chat/mod.rs:155 — the chat/poll anchor lookup called execute_json on a Result. One ?. Caught by cargo check, not by review, which is the argument for compiling every rescued unit rather than trusting that a commit which passed CI once still applies.

Verification

cargo check -p continuum-core --lib --tests clean.

#2056 is now fully rescued

Unit PR
KV-quant + flash attention #2244
division actuation #2246
Windows-CUDA build #2249
grid-overflow residency stack #2250
chat fail-loud + expert_observe this

#2056, #2053, and #2133 are superseded by these five and can be closed — their unique content is landed, their remaining commits target APIs canary has already replaced.

joelteply and others added 4 commits August 14, 2026 22:25
…nic (#201)

`ChatModule::executor()` did `.cloned().expect(...)` — a hard panic if a
`chat/poll`, `chat/send`, or `persist_posted` landed before `start_server`
called `install_executor_on_all` (a boot race). Panicking there SIGABRTs the
whole core and takes every other module down with it, for a per-request
contract violation that only concerns that one request.

Convert `executor()` to `Result<Arc<CommandExecutor>, String>` returning the
SAME loud, contract-naming message, and `?`-propagate it in the 3 callers
(all already `Result<_, String>`). Faithful to [[no-fallbacks-ever]] — still
loud, still names `install_executor_on_all`, no silent default — while
satisfying #26 (faculties degrade, never panic): a command that races boot
fails loudly to its caller instead of crashing the process.

Regression test: a pre-install `poll()` returns the loud error naming the
contract instead of panicking.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…uting (#230/#229)

Runs a GGUF MoE through the core/llama FFI with LiveExpertObserver attached (the existing
cb_eval → ffn_moe_topk seam), generates N tokens to drive real routing, then dumps the
model-intrinsic affinity: hot/cold expert distribution + co-occurrence + prefetch candidates.
That affinity is the INPUT to expert prefetch (#227), grid placement (#180), compaction, and
distillation (#233). Uses the in-process FFI (not the live llama-server lane) because affinity
is model-intrinsic — valid data, zero risk to live serving.

First run (Qwen3-Coder-30B-A3B, 96 tokens, Metal): 43,640 activations, 6116/6144 expert-slots
fired (~99.5%), hottest expert only 0.20% (~12x uniform), 6092 colder share 95.8%. FINDING:
for an 8/128 (6.25%-active) MoE, activation over a generation is BROAD, not tiny-hot — so the
paging win is the tier ladder + affinity placement, not a small resident set. Prefetch
predictor returned 0 candidates over 96 tokens (needs more data). K3 (1.8% active) should be
far more concentrated — same harness will quantify it when weights land.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…et-size + Jaccard (#230)

Evolves the MoE glass-box harness from the pooled first cut to the measurement that
actually decides the paging architecture (BigMama's three methodological guardrails):
diverse multi-domain corpus, PER-DOMAIN concentration (top-K% activation share vs the
uniform null), cross-domain hot-set Jaccard, shared-base-vs-own-only activation MASS
split, and the working-set-size curve (experts resident for 50/80/90/95% of a domain's
mass). Prefill-dominant sampling on realistic input, not a degenerating greedy loop.

Ran live on Qwen3-Coder-30B-A3B (Metal): pooled top-10% = 18.6% (mild — the smear), but
per-domain = 25–38% with near-disjoint hot sets (code↔prose Jaccard 0.05) and a tiny
38-expert universal core — i.e. paging is domain-working-set SWAPPING, not frequency
tiering. This is the #180 evidence; the harness is the reusable probe for any MoE (incl.
K3 at weight-drop).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Rebase fallout from the fail-loud change itself: executor() became
Result<Arc<CommandExecutor>, String> (that IS the 'no process panic' fix), and
every call site needs `?`. The chat/poll anchor lookup at mod.rs:155 was the one
that did not get converted, so it called execute_json on a Result.

One character. Caught by cargo check, not by review.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply
joelteply force-pushed the fix/loud-failures-and-expert-observe branch from 0c92e8c to 881c68c Compare August 15, 2026 03:25
@joelteply
joelteply merged commit 4ada526 into canary Aug 15, 2026
5 checks passed
@joelteply
joelteply deleted the fix/loud-failures-and-expert-observe branch August 15, 2026 03:37
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