REQ-MCP-020: A bounded, thread-safe ring buffer retains recent tool calls for introspection

← Requirements

What it requires

  1. Given more records than capacity, Then size stays at capacity and the oldest entries are gone while wrap-around ordering stays correct; Given concurrent writers and readers, Then no data race and reads return well-formed records; params_summary contains only key names; result_summary over 200 chars is truncated and shorter ones are unchanged; to_json emits valid JSON honouring the count limit and includes error_detail when set.
tier
NOT_RUN

Where it lives

  • src/mcp11

See it on the map

How it is met

implemented byresults (154 tests)ToolCallHistoryallexecute_toolrecentrecordrecord_to_jsonrecord_tool_historysizesummarize_paramsto_jsontruncate_result154 absent154 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (154)

Reached through calls

154 tests: 154 absent

testresultlinked byimplementers exercisedcalls away
ToolCallHistory concurrent to_json and recordabsentinferred6 of 111
gh#216: one bad record cannot make the history unserializableabsentinferred5 of 111
test_to_json_limitabsentinferred5 of 111
test_to_json_validabsentinferred5 of 111
to_json includes error_detail when setabsentinferred5 of 111
ToolCallHistory concurrent writes and readsabsentinferred4 of 11: all, recent, record, size1
test_concurrent_write_readabsentinferred3 of 11: recent, record, size1
test_empty_historyabsentinferred3 of 11: all, recent, size1
test_record_overwrites_oldestabsentinferred3 of 11: all, record, size1
test_record_singleabsentinferred3 of 11: recent, record, size1
test_wrap_around_correctnessabsentinferred3 of 11: all, recent, record1
test_all_oldest_firstabsentinferred2 of 11: all, record1
test_recent_more_than_availableabsentinferred2 of 11: recent, record1
test_recent_newest_firstabsentinferred2 of 11: recent, record1
test_record_fills_to_capacityabsentinferred2 of 11: record, size1
test_sequence_monotonicabsentinferred2 of 11: all, record1
gh#216: truncating a tool result never splits a UTF-8 characterabsentinferred1 of 11: truncate_result1
test_params_summary_keys_onlyabsentinferred1 of 11: summarize_params1
test_result_summary_short_unchangedabsentinferred1 of 11: truncate_result1
test_result_summary_truncatedabsentinferred1 of 11: truncate_result1
Build classification prompt with tiersabsentinferred1 of 11: size2
History and recent_tiers in classification promptabsentinferred1 of 11: size2
A call that fails identically is refused rather than retried absentinferred5 of 113
Anti-spiral hard block stops dispatch and emits absentinferred5 of 113
Anti-spiral hard block uses derived default when sentinel setabsentinferred5 of 113
Auto approve skips callbackabsentinferred5 of 113
Chained POST_TOOL_CALL hooks: last write winsabsentinferred5 of 113
Circuit breaker at threeabsentinferred5 of 113
Duplicate counter resetsabsentinferred5 of 113
Duplicate detection skipsabsentinferred5 of 113
Error result not cached for dedupabsentinferred5 of 113
Headless mode denies without callbackabsentinferred5 of 113
Max tool calls per turnabsentinferred5 of 113
Multiple tool calls in batchabsentinferred5 of 113
POST_TOOL_CALL fires on duplicate rejection with kindabsentinferred5 of 113
POST_TOOL_CALL fires on schema rejection with kindabsentinferred5 of 113
POST_TOOL_CALL hook transforms duplicate-rejection contentabsentinferred5 of 113
POST_TOOL_CALL hook transforms schema-rejection contentabsentinferred5 of 113
POST_TOOL_CALL hook transforms successful tool result contentabsentinferred5 of 113
POST_TOOL_CALL with *modified_json == NULL leaves content untouchedabsentinferred5 of 113
PRE/POST_TOOL_CALL fire for successful callsabsentinferred5 of 113
PRE_TOOL_CALL cancel short-circuits dispatch and still fires POSTabsentinferred5 of 113
Permission denied returns feedbackabsentinferred5 of 113
Process single tool callabsentinferred5 of 113
Schema validation rejects invalid enum valueabsentinferred5 of 113
Schema validation rejects missing required fieldabsentinferred5 of 113
Tool call history records successful executionsabsentinferred5 of 113
Tool emits directives → ToolExecutor extracts + dispatches themabsentinferred5 of 113
Tool executor processes calls via ServerManagerabsentinferred5 of 113
effective_max_tool_calls_per_turn overrides global limitabsentinferred5 of 113
gh#111: POST_TOOL_CALL hook returning malformed UTF-8 is absentinferred5 of 113
gh#143: an argument-free call serialises as an object absentinferred5 of 113
gh#143: an argument-free call to a no-required-fields tool absentinferred5 of 113
gh#143: dispatch converts a throwing tool into a tool errorabsentinferred5 of 113
gh#168: a rewritten payload carrying bad UTF-8 is sanitized, absentinferred5 of 113
gh#168: the rewrite is visible to the dup cache and POST hookabsentinferred5 of 113
gh#190: a structured JSON error counts as a failure everywhereabsentinferred5 of 113
gh#211: a tier that declares an EMPTY allowlist may call nothingabsentinferred5 of 113
gh#83: allowlisted tool dispatches normallyabsentinferred5 of 113
gh#83: empty locked_tier bypasses enforcementabsentinferred5 of 113
gh#83: no map wired = pass-through (pre-v2.5.2 behavior)absentinferred5 of 113
gh#83: off-allowlist tool is rejected_unauthorized at dispatchabsentinferred5 of 113
gh#83: tier with no allowlist entry is unrestrictedabsentinferred5 of 113
mcp.bash.timeout_seconds reaches the dispatched bash serverabsentinferred5 of 113
process_single_call completes with locked_tier setabsentinferred5 of 113
v2.14.0: schema validation enforces declared minimum and maximumabsentinferred5 of 113
v2.14.6: a headless host still dispatches engine directivesabsentinferred5 of 113
gh#158: a delegated child's read satisfies its parent's write — absentinferred5 of 114
gh#158: a session's tool call never resolves inside another absentinferred5 of 114
gh#158: repeated sandbox swaps race nothing a concurrent absentinferred5 of 114
gh#158: two sessions reading and writing through ONE filesystem absentinferred5 of 114
gh#158: two sessions writing todos through ONE entropic server absentinferred5 of 114
gh#168: a PRE_TOOL_CALL hook's modified args reach the toolabsentinferred5 of 114
gh#168: a malformed modification is refused, not half-appliedabsentinferred5 of 114
gh#168: a modification that renames the tool is refusedabsentinferred5 of 114
gh#168: a non-zero return still cancels, modification or notabsentinferred5 of 114
gh#158: clearing the default conversation releases the default absentinferred5 of 115
gh#158: each session's todo list is its ownabsentinferred5 of 115
gh#158: ending a session's conversation releases its read absentinferred5 of 115
gh#158: read-before-write is judged per session — another absentinferred5 of 115
Configure with null JSON returns errorabsentinferred4 of 11: all, recent, record_to_json, to_json7
Double-configure on one handle is refusedabsentinferred4 of 11: all, recent, record_to_json, to_json7
Nemotron3-Nano-4B Q8 first inference does not crash (gh#66)absentinferred4 of 11: all, recent, record_to_json, to_json7
Three handles can coexistabsentinferred4 of 11: all, recent, record_to_json, to_json7
Two GPU-resident handles can coexist (v2.2.8 target)absentinferred4 of 11: all, recent, record_to_json, to_json7
Two handles configure independentlyabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure called twice on the same handle returns ALREADY_CONFIGUREDabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure rejects NULL config_jsonabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure rejects NULL handleabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure_dir on /dev/null subpath returns an error, not an exceptionabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure_dir on a tmp dir runs the loader pathabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure_dir rejects NULL handleabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure_dir with empty string path returns an error code, not an exceptionabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure_from_file rejects NULL handleabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure_from_file rejects NULL pathabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_configure_from_file rejects missing fileabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_last_error reflects most-recent operation failureabsentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_last_error returns per-handle state (v2.2.6)absentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_register_mcp_server on a configured handle absentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_run_messages with console logging disabled still absentinferred4 of 11: all, recent, record_to_json, to_json7
entropic_seconds_since_last_activity returns 0 before any run absentinferred4 of 11: all, recent, record_to_json, to_json7
gh#110: MTP engages through the real agent loop (entropic_run)absentinferred4 of 11: all, recent, record_to_json, to_json7
gh#121 regression: configure populates engine's allowed_tools from identity frontmatterabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#144: concurrent bridge clients queue instead of racingabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#154 a tier grammar stem that cannot resolve YET still absentinferred4 of 11: all, recent, record_to_json, to_json7
gh#154 a tier grammar stem that resolves still configuresabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#154 a tier with no grammar is unaffectedabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#154 entropic_metrics_json carries a generations arrayabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#156 a frontmatter-less app_context fails configure absentinferred4 of 11: all, recent, record_to_json, to_json7
gh#156 a frontmatter-less constitution fails configure tooabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#156 a missing app_context path fails configureabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#156 a well-formed app_context file still configuresabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#156 app_context false still configuresabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#156 inline app_context content still configuresabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#158 entropic_interrupt_session targets exactly one runabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#163 entropic_configure carries app_context into ParsedConfigabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#163 entropic_configure_dir carries app_contextabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#163 entropic_configure_from_file carries app_contextabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#163 the object and false spellings survive configure_dir tooabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#164 entropic_release_model names an unknown tierabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#164 entropic_release_model refuses to unload mid-turnabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#165 entropic_session_context_set guards its preconditionsabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#165 entropic_session_context_set refuses the running sessionabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#165 entropic_session_context_set round-trips through the C ABIabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#175: a non-positive mcp.server_timeout_seconds is refused at configureabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#203: followup returns delegation_id and summary from real storageabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#204: an unservable http_port fails configure loudlyabsentinferred4 of 11: all, recent, record_to_json, to_json7
gh#95: identity grammar: field constrains that tier's outputabsentinferred4 of 11: all, recent, record_to_json, to_json7
h1.run() after h2.configure() does not segfault (v2.2.6)absentinferred4 of 11: all, recent, record_to_json, to_json7
gh#158: interrupting one session leaves the other runningabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#158: metrics and context reads are safe during live runsabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#158: two concurrent sessions do not bleed into each otherabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#164: entropic_release_model frees VRAM through the C ABIabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#165 + gh#164: release the weights, keep the conversationabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#165: a dropped session restored from JSON keeps answeringabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#166: two workspaces on one handle do not read each other's absentinferred4 of 11: all, recent, record_to_json, to_json8
gh#169: an iteration-capped delegate hands its parent the audit it absentinferred4 of 11: all, recent, record_to_json, to_json8
gh#179: each workspace's sessions answer from its own app_context, absentinferred4 of 11: all, recent, record_to_json, to_json8
gh#181: a delegate hard-cut by the thinking budget hands its absentinferred4 of 11: all, recent, record_to_json, to_json8
gh#194: a plain generation publishes the prefill it performedabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#198: a deferred handle holds no GPU memory until it runsabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#204/gh#205: two HTTP clients, different session, workspace and absentinferred4 of 11: all, recent, record_to_json, to_json8
gh#214: a prompt that does not fit fails the turn, typedabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#216: multi-byte text at the history cut does not poison later turnsabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#217: release is refused while another session is decodingabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#93: autoparser family parses a multi-parameter tool callabsentinferred4 of 11: all, recent, record_to_json, to_json8
gh#93: entropic_interrupt stops a long run early (cancel-bridge)absentinferred4 of 11: all, recent, record_to_json, to_json8
gh#94: enable_thinking:false suppresses think blocks (facade)absentinferred4 of 11: all, recent, record_to_json, to_json8
gh#99: run_as emits each tier's grammar on a shared modelabsentinferred4 of 11: all, recent, record_to_json, to_json8
outside-root optional: a real model's reads outside its root absentinferred4 of 11: all, recent, record_to_json, to_json8
v2.14.1: a declared server serves each workspace from its own repositoryabsentinferred4 of 11: all, recent, record_to_json, to_json8
v2.14.3: release frees the model over MCP and the conversation survivesabsentinferred4 of 11: all, recent, record_to_json, to_json8
v2.14.4: a model's commit message with shell syntax is text, not a commandabsentinferred4 of 11: all, recent, record_to_json, to_json8
v2.14.5: a failed turn is an error carrying only its own textabsentinferred4 of 11: all, recent, record_to_json, to_json8