fix: do not notify marked for deletion for deleted workspaces (#20937)

Closes https://github.com/coder/coder/issues/20913

I've ran the test without the fix, verified the test caught the issue,
then applied the fix, and confirmed the issue no longer happens.

---

🤖 PR was initially written by Claude Opus 4.5 Thinking using Claude Code
and then review by a human 👩
This commit is contained in:
Danielle Maywood
2025-11-26 09:23:16 +00:00
committed by GitHub
parent bbf7b137da
commit e7dbbcde87
3 changed files with 101 additions and 0 deletions
+1
View File
@@ -23751,6 +23751,7 @@ SET
WHERE
template_id = $3
AND dormant_at IS NOT NULL
AND deleted = false
-- Prebuilt workspaces (identified by having the prebuilds system user as owner_id)
-- should not have their dormant or deleting at set, as these are handled by the
-- prebuilds reconciliation loop.