Codemod db pass-through calls: messages + runs + approvals + company (C1 part 2/3)
Rewrite ~376 call sites for messages, runs, approvalsMod, and company domains and delete the corresponding pass-through methods on AppDatabase / AppDatabaseBase. Structural type references (ReturnType<HandlerDeps["db"]["getRun"]>) and SweepStaleReviewsDeps-style mocks are updated to route through the owning sub-module.
This commit is contained in:
1 parent
5e9b7acbc6
commit
a69fbb053b
86 files changed
+393
-454
No files matched your search
@@ -34,7 +34,7 @@ async function createHarness() {
|
||||
lastError: null,
|
||||
});
|
||||
|
||||
const companyId = db.saveCompany({
|
||||
const companyId = db.company.saveCompany({
|
||||
name: "Document Provenance Co",
|
||||
description: "Tests document revision provenance through run completion",
|
||||
status: "active",
|
||||
@@ -82,7 +82,7 @@ async function createHarness() {
|
||||
status: "draft",
|
||||
});
|
||||
|
||||
const run = db.createRun({
|
||||
const run = db.runs.createRun({
|
||||
companyId,
|
||||
taskId,
|
||||
agentId,
|
||||
@@ -284,7 +284,7 @@ describe("document run provenance", () => {
|
||||
it("creates deliverable review approvals that stay linked to the originating task", async () => {
|
||||
const harness = await createHarness();
|
||||
try {
|
||||
harness.db.saveCompany({
|
||||
harness.db.company.saveCompany({
|
||||
id: harness.companyId,
|
||||
name: "Document Provenance Co",
|
||||
description: "Tests document review task linkage",
|
||||
|
||||
Reference in new issue
Block a user