Skip to main content

Bug tracking & regression guards

How KA26 prevents the same bug from shipping twice.

The BUGS-FIXED.md file

Every bug we ship has a non-negotiable rule: "No regression. Ever. On anything."

This is enforced via a single file at the root of the marketplace repo:

  • In repo: /Users/.../marketplace/BUGS-FIXED.md
  • In Claude's persistent memory: ~/.claude/projects/-Users-siddu-marketplace/memory/bugs_fixed.md

The two files are mirrors of each other. The repo copy is what humans see on GitHub. The memory copy is what Claude reads BEFORE every change so it doesn't accidentally re-introduce a fixed bug.

What goes in BUGS-FIXED.md

Every entry follows this template:

## RULE: <one-line summary of the rule>
- **Bug** (BUG-NNN, YYYY-MM-DD): What happened. The user-visible symptom.
How it was discovered.
- **Root cause**: The actual reason. Code path, file, line if helpful.
- **Fix pattern**: What to do INSTEAD. With code references where it now
lives. Future-me reads this when adding a similar feature.
- **Applies to**: Where this rule should be enforced going forward.
- **Verification**: How we proved the fix works (file-shape test, live
verify, real-device test).

How a fix gets recorded

Per the no-regression rule, every bug fix follows this sequence:

  1. Diagnose. Find the root cause. Understand WHY the previous code was wrong.
  2. Fix the code.
  3. Add a layer-1 file-shape test with the bug ID in the describe block. This becomes the regression guard.
  4. If the bug had a runtime component, add a layer-2 jsdom test OR document the live-verification command.
  5. Run the relevant test suitenpm test for marketplace, cd mobile* && npm test for mobile.
  6. Append to BUGS-FIXED.md following the template above.
  7. Mirror the change to bugs_fixed.md in the personal memory dir (Claude does this automatically).
  8. Commit + push. The commit message references the bug ID.

Live registry of fixed bugs (high-level index)

The full content lives in BUGS-FIXED.md at the repo root. Quick index of bug-classes we've documented:

Bug classLast triggeredWhat the rule prevents
Never filter client-side on incomplete server data2026-04"My Requests" returning empty because we filtered locally before the API even returned the user's own rows
Never silently ignore null GPS / location data2026-04Delivery assignment silently failing because restaurant had null lat/lng
Consumer components NEVER go in root layout2026-03LanguageProvider calling consumer-only hooks in root layout broke the doctor app
Push trigger requires both DB row AND push call2026-04Notifications visible in bell icon but not vibrating the phone (or vice versa)
Mobile tap routing via notifType, not URL parsing2026-04The seller-panel 404 trap — notification routed to non-existent page
Every notification path must point to a real page.tsx2026-04Same 404 trap — /seller/stores/{id}/orders looked legit but only existed as an API route
File-shape tests need E2E for runtime correctness2026-04The 6-day [object Object] registration outage
Component integration tests catch what file-shape misses2026-04Various UX bugs that compiled but didn't actually work
Every APK build must republish to ka-26.com/downloads2026-04Testers downloading stale APKs
Don't stack KeyboardAvoidingView on top of Android adjustResize2026-04"Disco-dancing" checkout sheet (BUG-001)
Don't collapse fetch failures into one generic error string2026-04"Couldn't load ads" hiding real network/auth failures (BUG-002)
Sarvam STT rejects m4a/mp4 — record AAC-ADTS or WAV2026-04Voice search failing on every attempt (BUG-003)
Search must be intent-driven, not tab-driven2026-04Searching "sugar" on Ads tab returning nothing (BUG-004)
Every search endpoint must actually filter + support transliteration2026-04Stores feed silently returning all stores regardless of search (BUG-005)
Sarvam-M is a reasoning model — strip <think> blocks + raise max_tokens2026-04<think>... raw text leaking into ad descriptions
Eats is decommissioned — never propose features for it2026-04Plans referencing dead Eats tab/UI
Lazy-expire stale offers at READ time, not just write time2026-05"Locked · expired" / "Waiting · expired" bids in active count (BUG-006a + BUG-007)
Never collapse fetch failures into one generic error message2026-04Same as above — listed twice because it bites both server + client
Bid analytics must fire on PATCH actions, not just POST2026-05bid_accepted/countered/rejected silently no-op'd in analytics (BUG-006e)

The full RULE blocks for each are in BUGS-FIXED.md — search by bug ID.

How "no regression, ever" is enforced

Three guards work together:

  1. BUGS-FIXED.md is auto-loaded every time Claude starts a session in the marketplace project. Claude reads it BEFORE writing any code, so the rules are top-of-mind.
  2. File-shape regression guards in tests/*.test.ts pin the fix's pattern. A future refactor that breaks the pattern fails CI.
  3. predeploy hook in package.json runs npm test before any gcloud run deploy. If a regression test fails, the deploy aborts.

Adding a new bug to the registry

When you fix a bug:

  1. Get a bug ID. Increment the highest BUG-NNN number you see in BUGS-FIXED.md.
  2. Write the RULE block following the template above.
  3. Append to BUGS-FIXED.md at the repo root.
  4. Append the same content to ~/.claude/projects/-Users-siddu-marketplace/memory/bugs_fixed.md (Claude does this automatically when you commit).
  5. Reference the bug ID in:
    • The commit message
    • The CHANGELOG.md entry
    • Any related PR description
    • The describe block of your regression test

Reading the registry to avoid re-introducing bugs

Before designing a new feature, scan BUGS-FIXED.md for related rules. Specifically:

  • Adding a new screen → check the "Mobile tap routing" + "Components in root layout" rules
  • Adding a new search endpoint → check the BUG-005 transliteration rule
  • Adding a new modal/sheet → check the BUG-001 + BUG-006d KeyboardAvoidingView rules
  • Adding voice features → check the BUG-003 audio format + Sarvam-M reasoning rules
  • Adding a new bid lifecycle state → check BUG-006/007 lazy-expire pattern

Skipping this read is the #1 way fixed bugs get re-introduced.