Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

chore: bring IdempotencyStore and ToolCall to the service convention

Guido Boyke3c808e567535
diff --git a/app/services/mcp/idempotency_store.rb b/app/services/mcp/idempotency_store.rb
index 1ba13a7..932f4b8 100644
--- a/app/services/mcp/idempotency_store.rb
+++ b/app/services/mcp/idempotency_store.rb
@@ -1,5 +1,9 @@
# frozen_string_literal: true
+# Durable idempotency of the MCP and /api/v1 writes, and the one rule of which
+# key it can hold. Details in the class comment.
+#
+# Entry point: client_key / storable_key? (the rule), replay / lookup / remember (the store)
module Mcp
# Durable idempotency for MCP write tools (D9), backed by the
# mcp_idempotency_keys table. The /api/v1 writes share it (Api::V1::Idempotent,
diff --git a/app/services/mcp/tool_call.rb b/app/services/mcp/tool_call.rb
index 9991f4d..7757df6 100644
--- a/app/services/mcp/tool_call.rb
+++ b/app/services/mcp/tool_call.rb
@@ -1,5 +1,9 @@
# frozen_string_literal: true
+# One MCP tool call through the seam: the gates, the idempotency key, the tenant,
+# the tool. Details in the class comment.
+#
+# Entry point: response
module Mcp
# Executes a single MCP tool call: resolves + authorizes the target project from
# the PAT scope, sets the tenant, builds the Tools::Context and runs the tool,
diff --git a/spec/services/service_convention_guard_spec.rb b/spec/services/service_convention_guard_spec.rb
index b63eea8..e53ef15 100644
--- a/spec/services/service_convention_guard_spec.rb
+++ b/spec/services/service_convention_guard_spec.rb
@@ -123,8 +123,6 @@ module ServiceConventionDetectors
app/services/lalabase/tools.rb
app/services/markdown_to_action_text_service.rb
app/services/mcp/dispatcher.rb
- app/services/mcp/idempotency_store.rb
- app/services/mcp/tool_call.rb
app/services/meetings/participant_claim_matches.rb
app/services/notifications/broadcast_service.rb
app/services/notifications/fanout_service.rb