From ea916d27f423fb7e1316ffc7978f400e630bd3db Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 23 Mar 2026 18:25:53 +0000 Subject: [PATCH] storkit: create 377_bug_update_story_mcp_tool_writes_front_matter_values_as_yaml_strings_instead_of_native_types --- ...as_yaml_strings_instead_of_native_types.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .storkit/work/1_backlog/377_bug_update_story_mcp_tool_writes_front_matter_values_as_yaml_strings_instead_of_native_types.md diff --git a/.storkit/work/1_backlog/377_bug_update_story_mcp_tool_writes_front_matter_values_as_yaml_strings_instead_of_native_types.md b/.storkit/work/1_backlog/377_bug_update_story_mcp_tool_writes_front_matter_values_as_yaml_strings_instead_of_native_types.md new file mode 100644 index 0000000..b26dca2 --- /dev/null +++ b/.storkit/work/1_backlog/377_bug_update_story_mcp_tool_writes_front_matter_values_as_yaml_strings_instead_of_native_types.md @@ -0,0 +1,30 @@ +--- +name: "update_story MCP tool writes front matter values as YAML strings instead of native types" +--- + +# Bug 377: update_story MCP tool writes front matter values as YAML strings instead of native types + +## Description + +The `update_story` MCP tool accepts `front_matter` as a `Map`, so all values are written as quoted YAML strings. Fields like `retry_count` (expected `u32`) and `blocked` (expected `bool`) end up as `"0"` and `"false"` in the YAML. This causes `parse_front_matter()` to fail because serde_yaml cannot deserialize a quoted string into `u32` or `bool`. When parsing fails, the story `name` comes back as `None`, so the status command shows no title for the story. + +## How to Reproduce + +1. Call `update_story` with `front_matter: {"blocked": "false", "retry_count": "0"}` +2. Read the story file — front matter contains `blocked: "false"` and `retry_count: "0"` (quoted strings) +3. Call `get_pipeline_status` or the bot `status` command +4. The story shows with no title/name + +## Actual Result + +Front matter values are written as quoted YAML strings. `parse_front_matter()` fails to deserialize `"false"` as `bool` and `"0"` as `u32`, returning an error. The story name is lost and the status command shows no title. + +## Expected Result + +The `update_story` tool should write `blocked` and `retry_count` as native YAML types (unquoted `false` and `0`), or `parse_front_matter()` should accept both string and native representations. The story name should always be displayed correctly in the status command. + +## Acceptance Criteria + +- [ ] update_story with front_matter {"blocked": "false"} writes `blocked: false` (unquoted) in the YAML +- [ ] update_story with front_matter {"retry_count": "0"} writes `retry_count: 0` (unquoted) in the YAML +- [ ] Story name is displayed correctly in the status command after update_story modifies front matter fields