Commit 5e14385
refactor: one durable pending-action store — the MCP park migrates up, the bespoke mechanism retires (#511)
guardrailsvc.PendingActionStore is the generic pending-action model
brought up to the MCP write park's own guarantees (restart survival,
retention-window sweep, at-most-once apply-on-approve, an opaque
Payload for restart-safe re-dispatch). RequestGuardedAction now parks
through it; mcpsvc's gated-write lifecycle (gateWrite/ResolveMCPWrite/
CancelMCPWrite/PendingMCPWrites/ResolvedMCPWrites/check_write_status)
migrates onto the same store, and MCPWriteRecord plus its bespoke
settings-key persistence are deleted. A settings file carrying the old
mcp-pending-writes key upgrades automatically (MigrateLegacyPendingWrites,
wired in main.go ahead of GuardrailService's own construction) so a
user's parked write survives the upgrade.
Every existing MCP-write/guardrail Go test and e2e spec passes
unmodified against the new seam.
🤖 Generated with Claude Code
Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent c6c9d81 commit 5e14385
12 files changed
Lines changed: 1390 additions & 505 deletions
File tree
- internal/services
- guardrailsvc
- mcpsvc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
76 | 89 | | |
77 | 90 | | |
78 | 91 | | |
| |||
0 commit comments