story-kit: start 72_bug_story_creation_does_not_quote_yaml_special_characters_in_name
This commit is contained in:
@@ -7,22 +7,32 @@ test_plan: pending
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
The create_story MCP tool writes the name value into YAML front matter without quoting. If the name contains YAML-special characters like colons, the resulting front matter is invalid YAML and fails to parse.
|
Two related issues in `server/src/http/workflow.rs`:
|
||||||
|
|
||||||
|
1. **`create_story_file`** — ALREADY FIXED on master. The name value is now quoted in YAML front matter.
|
||||||
|
2. **`create_bug_file`** — NOT FIXED. This function writes NO YAML front matter at all. It starts directly with `# Bug N: name`. It needs the same `---\nname: "..."\ntest_plan: pending\n---\n\n` block that `create_story_file` has.
|
||||||
|
|
||||||
## How to Reproduce
|
## How to Reproduce
|
||||||
|
|
||||||
1. Call create_story with a name containing a colon, e.g. "Server-owned agent completion: remove report_completion dependency"
|
1. Call `create_bug` MCP tool with any name
|
||||||
2. Open the generated .md file
|
2. Open the generated .md file
|
||||||
3. Observe the front matter parser rejects it
|
3. Observe there is no YAML front matter block at all — the file starts with `# Bug`
|
||||||
|
|
||||||
## Actual Result
|
## Actual Result
|
||||||
|
|
||||||
Invalid front matter: mapping values are not allowed in this context
|
Bug files have no YAML front matter, causing the UI front matter parser to fail.
|
||||||
|
|
||||||
## Expected Result
|
## Expected Result
|
||||||
|
|
||||||
The name value should be quoted in the front matter so special characters are safe, e.g. name: "My story: with colons"
|
Bug files should have the same `---` front matter block as story files, with quoted name and `test_plan: pending`.
|
||||||
|
|
||||||
## Acceptance Criteria
|
## Acceptance Criteria
|
||||||
|
|
||||||
- [ ] Bug is fixed and verified
|
- [ ] `create_bug_file` in `server/src/http/workflow.rs` writes YAML front matter (`---\nname: "..."\ntest_plan: pending\n---`) before the markdown heading
|
||||||
|
- [ ] The name value is quoted to handle YAML-special characters (colons, etc.)
|
||||||
|
- [ ] Existing tests updated to assert front matter is present
|
||||||
|
- [ ] `cargo clippy` and `cargo test` pass
|
||||||
|
|
||||||
|
## Note for Coder
|
||||||
|
|
||||||
|
The previous coder fixed `create_story_file` (already merged) but missed that `create_bug_file` (line ~240 in `server/src/http/workflow.rs`) has the same problem — actually worse, since it writes NO front matter at all. Look at how `create_story_file` (line ~165) generates front matter and replicate that pattern in `create_bug_file`.
|
||||||
|
|||||||
Reference in New Issue
Block a user