REQ-LOOP-008: Family-aware streaming reasoning filter with UTF-8 alignment

← Requirements

What it requires

  1. Given a token stream containing a full reasoning block split across chunk boundaries, When filtered, Then the consumer sees only the non-reasoning text and the raw callback sees everything.
  2. Given a multi-byte UTF-8 codepoint split across two chunks, When filtered, Then the consumer never receives a truncated codepoint.
  3. Given a non-default delimiter pair longer than "</think>", When filtered, Then it is matched and suppressed.
tier
NOT_RUN

Where it lives

  • src/core12
  • src/types3

See it on the map

How it is met

implemented byresults (238 tests)RunStreamScopeStreamThinkFilterStreamThinkFilteremit_to_current_run_streamemit_utf8_safeflushgenerate_streamingon_tokenprocess_byterun_streamingrun_streamingset_raw_callbackstream_token_callbackutf8_char_len~RunStreamScope238 absent238 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (238)

Reached through calls

238 tests: 238 absent

testresultlinked byimplementers exercisedcalls away
StreamThinkFilter: raw callback + UTF-8 boundaryabsentinferred6 of 151
StreamThinkFilter: tag-state machine coverageabsentinferred5 of 151
gh#108 StreamThinkFilter suppresses the family's marker liveabsentinferred5 of 151
gh#108 the gemma4 adapter and the stream filter agree on markersabsentinferred5 of 151
gh#208: concurrent streaming turns each receive only their own tokensabsentinferred5 of 151
run_streaming overloads route through agent loopabsentinferred5 of 151
v2.14.0: cancelling one session's stream leaves other sessions runningabsentinferred5 of 151
ModelOrchestrator real-model generate (one load, CPU)absentinferred7 of 152
Orchestrator generate() returns typed error when tier missingabsentinferred7 of 152
Orchestrator generate_streaming error + routing + fallback pathsabsentinferred7 of 152
gh#108 (v2.10.3) CONTROL: plain-decode streaming on the same tierabsentinferred7 of 152
gh#108 (v2.10.3) MTP + grammar + streaming through absentinferred7 of 152
gh#108 (v2.10.3) MTP + streaming without a grammar still streamsabsentinferred7 of 152
gh#134 (v2.10.4) A/B: the knob, not the model, produces the callabsentinferred7 of 152
gh#134 (v2.10.4) closest replication of the reported stall configabsentinferred7 of 152
gh#134 (v2.10.4) multi-turn: rails hold past the stall onsetabsentinferred7 of 152
gh#134 (v2.10.4) require_tool_call forces a tool call under MTPabsentinferred7 of 152
gh#154 a tier grammar that is not registered refuses the runabsentinferred7 of 152
entropic_run_streaming on unconfigured handle returns INVALID_STATEabsentinferred5 of 152
entropic_run_streaming rejects NULL handleabsentinferred5 of 152
entropic_run_messages_streaming on configured handle with empty arrayabsentinferred5 of 153
entropic_run_messages_streaming on unconfigured handle returns INVALID_STATEabsentinferred5 of 153
entropic_run_messages_streaming rejects NULL handleabsentinferred5 of 153
entropic_run_messages_streaming validates argsabsentinferred5 of 153
gh#122: fenced-json block in model output yields a tool callabsentinferred7 of 154
gh#127: ambiguous fenced args object returns empty (no false positive)absentinferred7 of 154
gh#127: fenced args-only object matched by registered tool schemaabsentinferred7 of 154
gh#88: a parroted {action:...} emission dispatches via the gemma absentinferred7 of 154
interface_factory: wiring + iface_* surface sweepabsentinferred7 of 154
gh#205: streaming under a tier refuses what it cannot runabsentinferred5 of 154
Compaction fires when context exceeds thresholdabsentinferred7 of 155
Constitutional validator detects violations and revisesabsentinferred7 of 155
Delegation wiring fires on_delegation_start callbackabsentinferred7 of 155
Dynamic identity creation and generation through engine loopabsentinferred7 of 155
Engine state transitions include PLANNING and EXECUTINGabsentinferred7 of 155
Hooks fire in correct order during a generation cycleabsentinferred7 of 155
MCP authorization denial propagates through engineabsentinferred7 of 155
Multi-turn engine calls retain contextabsentinferred7 of 155
Routing fires on_tier_selected callbackabsentinferred7 of 155
Single-turn engine loop produces coherent responseabsentinferred7 of 155
Tool call cycle: generate, parse, execute, regenerateabsentinferred7 of 155
True end-to-end: real prompts, real engine, real modelabsentinferred7 of 155
gh#105: constitutional validator's toolless render must NOT clobber absentinferred7 of 155
gh#160: an isolated delegation never writes the project, and absentinferred7 of 155
gh#162: a delegate seeded with context answers from the named absentinferred7 of 155
gh#88: a gemma multi-turn session never accumulates a parrotable absentinferred7 of 155
v2.14.6: a lead that answers in prose is nudged, and its forced absentinferred7 of 155
v2.14.6: with thinking on, each loop turn ends in a real tool callabsentinferred7 of 155
Configure with null JSON returns errorabsentinferred7 of 158
Double-configure on one handle is refusedabsentinferred7 of 158
Nemotron3-Nano-4B Q8 first inference does not crash (gh#66)absentinferred7 of 158
Three handles can coexistabsentinferred7 of 158
Two GPU-resident handles can coexist (v2.2.8 target)absentinferred7 of 158
Two handles configure independentlyabsentinferred7 of 158
entropic_configure called twice on the same handle returns ALREADY_CONFIGUREDabsentinferred7 of 158
entropic_configure rejects NULL config_jsonabsentinferred7 of 158
entropic_configure rejects NULL handleabsentinferred7 of 158
entropic_configure_dir on /dev/null subpath returns an error, not an exceptionabsentinferred7 of 158
entropic_configure_dir on a tmp dir runs the loader pathabsentinferred7 of 158
entropic_configure_dir rejects NULL handleabsentinferred7 of 158
entropic_configure_dir with empty string path returns an error code, not an exceptionabsentinferred7 of 158
entropic_configure_from_file rejects NULL handleabsentinferred7 of 158
entropic_configure_from_file rejects NULL pathabsentinferred7 of 158
entropic_configure_from_file rejects missing fileabsentinferred7 of 158
entropic_last_error reflects most-recent operation failureabsentinferred7 of 158
entropic_last_error returns per-handle state (v2.2.6)absentinferred7 of 158
entropic_register_mcp_server on a configured handle absentinferred7 of 158
entropic_run_messages with console logging disabled still absentinferred7 of 158
entropic_seconds_since_last_activity returns 0 before any run absentinferred7 of 158
gh#110: MTP engages through the real agent loop (entropic_run)absentinferred7 of 158
gh#121 regression: configure populates engine's allowed_tools from identity frontmatterabsentinferred7 of 158
gh#144: concurrent bridge clients queue instead of racingabsentinferred7 of 158
gh#154 a tier grammar stem that cannot resolve YET still absentinferred7 of 158
gh#154 a tier grammar stem that resolves still configuresabsentinferred7 of 158
gh#154 a tier with no grammar is unaffectedabsentinferred7 of 158
gh#154 entropic_metrics_json carries a generations arrayabsentinferred7 of 158
gh#156 a frontmatter-less app_context fails configure absentinferred7 of 158
gh#156 a frontmatter-less constitution fails configure tooabsentinferred7 of 158
gh#156 a missing app_context path fails configureabsentinferred7 of 158
gh#156 a well-formed app_context file still configuresabsentinferred7 of 158
gh#156 app_context false still configuresabsentinferred7 of 158
gh#156 inline app_context content still configuresabsentinferred7 of 158
gh#158 entropic_interrupt_session targets exactly one runabsentinferred7 of 158
gh#163 entropic_configure carries app_context into ParsedConfigabsentinferred7 of 158
gh#163 entropic_configure_dir carries app_contextabsentinferred7 of 158
gh#163 entropic_configure_from_file carries app_contextabsentinferred7 of 158
gh#163 the object and false spellings survive configure_dir tooabsentinferred7 of 158
gh#164 entropic_release_model names an unknown tierabsentinferred7 of 158
gh#164 entropic_release_model refuses to unload mid-turnabsentinferred7 of 158
gh#165 entropic_session_context_set guards its preconditionsabsentinferred7 of 158
gh#165 entropic_session_context_set refuses the running sessionabsentinferred7 of 158
gh#165 entropic_session_context_set round-trips through the C ABIabsentinferred7 of 158
gh#175: a non-positive mcp.server_timeout_seconds is refused at configureabsentinferred7 of 158
gh#203: followup returns delegation_id and summary from real storageabsentinferred7 of 158
gh#204: an unservable http_port fails configure loudlyabsentinferred7 of 158
gh#95: identity grammar: field constrains that tier's outputabsentinferred7 of 158
h1.run() after h2.configure() does not segfault (v2.2.6)absentinferred7 of 158
gh#158: interrupting one session leaves the other runningabsentinferred7 of 159
gh#158: metrics and context reads are safe during live runsabsentinferred7 of 159
gh#158: two concurrent sessions do not bleed into each otherabsentinferred7 of 159
gh#164: entropic_release_model frees VRAM through the C ABIabsentinferred7 of 159
gh#165 + gh#164: release the weights, keep the conversationabsentinferred7 of 159
gh#165: a dropped session restored from JSON keeps answeringabsentinferred7 of 159
gh#166: two workspaces on one handle do not read each other's absentinferred7 of 159
gh#169: an iteration-capped delegate hands its parent the audit it absentinferred7 of 159
gh#179: each workspace's sessions answer from its own app_context, absentinferred7 of 159
gh#181: a delegate hard-cut by the thinking budget hands its absentinferred7 of 159
gh#194: a plain generation publishes the prefill it performedabsentinferred7 of 159
gh#198: a deferred handle holds no GPU memory until it runsabsentinferred7 of 159
gh#204/gh#205: two HTTP clients, different session, workspace and absentinferred7 of 159
gh#214: a prompt that does not fit fails the turn, typedabsentinferred7 of 159
gh#216: multi-byte text at the history cut does not poison later turnsabsentinferred7 of 159
gh#217: release is refused while another session is decodingabsentinferred7 of 159
gh#93: autoparser family parses a multi-parameter tool callabsentinferred7 of 159
gh#93: entropic_interrupt stops a long run early (cancel-bridge)absentinferred7 of 159
gh#94: enable_thinking:false suppresses think blocks (facade)absentinferred7 of 159
gh#99: run_as emits each tier's grammar on a shared modelabsentinferred7 of 159
outside-root optional: a real model's reads outside its root absentinferred7 of 159
v2.14.1: a declared server serves each workspace from its own repositoryabsentinferred7 of 159
v2.14.3: release frees the model over MCP and the conversation survivesabsentinferred7 of 159
v2.14.4: a model's commit message with shell syntax is text, not a commandabsentinferred7 of 159
v2.14.5: a failed turn is an error carrying only its own textabsentinferred7 of 159
gh#144: the ask tool advertises session as OPTIONALabsentinferred5 of 1510
gh#205: ask advertises tier and workspace, both OPTIONALabsentinferred5 of 1510
A call that fails identically is refused rather than retried absentinferred5 of 1511
Anti-spiral hard block stops dispatch and emits absentinferred5 of 1511
Anti-spiral hard block uses derived default when sentinel setabsentinferred5 of 1511
Error result not cached for dedupabsentinferred5 of 1511
POST_TOOL_CALL fires on schema rejection with kindabsentinferred5 of 1511
POST_TOOL_CALL hook transforms schema-rejection contentabsentinferred5 of 1511
Permission denied returns feedbackabsentinferred5 of 1511
Schema validation rejects invalid enum valueabsentinferred5 of 1511
Schema validation rejects missing required fieldabsentinferred5 of 1511
Tool executor processes calls via ServerManagerabsentinferred5 of 1511
gh#143: an argument-free call to a no-required-fields tool absentinferred5 of 1511
gh#190: a structured JSON error counts as a failure everywhereabsentinferred5 of 1511
mcp.bash.timeout_seconds reaches the dispatched bash serverabsentinferred5 of 1511
v2.14.0: schema validation enforces declared minimum and maximumabsentinferred5 of 1511
v2.14.6: a headless host still dispatches engine directivesabsentinferred5 of 1511
v2.14.6: the model's own tool call stays in the history it is shownabsentinferred5 of 1511
Auto approve skips callbackabsentinferred5 of 1512
Chained POST_TOOL_CALL hooks: last write winsabsentinferred5 of 1512
Circuit breaker at threeabsentinferred5 of 1512
Duplicate counter resetsabsentinferred5 of 1512
Duplicate detection skipsabsentinferred5 of 1512
Headless mode denies without callbackabsentinferred5 of 1512
Max tool calls per turnabsentinferred5 of 1512
Multiple tool calls in batchabsentinferred5 of 1512
POST_TOOL_CALL fires on duplicate rejection with kindabsentinferred5 of 1512
POST_TOOL_CALL hook transforms duplicate-rejection contentabsentinferred5 of 1512
POST_TOOL_CALL hook transforms successful tool result contentabsentinferred5 of 1512
POST_TOOL_CALL with *modified_json == NULL leaves content untouchedabsentinferred5 of 1512
PRE/POST_TOOL_CALL fire for successful callsabsentinferred5 of 1512
PRE_TOOL_CALL cancel short-circuits dispatch and still fires POSTabsentinferred5 of 1512
Process single tool callabsentinferred5 of 1512
Tool call history records successful executionsabsentinferred5 of 1512
Tool emits directives → ToolExecutor extracts + dispatches themabsentinferred5 of 1512
effective_max_tool_calls_per_turn overrides global limitabsentinferred5 of 1512
gh#111: POST_TOOL_CALL hook returning malformed UTF-8 is absentinferred5 of 1512
gh#143: an argument-free call serialises as an object absentinferred5 of 1512
gh#143: dispatch converts a throwing tool into a tool errorabsentinferred5 of 1512
gh#158: a delegated child's read satisfies its parent's write — absentinferred5 of 1512
gh#158: clearing the default conversation releases the default absentinferred5 of 1512
gh#158: each session's todo list is its ownabsentinferred5 of 1512
gh#158: ending a session's conversation releases its read absentinferred5 of 1512
gh#158: read-before-write is judged per session — another absentinferred5 of 1512
gh#158: two sessions reading and writing through ONE filesystem absentinferred5 of 1512
gh#168: a rewritten payload carrying bad UTF-8 is sanitized, absentinferred5 of 1512
gh#168: the rewrite is visible to the dup cache and POST hookabsentinferred5 of 1512
gh#211: a tier that declares an EMPTY allowlist may call nothingabsentinferred5 of 1512
gh#83: allowlisted tool dispatches normallyabsentinferred5 of 1512
gh#83: empty locked_tier bypasses enforcementabsentinferred5 of 1512
gh#83: no map wired = pass-through (pre-v2.5.2 behavior)absentinferred5 of 1512
gh#83: off-allowlist tool is rejected_unauthorized at dispatchabsentinferred5 of 1512
gh#83: tier with no allowlist entry is unrestrictedabsentinferred5 of 1512
process_single_call completes with locked_tier setabsentinferred5 of 1512
ExternalBridge start() declines duplicate in-process socket bindingabsentinferred5 of 1513
gh#158: a session's tool call never resolves inside another absentinferred5 of 1513
gh#158: repeated sandbox swaps race nothing a concurrent absentinferred5 of 1513
gh#158: two sessions writing todos through ONE entropic server absentinferred5 of 1513
gh#168: a PRE_TOOL_CALL hook's modified args reach the toolabsentinferred5 of 1513
gh#168: a malformed modification is refused, not half-appliedabsentinferred5 of 1513
gh#168: a modification that renames the tool is refusedabsentinferred5 of 1513
gh#168: a non-zero return still cancels, modification or notabsentinferred5 of 1513
gh#204: a listener stopped the instant it started still stopsabsentinferred5 of 1513
gh#204: the HTTP listener serves the bridge to authenticated clients onlyabsentinferred5 of 1513
gh#220: a port another listener holds is refused, not sharedabsentinferred5 of 1513
LlamaCppBackend lifecycle on a small real model (one load)absentinferred5 of 1514
gh#87 diag: multi-parameter tool call — gemma4 (dedicated PEG)absentinferred5 of 1514
gh#87 Increment-2: backend render_with_tools → parse_response absentinferred5 of 1515
gh#106 MTP kernel: engaged + lossless-coherentabsentinferred5 of 1516
gh#108 MTP + flash + q4 KV succeeds on E4B QAT Q4 absentinferred5 of 1516
gh#108 MTP + flash attention succeeds (v2.9.3, upstream #25148)absentinferred5 of 1516
gh#108 MTP greedy holds across a multi-turn contextabsentinferred5 of 1516
gh#108 MTP guards: out-of-envelope requests fail loudabsentinferred5 of 1516
gh#108 MTP is lossless at temperature>0 (empirical distribution check)absentinferred5 of 1516
gh#144: MTP prefill must not re-decode an unchanged prefixabsentinferred5 of 1516
Consecutive same-tier generations do not leak content across absentinferred5 of 1517
Conversation with model output survives save and loadabsentinferred5 of 1517
Engine produces coherent text from a simple promptabsentinferred5 of 1517
GBNF grammar constrains output to valid JSONabsentinferred5 of 1517
Gemma 4 A4B GGUF loads and generates first tokenabsentinferred5 of 1517
Gemma 4 E4B GGUF loads and generates first tokenabsentinferred5 of 1517
Generation succeeds with non-default GPU profileabsentinferred5 of 1517
Lead delegates to child and receives resultabsentinferred5 of 1517
LoRA adapter load failure is handled gracefullyabsentinferred5 of 1517
Model output is correctly parsed into tool callsabsentinferred5 of 1517
Multi-turn context is retained across generationsabsentinferred5 of 1517
Nemotron 3 family GGUF loads and generates first tokenabsentinferred5 of 1517
Qwen 3.5 family GGUF loads and generates first tokenabsentinferred5 of 1517
Recall-style prompts do not surface prior-generation contentabsentinferred5 of 1517
Text-only model handles multimodal input gracefullyabsentinferred5 of 1517
gh#103 contrast: batch mode may generate past the tool callabsentinferred5 of 1517
gh#103 gemma severe case: sequential mode stops at <tool_call|> AND absentinferred5 of 1517
gh#103: sequential tool_call_mode hard-stops at the first tool call absentinferred5 of 1517
gh#106 MTP functions on the E4B QAT trunkabsentinferred5 of 1517
gh#106 MTP routes through orchestrator->generate()absentinferred5 of 1517
gh#108 (v2.10.0) a request-level grammar routes to MTP on an absentinferred5 of 1517
gh#108 (v2.10.3) CONTROL: non-streaming generate on the same tierabsentinferred5 of 1517
gh#108 MTP engages with tools staged through orchestrator (agent loop)absentinferred5 of 1517
gh#108 MTP loud error propagates through orchestrator (no fallback)absentinferred5 of 1517
gh#108 per-tier speculative_mtp=false overrides the global flagabsentinferred5 of 1517
gh#137 a toolless enable_thinking:false turn must not deliver absentinferred5 of 1517
gh#148 auto: a VRAM reserve forces a real partial offload that absentinferred5 of 1517
gh#154 a REQUEST-level grammar_key miss still fails openabsentinferred5 of 1517
gh#154 registering the tier's grammar after configure opens the absentinferred5 of 1517
gh#87 cutover: params.tools drives common_chat through the orchestratorabsentinferred5 of 1517
gh#90: gemma <|\"|> escape on a numeric value keeps string typingabsentinferred5 of 1517
v2.14.6: a real image runs through E4B QAT and its projectorabsentinferred5 of 1517
gh#108 CPU-only feasibility: E2B-QAT-Q4 x MTP x flash+q4KV, absentinferred5 of 1519
gh#108 agentic benchmark: full 24-config permutation matrix absentinferred5 of 1519
gh#153 MTP vs plain decode throughput — four arms, Gemma 4 26B-A4B absentinferred5 of 1519
gh#153 MTP vs plain decode throughput — four arms, Gemma 4 E4B absentinferred5 of 1519
gh#164: release then reload decodes correctly on a hybrid archabsentinferred5 of 1519
gh#164: release then reload decodes correctly on gemma4 (plain KV)absentinferred5 of 1519
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 131072 contextabsentinferred5 of 1519
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 32768 contextabsentinferred5 of 1519
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 65536 contextabsentinferred5 of 1519