From f6c0d35f11bd5cdd5ee37c5b845b2c7d7a9a6c38 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 28 Mar 2026 11:21:11 +0000 Subject: [PATCH] storkit: create 427_story_server_side_text_normalization_for_chat_message_line_breaks --- ...without_verifying_code_landed_on_master.md | 56 ------------------- ...malization_for_chat_message_line_breaks.md | 0 2 files changed, 56 deletions(-) delete mode 100644 .storkit/work/1_backlog/426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master.md rename .storkit/work/{5_done => 1_backlog}/427_story_server_side_text_normalization_for_chat_message_line_breaks.md (100%) diff --git a/.storkit/work/1_backlog/426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master.md b/.storkit/work/1_backlog/426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master.md deleted file mode 100644 index a816a34c..00000000 --- a/.storkit/work/1_backlog/426_bug_mergemaster_pipeline_marks_story_done_without_verifying_code_landed_on_master.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: "Mergemaster pipeline marks story done without verifying code landed on master" ---- - -# Bug 426: Mergemaster pipeline marks story done without verifying code landed on master - -## Description - -The mergemaster pipeline can mark a story as done even when the feature code never makes it to master. The cherry-pick step in merge.rs may fail or be skipped, but the pipeline still advances the story to done via the filesystem watcher. There is no post-merge verification that the code actually exists on master before marking done. - -## How to Reproduce - -Observed on stories 422 and 403. For 422: mergemaster created merge-queue branch, resolved 2 conflicts in chat/commands/mod.rs and http/mcp/mod.rs, passed quality gates, created merge-queue commit cb2ef6b (4 files, 333 insertions including unblock.rs). But the done commit on master (05db012) only moves the story file — zero code changes. There is no 'storkit: merge 422' commit on master at all. The feature branch (db3157f) still has the code but it was never cherry-picked onto master. - -## Manual Merge Notes - -When manually cherry-picking 422 onto master, two conflicts arose: - -1. `server/src/chat/commands/mod.rs` — both 421 (timer) and 422 (unblock) added entries to the same BotCommand registry. Resolution: keep both. -2. `server/src/http/mcp/mod.rs` — 420 (loc_file) and 422 (unblock) both bumped the tool count assertion from 49→50. Resolution: keep loc_file assertion, bump count to 51. - -Additionally, the cherry-pick could not proceed at all because master was on the `merge-queue/424` branch with 3 unresolved files (notifications.rs, ws.rs, watcher.rs). A concurrent in-progress merge left the working tree dirty, which likely caused the original cherry-pick to fail silently. This suggests a race condition: the filesystem watcher commits (story file moves) can leave master in a state where the cherry-pick step in merge.rs fails. - -## Full Audit of Done Stories (2026-03-28) - -Audited all 9 stories in `5_done/` to check whether their code actually landed on master: - -| Story | Merge Commit | Code on Master | -|-------|-------------|----------------| -| 417 — Split matrix/bot.rs | `665c036` (9 files, +1973/-1926) | YES | -| 418 — Split pool/auto_assign.rs | `d375c4b` (7 files, +1901/-1813) | YES | -| 419 — Matrix bot network error | `1193b7a` (1 file, +121/-3) | YES | -| 420 — loc file command | `d6f8239` (5 files, +112/-32) | YES | -| 421 — Timer command | `cf5424f` (7 files, +836) | YES | -| 422 — Unblock command | `6c6bc35` (4 files, +336) — manual cherry-pick | YES | -| 423 — Auto-schedule timer on rate limit | `b44f3a3` + `8ab2e19` (6 files, +375/-8) — manual cherry-pick | YES | -| **424 — Rate limit traffic light** | **None** | **NO — moved back to backlog for redo** | -| 425 — Chat notification on story block | `98b5475` (5 files, +184/-15) | YES | -| **427 — Text normalization for line breaks** | **None** | **NO — phantom done, code never landed** | - -**4 out of 10 stories (422, 423, 424, 427) had broken merges.** 422 and 423 were fixed via manual cherry-pick. 424 was moved back to backlog for a fresh run. 427 also hit the same bug — marked done without code on master. - -## Actual Result - -Story moved to done with no code on master. The merge-queue commit exists on a detached branch but was never applied to master. No merge commit appears in git log on master. - -## Expected Result - -Pipeline should verify that the cherry-pick produced a merge commit on master before advancing to done. If cherry-pick fails or is missing, the story should remain in merge stage with a merge_failure flag. - -## Acceptance Criteria - -- [ ] Pipeline must not move a story to done unless a merge commit containing the feature code exists on master -- [ ] If cherry-pick fails or produces no code diff on master, the merge must be reported as failed -- [ ] Add a post-merge verification step that checks git log on master for the expected merge commit before advancing to done -- [ ] When verification fails, emit a merge_failure and leave the story in the merge stage for retry diff --git a/.storkit/work/5_done/427_story_server_side_text_normalization_for_chat_message_line_breaks.md b/.storkit/work/1_backlog/427_story_server_side_text_normalization_for_chat_message_line_breaks.md similarity index 100% rename from .storkit/work/5_done/427_story_server_side_text_normalization_for_chat_message_line_breaks.md rename to .storkit/work/1_backlog/427_story_server_side_text_normalization_for_chat_message_line_breaks.md