Cleanup residual dead code and stale annotations (N-scan residual)
- Drop the "pass-through remains for back-compat" note on AppDatabaseBase's domain modules; the pass-through layer is gone, so the comment was out of date. Replace with a pointer to the ESLint guard that blocks regression. - Flag the two remaining >500-line files (`agent-runtime/runtime-bridge.ts` 648 LOC, `agent-runtime/artifact-projector.ts` 637 LOC) with an inline `TODO: decompose — M-followup` note. No structural change; the decomposition is tracked for a later milestone to keep this pass scope-safe.
This commit is contained in:
1 parent
827f06f358
commit
69d03312e6
3 files changed
+11
-3
No files matched your search
@@ -1,3 +1,6 @@
|
||||
// TODO: decompose — M-followup. File is 637 lines and mixes fs-walk
|
||||
// baseline capture, git-diff projection, and work-product reconciliation.
|
||||
// Split into baseline / diff / projector modules in a future milestone.
|
||||
import { isAbsolute, relative, resolve } from "node:path";
|
||||
import { execFileSync } from "node:child_process";
|
||||
import { readdirSync, statSync } from "node:fs";
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// TODO: decompose — M-followup. File is 648 lines; split into
|
||||
// sqlite-session-store wiring, cost/metrics routing, and hook-dispatch
|
||||
// assembly. Tracked as a future milestone; no structural change in this
|
||||
// pass.
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { AppDatabase } from "@main/database";
|
||||
import type { AgentMessageRecord, DesktopEvent } from "@shared/types";
|
||||
|
||||
@@ -52,9 +52,10 @@ export class AppDatabaseBase {
|
||||
readonly vault: SecretVault;
|
||||
protected db: DatabaseSync;
|
||||
|
||||
// Domain modules. New code should prefer `db.tasks.saveTask(...)` over the
|
||||
// legacy pass-through methods on AppDatabase. Pass-through remains for
|
||||
// back-compat until all call sites migrate.
|
||||
// Domain modules. The canonical surface — call these directly from
|
||||
// every consumer (`db.tasks.saveTask(...)`, not `db.saveTask(...)`).
|
||||
// The ESLint rule in eslint.config.mjs blocks new top-level methods
|
||||
// on AppDatabase so the old pass-through layer cannot grow back.
|
||||
public readonly threads: ReturnType<typeof buildThreadMethods>;
|
||||
public readonly company: ReturnType<typeof buildCompanyMethods>;
|
||||
public readonly agents: ReturnType<typeof buildAgentMethods>;
|
||||
|
||||
Reference in new issue
Block a user