Best-effort failure paths are asserted nowhere #20

Closed
opened 2026-08-26 11:23:42 +00:00 by GKaszewski · 0 comments
Owner

What to build

Several behaviours are deliberately best-effort — they must degrade rather than fail their caller. None of them has a test, and the comments that used to describe them have been removed, so nothing records the intent at all.

  • A MusicBrainz lookup that fails or times out must return a song without a recording id, never an error.
  • A blob deletion that fails must not abort deletion of the entries that referenced it.
  • A now-playing lookup that fails must leave the User able to type a song by hand and save the entry.
  • Weather enrichment, once built, has the same requirement.

Each needs a fake that fails, and a test asserting the caller still succeeds. These are the failures that only appear in production, and each currently degrades into a user-visible error instead of a quiet omission.

Acceptance criteria

  • A failing recording lookup yields a song with no recording id, not an error
  • A failing blob deletion does not prevent the entries from being deleted
  • A failing now-playing lookup surfaces as "nothing found", not a save failure
  • Each fake can be told to fail, so the same pattern serves future providers

Blocked by

None - can start immediately.

## What to build Several behaviours are deliberately best-effort — they must degrade rather than fail their caller. None of them has a test, and the comments that used to describe them have been removed, so nothing records the intent at all. - A MusicBrainz lookup that fails or times out must return a song **without** a recording id, never an error. - A blob deletion that fails must not abort deletion of the entries that referenced it. - A now-playing lookup that fails must leave the User able to type a song by hand and save the entry. - Weather enrichment, once built, has the same requirement. Each needs a fake that fails, and a test asserting the caller still succeeds. These are the failures that only appear in production, and each currently degrades into a user-visible error instead of a quiet omission. ## Acceptance criteria - [ ] A failing recording lookup yields a song with no recording id, not an error - [ ] A failing blob deletion does not prevent the entries from being deleted - [ ] A failing now-playing lookup surfaces as "nothing found", not a save failure - [ ] Each fake can be told to fail, so the same pattern serves future providers ## Blocked by None - can start immediately.
GKaszewski added the ready-for-agent label 2026-08-26 11:23:42 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-mood#20