Pilot: extract holds aggregate to Drizzle #840
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.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#840
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 smallest aggregate (
holds, 4 fns ~30 LOC) split out ofdb.tsand rewritten on Drizzle, so that the migration pattern is proven on minimal surface before tackling load-bearing aggregates.Acceptance criteria
Extraction
apps/server/src/infrastructure/database/holds.ts.addHold,removeHold,hasHold,listHolds.HoldRowmoved + re-exported under same name.domain/workflow/deps.ts, others — grepfrom.*database/dbfor these symbols) updated to import from new path.Drizzle
schema/holds.tsdefinesholdstable mirroring current SQL shape.getDb()shared — no second connection. Wrapper helperorm()(recompute per call, no memo) indb/client.ts.Tests
db.test.tsextracted toholds.test.ts, all pass.getDb().query(...)— same row.Out of scope
References
apps/server/src/infrastructure/database/db.ts:1324-1383(current hold fns).flowsaggregate (flows + runs + audit + legacy_forge_calls) #843