style: keep combined setup rationale in review documentation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-21 07:48:56 -05:00
1 parent a7511226e8
commit ed5452863c
4 files changed
-5

No files matched your search

@@ -340,7 +340,6 @@ const support = await getEmbeddedPostgresTestSupport();
const localBoard = principal === "local_board" || principal === "local_board_jwt";
if (localBoard) await db.update(heartbeatRuns).set({ responsibleUserId: "local-board" }).where(eq(heartbeatRuns.id, f.runId));
if (principal === "local_board_jwt") {
// The production local-trusted company route records this owner membership.
await db.insert(authUsers).values({ id: "local-board", name: "Local Board", email: "local-board@example.invalid",
emailVerified: true, createdAt: new Date(), updatedAt: new Date() }).onConflictDoNothing();
await db.insert(companyMemberships).values({ companyId: f.companyId, principalType: "user", principalId: "local-board", membershipRole: "owner", status: "active" });
@@ -19,7 +19,6 @@ export const taskRepositoryRunColumns = {
};
type TaskRepositoryRunIdentity = Pick<typeof heartbeatRuns.$inferSelect, "nativeIssueId" | "issueId" | "contextSnapshot">;
/** Native JWTs retain the local-board marker; older controller actors omit it. */
export function taskRepositoryResponsibleUserMatches(actorUserId: string | null | undefined, runUserId: string | null) {
return (actorUserId ?? null) === runUserId || (runUserId === "local-board" && actorUserId == null);
}