Skip to content

fix(api): stop a failed surface delete from leaving a duplicate row - #45

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/surfaces-delete-unchecked-error
Sep 5, 2026
Merged

fix(api): stop a failed surface delete from leaving a duplicate row#45
github-actions[bot] merged 1 commit into
mainfrom
fix/surfaces-delete-unchecked-error

Conversation

@catomean

@catomean catomean commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • npx tsc --noEmit — clean
  • npm run lint — 0 errors (8 pre-existing warnings, unrelated)
  • npm run test — 96 passed, 0 failed (error-shape.test.ts and query-error-checked.test.ts both pass against the new code)

🤖 Generated with Claude Code

Upsert deleted the existing surface before inserting the new one but
never checked the delete's result. If the delete silently failed (RLS
misconfig, transient DB error), the insert left two rows for one
project, and every later GET for that surface would 500 since it
relies on .maybeSingle() expecting at most one row.

Same unchecked-error family as PR #36/#37/#39/#40/#43.
@github-actions
github-actions Bot merged commit 760d71b into main Sep 5, 2026
1 check passed
@github-actions
github-actions Bot deleted the fix/surfaces-delete-unchecked-error branch September 5, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant