storkit: accept 377_bug_update_story_mcp_tool_writes_front_matter_values_as_yaml_strings_instead_of_native_types

This commit is contained in:
dave
2026-03-23 22:26:09 +00:00
parent 292f9cdfe2
commit f874783b09

View File

@@ -1,30 +0,0 @@
---
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<String, String>`, 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