storkit: create 427_story_server_side_text_normalization_for_chat_message_line_breaks
This commit is contained in:
-56
@@ -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
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "Server-side text normalization for chat message line breaks"
|
||||
---
|
||||
|
||||
# Story 427: Server-side text normalization for chat message line breaks
|
||||
|
||||
## User Story
|
||||
|
||||
As a user reading bot messages in Matrix, I want single newlines between sentences to render correctly, so that messages don't show up with words joined together like "sentence one.Sentence two".
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] Add a text normalization step before markdown-to-HTML conversion in the Matrix transport that converts single newlines between non-empty prose lines into double newlines
|
||||
- [ ] Preserve intentional single-newline formatting in bullet lists, headings, table rows, and code fences
|
||||
- [ ] Apply the same normalization in WhatsApp and Slack transports
|
||||
- [ ] Unit tests covering prose paragraphs, bullet lists, code blocks, and mixed content
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
Reference in New Issue
Block a user