wip(intake): router, enrich endpoint, Slack handlers, migration 0034 — UNTESTED checkpoint
ci / lint-test (push) Successful in 44s

Agent was terminated by the session usage limit before running lint/tests or
writing its report. Files are complete drafts against plan §11 (C1, C2, C5):
src/app/api/intake/, src/app/api/transactions/[id]/line-items/, src/lib/intake-*.ts,
src/lib/line-items.ts, prisma/migrations/0034_intake_batches, fixtures + tests.
Next: npm ci && npx prisma generate && npm run lint && npm test && npm run test:integration.
This commit is contained in:
2026-08-21 12:03:48 +10:00
parent b958d05287
commit 057595f4ac
20 changed files with 2471 additions and 2 deletions
+25
View File
@@ -268,3 +268,28 @@ model rule_apply_runs {
reverted_at DateTime?
snapshot Json @default("[]")
}
// 0034 — intake router. One row per upload batch, written before extraction so
// Slack taps can act on it later and a re-share is detected. Columns are the
// §11 C1 contract in plans/intake-router-slice-plan.md (smarthome repo).
model intake_batches {
id String @id @db.Uuid
source String
shared_by String?
file_sha256 String[] @default([])
header Json?
items Json?
kind String?
status String
transaction_id Int?
capture_id Int?
created_at DateTime @default(now()) @db.Timestamptz(6)
resolved_at DateTime? @db.Timestamptz(6)
}
// 0034 — the remembered answer to "Groceries or a meal?" per merchant.
model intake_merchant_kinds {
merchant_key String @id
kind String
created_at DateTime @default(now()) @db.Timestamptz(6)
}