chore(1001): retire recover_half_written_items from MCP surface
The recovery tool was a one-shot migration aid for the half-written items that existed before the Stage 1 allocator fix. The three live orphans (989/1000/1001) have been migrated; the Stage 1 fix prevents new half-writes; the tool's job is done. Removes the MCP wrapper, schema, dispatch case, and tools-list assertion. The db::recover module itself stays in-process (under `#[allow(dead_code)]`) so it can be re-exposed quickly if the bug ever resurfaces — its regression tests still run as part of the default suite. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,6 @@ mod tests {
|
||||
assert!(names.contains(&"status"));
|
||||
assert!(names.contains(&"loc_file"));
|
||||
assert!(names.contains(&"dump_crdt"));
|
||||
assert!(names.contains(&"recover_half_written_items"));
|
||||
assert!(names.contains(&"get_version"));
|
||||
assert!(names.contains(&"remove_criterion"));
|
||||
assert!(names.contains(&"mesh_status"));
|
||||
@@ -107,7 +106,7 @@ mod tests {
|
||||
assert!(names.contains(&"show_epic"));
|
||||
assert!(names.contains(&"freeze_story"));
|
||||
assert!(names.contains(&"unfreeze_story"));
|
||||
assert_eq!(tools.len(), 75);
|
||||
assert_eq!(tools.len(), 74);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -288,25 +288,6 @@ pub(super) fn system_tools() -> Vec<Value> {
|
||||
"required": []
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "recover_half_written_items",
|
||||
"description": "Discover (and optionally recover) half-written pipeline items — rows whose content is in the SQLite shadow and content store but whose CRDT entry is absent or tombstoned. These are invisible to every CRDT-driven read path and can't be cleaned up by delete_story / purge_story. Recovery moves each orphan's content onto a fresh non-tombstoned id and reports the old→new mapping. Defaults to dry_run=true so you can see what would change before mutating. Use story_ids to restrict the operation to a specific list of ids — strongly recommended on live systems where the orphan set may include historic purged stories that should stay dead.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dry_run": {
|
||||
"type": "boolean",
|
||||
"description": "When true (default), only discover half-written items and report them. When false, perform the recovery."
|
||||
},
|
||||
"story_ids": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Optional: restrict the operation (discovery in dry-run, recovery otherwise) to these story_ids. Anything else in the orphan set is left untouched. Strongly recommended for live recovery so you don't resurrect historic purged items."
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "wizard_status",
|
||||
"description": "Return the current setup wizard state: which step is active, and which are done/skipped/pending. Use this to inspect progress before calling wizard_generate, wizard_confirm, wizard_skip, or wizard_retry.",
|
||||
|
||||
Reference in New Issue
Block a user