diff --git a/scripts/checks/replaced-paths.txt b/scripts/checks/replaced-paths.txt index cb88df07b..44b9f7e4c 100644 --- a/scripts/checks/replaced-paths.txt +++ b/scripts/checks/replaced-paths.txt @@ -13,3 +13,21 @@ scripts/checks/growth.ts scripts/checks/manifest.ts scripts/checks/routes.ts scripts/checks/lib/modules.ts +packages/agent-workflow-authoring +packages/cli +packages/echo +packages/folded-run-one-shot +packages/folded-runs +packages/hub-client +packages/routines +packages/routines-tools +packages/sidecar-placement +packages/task-dispatch-tools +packages/task-planner +packages/tasks +packages/tasks-ui +packages/workflow-catalog +packages/workflow-deploy-source +packages/workflow-freeze +packages/workflow-host-actions +packages/workflow-source diff --git a/scripts/checks/test/deletion.test.ts b/scripts/checks/test/deletion.test.ts index 5a717ad46..1f5832e17 100644 --- a/scripts/checks/test/deletion.test.ts +++ b/scripts/checks/test/deletion.test.ts @@ -1,3 +1,5 @@ +import { existsSync, readFileSync } from "node:fs"; +import path from "node:path"; import { expect, test } from "bun:test"; import { auditReplacedPaths, parseLedger } from "../deletion"; @@ -27,3 +29,41 @@ test("only the surviving paths are reported", () => { expect(report.violations).toHaveLength(1); expect(report.violations[0]).toContain("alive.ts"); }); + +// Empty leftover package dirs from the installer review (13) plus five more +// found at pickup. Git already dropped them; the replacement ledger keeps +// them from coming back as workspace members. +const DELETED_HUSK_PACKAGES = [ + "packages/agent-workflow-authoring", + "packages/cli", + "packages/echo", + "packages/folded-run-one-shot", + "packages/folded-runs", + "packages/hub-client", + "packages/routines", + "packages/routines-tools", + "packages/sidecar-placement", + "packages/task-dispatch-tools", + "packages/task-planner", + "packages/tasks", + "packages/tasks-ui", + "packages/workflow-catalog", + "packages/workflow-deploy-source", + "packages/workflow-freeze", + "packages/workflow-host-actions", + "packages/workflow-source", +]; + +test("deleted husk packages stay on the replacement ledger and are gone", () => { + const repoRoot = path.resolve(import.meta.dir, "../../.."); + const ledger = parseLedger( + readFileSync( + path.join(repoRoot, "scripts/checks/replaced-paths.txt"), + "utf8", + ), + ); + for (const husk of DELETED_HUSK_PACKAGES) { + expect(ledger).toContain(husk); + expect(existsSync(path.join(repoRoot, husk))).toBe(false); + } +});