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:
ZacharyZhang-NY committed 2026-04-20 13:20:15 -04:00
1 parent 5e9b7acbc6
commit a69fbb053b
86 files changed
+393 -454

No files matched your search

+3 -3
View File
@@ -30,7 +30,7 @@ describe("canManageOrganization", () => {
const db = new AppDatabase(profileDir);
db.init();
const companyId = db.saveCompany({
const companyId = db.company.saveCompany({
name: "Org Permissions Co",
description: "Tests recursive org authority",
status: "active",
@@ -100,7 +100,7 @@ describe("canManageOrganization", () => {
const db = new AppDatabase(profileDir);
db.init();
const companyId = db.saveCompany({
const companyId = db.company.saveCompany({
name: "Org Permission Override Co",
description: "Tests permission-based org authority",
status: "active",
@@ -154,7 +154,7 @@ describe("canManageOrganization", () => {
const db = new AppDatabase(profileDir);
db.init();
const companyId = db.saveCompany({
const companyId = db.company.saveCompany({
name: "Scoped Authority Co",
description: "Tests that branch growth does not unlock org-wide admin powers",
status: "active",