Persist MCP workflow proof and review decision state across daemon processes #559

Closed
opened 2026-07-08 15:04:49 -05:00 by jcwalker3 · 1 comment
Owner

Problem Description

The Gitea Tools MCP server currently tracks session-scoped validation proofs (such as the workflow load proof and the review decision lock) purely in memory as global variables (_REVIEW_WORKFLOW_LOAD, _REVIEW_DECISION_LOCK).

Because the IDE spawns a pool of multiple daemon processes to handle concurrent or sequential tool calls, sequential workflow steps (such as capability resolution, workflow loading, lease acquisition, and final submission) get routed to different processes. This fragmentation of state causes tools to fail closed with missing load proof errors even when the tools were called canonically in the same session.

Required Resolution

  1. Durable State Serialization: Persist session validation proofs (workflow load proof, decision lock) to a secure local file (e.g. in the active workspace's temporary directory or a hidden state folder) instead of using process-local in-memory variables.
  2. Process Syncing: Ensure that all processes in the MCP server pool can read and write the synced state, matching by remote, repository, and profile identity.
### Problem Description The Gitea Tools MCP server currently tracks session-scoped validation proofs (such as the workflow load proof and the review decision lock) purely in memory as global variables (`_REVIEW_WORKFLOW_LOAD`, `_REVIEW_DECISION_LOCK`). Because the IDE spawns a pool of multiple daemon processes to handle concurrent or sequential tool calls, sequential workflow steps (such as capability resolution, workflow loading, lease acquisition, and final submission) get routed to different processes. This fragmentation of state causes tools to fail closed with missing load proof errors even when the tools were called canonically in the same session. ### Required Resolution 1. **Durable State Serialization:** Persist session validation proofs (workflow load proof, decision lock) to a secure local file (e.g. in the active workspace's temporary directory or a hidden state folder) instead of using process-local in-memory variables. 2. **Process Syncing:** Ensure that all processes in the MCP server pool can read and write the synced state, matching by remote, repository, and profile identity.
jcwalker3 added the status:in-progress label 2026-07-08 21:19:23 -05:00
Author
Owner

Issue claim heartbeat

<!-- gitea-issue-claim-heartbeat:v1 --> **Issue claim heartbeat** - kind: claim - issue: #559 - branch: feat/issue-559-durable-session-state - phase: claimed - profile: prgs-author - pr: none - blocker: none - next_action: create worktree and begin implementation
sysadmin removed the status:in-progress label 2026-07-08 21:26:58 -05:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#559