Extract + Drizzle dead_letter_prs + watched_repos aggregates #842
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#844 Extract + Drizzle
agents aggregate (preserve onAgentDelete hook)
charles/claude-hooks
#849 Cleanup: delete
db.ts, lint-ban raw SQL outside DB layer, update docs
charles/claude-hooks
Reference
charles/claude-hooks#842
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As a maintainer, I want the small
dead_letter_prsandwatched_reposaggregates split out and rewritten on Drizzle, so that webhook-secret rotation and dead-letter handling code stops living in thedb.tsgod-file.Acceptance criteria
Extraction
dead-letter-prs.ts— fnsupsertDeadLetterPr,removeDeadLetterPr,snoozeDeadLetterPr, plus list/get helpers (auditdb.ts:1984+for full set).watched-repos.ts— fnslistWatchedReposForRotation,updateWatchedRepoSecret, plus full CRUD audited fromdb.ts.from.*database/dbfor both function sets —background/webhook-secret-rotator.tsanddomain/workflow/event-handlers.tsare known callers).Drizzle
schema/dead-letter-prs.ts+schema/watched-repos.tsdefined.Tests
db.test.tsextracted to per-file test files, green.Out of scope
db.ts.References
apps/server/src/infrastructure/database/db.ts:1984+(dead-letter fns).apps/server/src/background/webhook-secret-rotator.ts(caller).agentsaggregate (preserveonAgentDeletehook)db.ts, lint-ban raw SQL outside DB layer, update docs