Two Lines, Two Bugs

What the primary source actually shows

The epic brief pointed to a 101-line Python file

The assignment promised a dramatic multi-repo, two-language voice-bug hunt ending at a Python/Rust async-cancel seam. Go to the primary source and it's one single-language Python demo.

So what does the primary source actually contain?

1
Repo (Python only)
0
Rust / PyO3 files found
0
amplifier-chat repos on disk

The whole history is two commits by one author

Michael Jabbour created and pushed the repo on Dec 8, 2025, timestamped seconds apart: a README, then a fix branch. That's the entire history.

A small, self-contained repo — so what is it?

1
1aa01f4 — Initial commit
2025-12-08 15:37:07 -0500 · Michael Jabbour · README on main
2
a9313f3 — fix: resolve slugify and word_count bugs
2025-12-08 15:37:59 -0500 · adds src + tests on feature/fix-string-utils-bugs

string-utils-bug-hunt-demo is exactly what it says

An illustrated bug-fix workflow demo: a four-function string library — truncate, slugify, word_count, contains_html_tags — built to showcase tests, code review, and visualization.

Two of those four functions hid real bugs.

4
Functions in the library
101
Lines in src/string_utils.py
281
Total lines (src + tests + README)

Two edge-case bugs hid in plain sight

slugify left stray separators around its output, and word_count miscounted whitespace — calling an empty string one word, and collapsing multiple spaces wrong.

Each defect had a one-line root cause.

slugify(" Hello ")
→ "-hello-"  fixed to  "hello"
word_count("")
→ 1  fixed to  0
word_count("Hello World")
→ 4  fixed to  2

The slugify fix is a single line

Add .strip(separator) after the regex substitution so leading and trailing separators fall away. One line, line 62 of the source.

The second fix is just as small.

# FIX: Strip leading and trailing separators slug = slug.strip(separator)

The word_count fix is a single line

Swap text.split(" ") for text.split() so Python collapses all whitespace and returns 0 for empty input. One line, line 87.

Two lines total — does it hold up?

# FIX: Use split() without argument - words = text.split(" ") + words = text.split()

Two one-line fixes ship green

The suite reports 17 passed in 0.01s. The before/after values are documented in the README and the change is proposed via open PR #1, which even records an AI code-review step.

The honest workflow delivered where the epic brief could not.

17
Tests passed in 0.01s
+284/−2
PR #1 diff across 3 files (OPEN)
2
One-line fixes shipped
The Takeaway

Trace to the primary source — two lines beat a legend

The verifiable story is often smaller, cleaner, and truer than the brief. There was no 501, no Rust seam, no cross-repo hunt — just two real edge-case bugs, each fixed in one line, tested and shipped. Verify against the source before you believe the epic.

Sources

Research Methodology

Data as of: 2026-07-21 (independently re-verified in a fresh session)

Feature status: OPEN — PR #1 not yet merged

Primary source repo: michaeljabbour/string-utils-bug-hunt-demo

Commands run:

Gaps / discrepancies: PR #1 body claims "15 passed" but the checked-out test file contains 17 tests (17 reported by pytest -v). The topic's "501 / PyO3 / cross-repo async-cancel" narrative is contradicted by evidence: no amplifier-chat repo on disk, no Rust or async in the primary repo.

Primary contributor: Michael Jabbour (michael.jabbour@gmail.com) — sole author of both commits and PR #1.

More Amplifier Stories